[alsa-devel] [PATCH] ASoC: snd-sof-pci - add model parameter and pass it to HDA codec driver
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Dec 3 20:47:32 CET 2019
>>> It may be useful to pass the specific model to the generic HDA codec
>>> routines like the legacy HDA driver (snd-hda-intel) allows.
>>> The model name "sofbus" is tricky anyway.
>>
>> Humm, I must admit I have never looked at this for the legacy driver,
>> and I am a bit confused on what this would be used for?
>> The legacy driver uses codec->modelname but I can't figure out this
>> part in hda_codec.c
>>
>> if (codec->bus->modelname) {
>> codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
>>
>> In theory there can be multiple codecs per bus (with different SDIs)
>> so using the bus->modelname for the codec->modelname looks odd.
>
> That's true. However, basically the model name is specific to the
> whole device, hence it's usually OK to pass to all codecs. The
> mismatched model name is just ignored (that's why the current code
> with model="sofbus" works). So you can think it a kind of quirk
> lookup with a system name given explicitly by user.
>
>> Is there an example of this being used for my education?
>
> You can find the list in Documentation/sound/hd-audio/models.rst
> and the usage in Documentation/sound/hd-audio/notes.rst. The
> documents are a bit outdated, though.
ah, ok, thanks for the pointers.
So if you have a new machine that's not explicitly handled by quirks you
can initially force existing tricks to be used, and in a second step the
quirk is extended to handle that machine, yes?
More information about the Alsa-devel
mailing list