[alsa-devel] [PATCH] ASoC: rt5645: add fallback case for jack detection support
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Jan 4 16:15:19 CET 2018
On 1/4/18 5:59 AM, Mark Brown wrote:
> On Wed, Jan 03, 2018 at 11:20:38PM +0100, Hans de Goede wrote:
>
>>> + else if (rt5645_check_dp(&i2c->dev))
>>> rt5645_parse_dt(rt5645, &i2c->dev);
>>> + else
>>> + rt5645->pdata = jd_mode3_platform_data;
>
>> How about:
>
>> rt5645->pdata.jd_mode = 3;
>
>> instead and remove jd_mode3_platform_data and the 2 dmi table entries
>> pointing to it ?
>
> I'm not sure it's best practice to remove the entries that have been
> explicitly added; on the other hand if the default is jd_mode = 3 then
> it's not like we'll be adding any more.
Yes, I didn't want to remove existing quirks since I can't test for
non-regressions on those devices. We will most likely have to add new
quirks for the capture part, there is a large variability in how the
analog inputs are handled. The jd_mode3 default will help mostly
identify if the device is functional out-of-the-box on the playback side
(the speaker part relies on a separate amplifier so it's hit or miss).
I will resubmit a patch with a clearer commit message, indeed there is
no harm in reading non-existent properties. What I meant is that their
absence can be used as a signal to use the default.
Thanks for the quick feedback.
-Pierre
More information about the Alsa-devel
mailing list