[alsa-devel] [PATCH 1/2] ASoC: rt5651: Enable jack detection on JD1_1

Carlo Caione carlo at endlessm.com
Thu Oct 19 17:54:33 CEST 2017


On Thu, Oct 19, 2017 at 4:47 PM, Pierre-Louis Bossart
<pierre-louis.bossart at linux.intel.com> wrote:
> On 10/19/17 6:03 AM, Carlo Caione wrote:
>>
>> From: Carlo Caione <carlo at endlessm.com>
>>
>> Enable jack detection or the RT5651 codec on the JD1_1 pin.
>
> Nice, but the codec supports a second jack detection on JD1 and has a second
> JD2 pin. I will bet that some devices will have a different routing and I
> wonder if we could just add support for all options.

I can write support for that but I have no hardware to actually test
it, that's why I left those cases out.

>> The codec has no means to detect the type of the jack connected so we
>> assume that the jack is always an headset jack.
>
> that's odd, was this confirmed by Realtek?

The Realtek people are in CC :)
Probably there is way but in the datasheet there is nothing about that
(or did I miss it?)

>> Signed-off-by: Carlo Caione <carlo at endlessm.com>
>> ---
>>   include/sound/rt5651.h    |  7 ++++
>>   sound/soc/codecs/rt5651.c | 91
>> +++++++++++++++++++++++++++++++++++++++++++++--
>>   sound/soc/codecs/rt5651.h |  3 ++
>>   3 files changed, 99 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h
>> index d35de758dfb5..c563383149c4 100644
>> --- a/include/sound/rt5651.h
>> +++ b/include/sound/rt5651.h
>> @@ -11,11 +11,18 @@
>>   #ifndef __LINUX_SND_RT5651_H
>>   #define __LINUX_SND_RT5651_H
>>   +enum rt5651_jd_src {
>> +       RT5651_JD_NULL,
>> +       RT5651_JD1_1,
>> +};
>> +
>>   struct rt5651_platform_data {
>>         /* IN2 can optionally be differential */
>>         bool in2_diff;
>>         bool dmic_en;
>> +
>> +       enum rt5651_jd_src jd_src;
>
>
> I don't see code that sets this platform data, is there a quirk or
> of_property missing in this patchset?

Yes, it is supposed to be enabled by a quirk. In general (personal
taste) I prefer to post the quirk enabling code after the base code
has been ACKed. If you feel like it I can post also the quirk code
together with the next respin of this patchset.

Thank you,

-- 
Carlo Caione  |  +39.340.80.30.096  |  Endless


More information about the Alsa-devel mailing list