[alsa-devel] [PATCH 1/5 v7][RFC] ASoC: add snd_soc_register_cpu()

Lars-Peter Clausen lars at metafoo.de
Fri Mar 1 21:50:07 CET 2013

On 02/28/2013 08:14 PM, Stephen Warren wrote:
> On 02/27/2013 05:42 PM, Kuninori Morimoto wrote:
>> Hi Stephen
>>> On 02/25/2013 01:51 AM, 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.
>>>> This patch adds very basic register function for cpu
>>> This seems reasonable to me.
>>> I can't recall how much influence the existing CODEC objects have on the
>>> various routing/matching decisions inside the ASoC core. While this
>>> patch does register and unregister CPU objects, I wonder if it should
>>> have more impact on any of the existing core code? Certainly I'd expect
>>> the CPU objects to show up in ASoC's debugfs and any similar files...
>> This patch doesn't have any impact to existing drivers.
>> It just added new cpu list.
> Sure. My point was that now you've added the list, perhaps the core ASoC
> code might want to make use of it in the same way it makes use of CODEC
> objects, since it's logically equivalent.

In my opinion it makes sense to get rid of the distinction between CPU objects
and CODEC objects in this case and instead introduce some kind of DAI container
object. I mean the distinction is mostly for historic reasons from a time where
it was only possible to bind a the cpu_dai of a link to a CPU DAI and the
codec_dai to a CODEC DAI. But these dais both can for example be bound CODEC
DAIs. I think to have a common base here would allow us to do some cleanups to
the ASoC core and also avoid the duplication with snd_soc_of_get_cpu_dai_name
and snd_soc_of_get_codec_dai_name which was introduced in this series.

- Lars

More information about the Alsa-devel mailing list