[alsa-devel] [PATCH 0/53] ASoC: switch over to use snd_soc_register_component()
Stephen Warren
swarren at wwwdotorg.org
Tue Mar 19 16:38:57 CET 2013
On 03/19/2013 02:35 AM, Lars-Peter Clausen wrote:
> On 03/19/2013 01:32 AM, Kuninori Morimoto wrote:
>>
>> Hi Lars
>>
>>>> These patches switch over to use snd_soc_register_component()
>>>> instead of snd_soc_register_dai[s]() on all drivers
>>>> Last patch moves snd_soc_[un]register_dai[s]() to non global function.
>>>>
>>>> I could compile test on some of them, but couldn't for all drivers
>>>>
>>>> These patches are based on asoc/topic/component branch
>>>>
>>>
>>> Hi,
>>>
>>> quite a few drivers use snd_soc_register_dai(), while
>>> snd_soc_register_component() uses snd_soc_register_dais().
>>> snd_soc_register_dai() uses fmt_single_name(), while snd_soc_register_dais()
>>> uses fmt_multiple_name() to create the name for the device. So for all
>>> drivers using snd_soc_register_dai() the name of the DAI is different now,
>>> which will break the name based matching of the dai link.
>>
>> Thank you for pointing it.
>> I understand about this.
>>
>> I think if snd_soc_register_component() can use propely
>> snd_soc_register_dai() and snd_soc_register_dais(),
>> this issue is solved ?
>
> This will fix it for most drivers, but there are a couple of drivers which use
> snd_soc_register_dais with 1 dai.
>
> E.g. tegra/tegra20_ac97.c, sh/siu_dai.c, sh/hac.c, sh.ssi.c
I believe this can be fixed simply by adjusting the relevant machine
driver(s) to match whatever the new name is.
Any change to tegra20_ac97.c would only affect
sound/soc/tegra/tegra_wm9712.c's struct tegra_wm9712_dai .cpu_dai_name
field. I suspect the correct fix might be to just remove the assignment
to .cpu_dai_name in tegra_wm9712.c; I think that because the
.cpu_of_node field is always set by that driver, the value of
.cpu_dai_name is never used? Anyway, if you fix tegra_wm9712.c in your
patch, I hope that Lucas Stach can test it.
More information about the Alsa-devel
mailing list