lkml.org 
[lkml]   [2016]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ASoC: jack: Add a jack detect callback via codec
On 2016年04月18日 18:03, Xing Zheng wrote:
> HI Mark,
>
> On 2016年04月18日 17:53, Mark Brown wrote:
>> On Mon, Apr 18, 2016 at 05:43:51PM +0800, Xing Zheng wrote:
>>
>>> The patch_1/3 add an export of a function that calls the _detect_jack_
>>> function
>>> when a codec supports jack detection and fill the _detect_jack_
>>> function in
>>> the
>>> struct snd_soc_codec_driver.
>> But why would anything ever call this function? How is this supposed to
>> be used?
> In my opinion, this function is mainly to provide simple-card
> (patch_2/3).
>
> This function will call and initialize jack detection if a codec
> supports it and fill the detect_jack function (patch_3/3 use it),
> and, we don't need to create a customized machine driver to call the
> codec jack detection, the simple-card is able to
> parse them.
>
> Thanks.
>
The dts usage like this:

sound {
......
simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&i2s0>;
};

codec {
sound-dai = <&codec>;

simple-audio-card,codec-jack =
"JACK_HEADSET",
"JACK_BTN_0",
"JACK_BTN_1",
"JACK_BTN_2",
"JACK_BTN_3";
};
};
......
};

--
- Xing Zheng


\
 
 \ /
  Last update: 2016-04-18 12:41    [W:1.010 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site