On 03/07/2013 06:50 PM, Kuninori Morimoto wrote:
Current ASoC has register function for platform/codec/dai/card, but doesn't have for cpu. It often produces confusion and fault on ASoC.
As result of ASoC community discussion, we consider new struct snd_soc_chip for CPU/CODEC, and will switch over to use it.
This patch adds very basic struct snd_soc_chip, and register function for it.
Conceptually this seems fine.
I would have called this a "component" rather than a "chip", since:
a) That aligns better with the phrase "multi-component" for related ASoC features.
b) This struct doesn't always represent a whole chip, but perhaps just an IP block within a chip. Consider an SoC with 5 completely separate I2S block and an SPDIF block. Those are probably each separate Linux platform devices, and each would register as its own snd_soc_chip.
To be fully useful, we'd have to convert snd_soc_sodec to be a snd_soc_chip too. Should CODEC be a "sub-class" of chip? Should we instead rename snd_soc_codec to snd_soc_chip/component? How do we get there from here?