Message ID | 1601573587-15288-1-git-send-email-spujar@nvidia.com |
---|---|
Headers | show |
Series | Audio graph card updates and usage with Tegra210 audio | expand |
On Thu, Oct 01, 2020 at 11:02:55PM +0530, Sameer Pujar wrote: > The "prefix" can be defined in DAI link node or it can be specified as > part of the component node itself. Currently "sound-name-prefix" defined > in a component is not taking effect. Actually the property is not getting > parsed. It can be fixed by parsing "sound-name-prefix" property whenever > "prefix" is missing in DAI link Codec node. [...] > --- a/sound/soc/soc-core.c > +++ b/sound/soc/soc-core.c > @@ -1124,7 +1124,8 @@ static void soc_set_name_prefix(struct snd_soc_card *card, > for (i = 0; i < card->num_configs; i++) { > struct snd_soc_codec_conf *map = &card->codec_conf[i]; > > - if (snd_soc_is_matching_component(&map->dlc, component)) { > + if (snd_soc_is_matching_component(&map->dlc, component) && > + map->name_prefix) { > component->name_prefix = map->name_prefix; > return; > } Hi, It is not obvious how the patch fixes the problem described. I guess now map->name_prefix is NULL on some level and overrides prefix found earlier? Best Regards, Michał Mirosław
>> The "prefix" can be defined in DAI link node or it can be specified as >> part of the component node itself. Currently "sound-name-prefix" defined >> in a component is not taking effect. Actually the property is not getting >> parsed. It can be fixed by parsing "sound-name-prefix" property whenever >> "prefix" is missing in DAI link Codec node. > [...] >> --- a/sound/soc/soc-core.c >> +++ b/sound/soc/soc-core.c >> @@ -1124,7 +1124,8 @@ static void soc_set_name_prefix(struct snd_soc_card *card, >> for (i = 0; i < card->num_configs; i++) { >> struct snd_soc_codec_conf *map = &card->codec_conf[i]; >> >> - if (snd_soc_is_matching_component(&map->dlc, component)) { >> + if (snd_soc_is_matching_component(&map->dlc, component) && >> + map->name_prefix) { >> component->name_prefix = map->name_prefix; >> return; >> } > Hi, > > It is not obvious how the patch fixes the problem described. I guess now > map->name_prefix is NULL on some level and overrides prefix found earlier? > > Best Regards, > Michał Mirosław If map->name_prefix is NULL (which is the prefix defined for Codec DAI component in a DAI link), then go ahead and check if "sound-name-prefix" is provided under component device node itself.
>> As per the members exposed earlier in the series, audio graph driver >> is updated to make use of these. Functionally there is no change >> in behavior if these are not populated. So following changes are made >> as part of this. >> >> - Update 'dai_link->ops' for DPCM links if a custom 'snd_soc_ops' >> is defined by the vendor driver. >> >> - Consider 'force_dpcm' flag status when deciding if a DAI link >> needs to be treated as DPCM or not. In doing so the logic is >> moved to a separate inline function for a better readability. >> >> - Populate 'dpcm_selectable' flag which is then used to detect >> DPCM DAI links. >> >> Signed-off-by: Sameer Pujar <spujar@nvidia.com> >> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> >> --- > Can we merge [06/13] and [07/13] patches ? Yes can be merged.