[PATCH 6/8] ASoC: soc-pcm: check DAI's activity more simply
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Feb 27 02:23:33 CET 2020
>>>>> - if ((playback && playback_active == 1) ||
>>>>> - (!playback && capture_active == 1))
>>>>> + if (codec_dai->active == 1)
>>>>
>>>> nit-pick: we have two tests in soc-pcm.c
>>>>
>>>> if (codec_dai->active)
>>>> if (codec_dai->active == 1)
>>>>
>>>> The two are functionality equivalent but it'd be good to choose one
>>>> version - or possibly use 'active' as a boolean.
>>>
>>> In my understanding, dai->active can be 0/1/2.
>>
>> I see, I guess I missed this completely. Thanks Morimoto-san for the
>> precision.
>
> But, we want to use "if (codec_dai->active)" anyway.
> Your review indicated my mistake.
Not in this case though, the initial idea was to do the mute when only
playback or capture were enabled? If you mute when both are enabled then
that's a real change.
More information about the Alsa-devel
mailing list