[alsa-devel] [PATCH 06/11] ASoC: rt5651: Improve headphone vs headset detection

Hans de Goede hdegoede at redhat.com
Wed Feb 21 21:22:13 CET 2018


Hi,

On 21-02-18 13:05, Mark Brown wrote:
> On Tue, Feb 20, 2018 at 11:15:06PM +0100, Hans de Goede wrote:
> 
>> This commit ports my work to make this reliable on the rt5640 over to the
>> rt5651, making the following OVCD changes, each of which has been tested
>> individually and each of which has shown to be necessary on the rt5651:
> 
> It's a big rewrite everything commit :(

Yes your right, given that the headphone vs headset detection was pretty
broken before this commit I just ported my pending rt5640 work over
in one go. I will split this up better for the next version.

>> +/*
>> + * Note we do not toggle the RT5651_MIC1_OVCD_EN bit in these 2 functions,
>> + * to ensure reliable OVCD operation it *must* be enabled before enabling
>> + * the supplies, which may already be enabled.
>> + */
>> +static void rt5651_enable_micbias1_ovcd(struct snd_soc_codec *codec)
>> +{
> 
> I'm finding this comment pretty confusing - it would probably be clearer
> if it said something like "since the supplies may also be enabled by
> other DAPM operations we toggle the bit in $PLACE instead and only make
> sure the supplies are enabled here".

Ok I will update the comment.

>> +static bool rt5651_jack_inserted(struct snd_soc_codec *codec)
>> +{
> 
> BTW all these changes are in terms of snd_soc_codec not
> snd_soc_component, we're trying to move everytihng up a level so that
> all devices are components.  A bunch of refactoring went in just after
> the merge window doing that.

Ugh, just my luck to hit a refactoring like that with a big series.
Ah well I will rebase everything on top of your -next and try to use
component instead of codec everywhere.

Regards,

Hans


More information about the Alsa-devel mailing list