Re: [PATCH] ALSA: hda: Do not unset preset when cleaning up codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-01-18 12:38 PM, Cezary Rojewski wrote:
On 2023-01-17 4:48 PM, Pierre-Louis Bossart wrote:
On 1/17/23 09:47, Cezary Rojewski wrote:
Several functions that take part in codec's initialization and removal
are re-used by ASoC codec drivers implementations. Drivers mimic the
behavior of hda_codec_driver_probe/remove() found in
sound/pci/hda/hda_bind.c with their component->probe/remove() instead.

One of the reasons for that is the expectation of
snd_hda_codec_device_new() to receive a valid struct snd_card pointer
what cannot be fulfilled on ASoC side until a card is attempted to be

very hard to follow.
Is there a spurious 'what' to be removed?
Or is there missing text?
Please consider rewording with simpler sentences.

Thanks for the comments. 'what' is here on purpose as to my ear this sentence sounds reasonable, but I'm not a native English speaker so I might be wrong here.

The following is being explained by the commit message:

- functions such as snd_hda_codec_device_new() expect a valid pointer to struct snd_card instance - for ASoC hda codec drivers, when hdev_attach/detach() are called, there is no possibility to provide one to HDAudio API as card components are not yet enumerated - once component->probe() is invoked and succeeds, component->card will point to a valid sound card
- hda codec driver is now ready to call snd_hda_codec_device_new()

Let me rephrase the last 2 points: hda codec driver is ready to call functions such as snd_hda_codec_device_new() only when its component->probe() op gets invoked. Until that happens, field component->card is invalid.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux