[PATCH] ASoC: core: clarify the driver name initialization

Jaroslav Kysela perex at perex.cz
Thu Sep 29 16:41:30 CEST 2022


On 29. 09. 22 15:38, Mark Brown wrote:
> On Thu, Sep 29, 2022 at 10:06:54AM +0200, Jaroslav Kysela wrote:
>> The driver field in the struct snd_ctl_card_info is a valid
>> user space identifier. Actually, many ASoC drivers do not care
>> and let to initialize this field using a standard wrapping method.
> 
> This breaks at least an arm multi_v7_defconfig build:
> 
> /build/stage/linux/sound/soc/soc-core.c: In function ‘snd_soc_bind_card’:
> /build/stage/linux/sound/soc/soc-core.c:2055:36: error: ‘struct snd_soc_card’ ha
> s no member named ‘dmi_longname’
>   2055 |         if (card->long_name == card->dmi_longname)
>        |                                    ^~
> 
> 
>> Also, it does not make sense to set the driver field to the
>> card name composed from DMI. This card name is longer in most
>> (all?) cases. Use a generic "ASoC-DMI" string here.
> 
> This should be a separate change, and DMI is a term specific to the
> ACPI/EFI so I don't think we should be using it as a generic here, this
> seems like a step back.  If we want to make a change there I'd expect it
> to be more picking the actual card driver name.

Thanks for the review. Yes, I made a mistake here. I wrongly mixed name and 
long name strings in my head. I removed the DMI check and posted v2 of the patch.

			Jaroslav


-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list