public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xing Zheng <zhengxing@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-rockchip@lists.infradead.org, heiko@sntech.de,
	Adam.Thomson@diasemi.com, sugar.zhang@rock-chips.com,
	jay.xu@rock-chips.com, Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] ASoC: jack: Add a jack detect callback via codec
Date: Mon, 18 Apr 2016 18:20:00 +0800	[thread overview]
Message-ID: <5714B4D0.90406@rock-chips.com> (raw)
In-Reply-To: <5714B0D4.7080506@rock-chips.com>

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

  reply	other threads:[~2016-04-18 10:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  8:17 [PATCH 0/3] Add support simple-card parse jack detection via external codec Xing Zheng
2016-04-18  8:17 ` [PATCH 1/3] ASoC: jack: Add a jack detect callback via codec Xing Zheng
2016-04-18  9:22   ` Mark Brown
2016-04-18  9:43     ` Xing Zheng
2016-04-18  9:53       ` Mark Brown
2016-04-18 10:03         ` Xing Zheng
2016-04-18 10:20           ` Xing Zheng [this message]
2016-04-18 11:46             ` Mark Brown
2016-04-18 16:40               ` Dylan Reid
2016-04-18  8:17 ` [PATCH 2/3] ASoC: simple-card: Add support jack detection " Xing Zheng
2016-04-21 14:19   ` Rob Herring
2016-04-22  1:17     ` Xing Zheng
2016-04-22  9:22       ` Mark Brown
2016-04-22 16:37         ` [alsa-devel] " Jeremy McDermond
2016-04-25 12:55           ` Mark Brown
2016-04-25 18:17             ` Jeremy McDermond
2016-04-22 16:40         ` Jeremy McDermond
2016-04-18  8:17 ` [PATCH 3/3] ASoC: da7219: Add detect_jack callback in the snd_soc_codec_driver Xing Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5714B4D0.90406@rock-chips.com \
    --to=zhengxing@rock-chips.com \
    --cc=Adam.Thomson@diasemi.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=jay.xu@rock-chips.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=sugar.zhang@rock-chips.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox