[PATCH] ASoC: Intel: skl_hda_dsp_generic: Fix NULLptr dereference in autosuspend delay

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Jul 22 21:04:28 CEST 2020


>>> Change the string in conditional statement to "ehdaudio0D0" to ensure
>>> that only the HDAudio codec is handled by this function.
>>
>> I am not sure this is correct.
>>
>> I may be wrong, but my understanding is the following:
>>
>> Before 5bf73b1b1dec, the driver would use the first dailink of the 
>> card, and in the case of devices without an HDaudio codec (e.g. Up2 
>> board) it would set the auto suspend delay using that first dailink. 
>> See the code in skl_hda_fill_card_info(), it reorders the dailinks 
>> when HDaudio codecs are not present so if you test for 'edhaudio00' 
>> you no longer allow for this HDMI-only case to be handled with 
>> autosuspend.
>>
>> Kai would need to review this, so this will have to wait I am afraid.
>>
> 
> So, for_each_card_rtds needs to be context aware (hdmi type). Right now, 
> introduced _autosuspend_delay is causing kernel panics.

The code before 5bf73b1b1dec would use an HDMI dailink when HDaudio 
codecs are not present, so I don't really see the point on being context 
aware. Either this never worked or there's a side effect. In both cases, 
I would kindly ask that this does not get merged before Kai is back.


More information about the Alsa-devel mailing list