[PATCH 2/5] ASoC: Intel: bdw-rt5677: fix module load/unload issues
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Wed Jun 24 22:06:46 CEST 2020
On 6/24/20 2:14 PM, Cezary Rojewski wrote:
> On 2020-06-22 5:42 PM, Pierre-Louis Bossart wrote:
>> The mainline code currently prevents modules from being removed.
>>
>> The BE dailink .init() function calls devm_gpiod_get() using the codec
>> component device as argument. When the machine driver is removed, the
>> references to the gpiod are not released, and it's not possible to
>> remove the codec driver module - which is the only entity which could
>> free the gpiod.
>>
>> This conceptual deadlock can be avoided by invoking gpiod_get() in the
>> .init() callback, and calling gpiod_put() in the exit() callback.
>>
>> Tested on SAMUS Chromebook with SOF driver.
>>
>
> As /intel/haswell is the go-to driver for BDW platforms, please test and
> confirm with legacy driver first. SOF is optional and thus non-blocking.
I'll retest when you've fixed the go-to legacy driver, I am not even
going to try module load/unload tests when the platform code has known
issues requiring reverts.
More information about the Alsa-devel
mailing list