public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Xing Zheng <zhengxing@rock-chips.com>
Cc: linux-rockchip@lists.infradead.org, heiko@sntech.de,
	Adam.Thomson@diasemi.com, sugar.zhang@rock-chips.com,
	jay.xu@rock-chips.com, broonie@kernel.org,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Arnaud Pouliquen <arnaud.pouliquen@st.com>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Andrew Lunn <andrew@lunn.ch>,
	Mengdong Lin <mengdong.lin@linux.intel.com>,
	Jun Nie <jun.nie@linaro.org>, Jyri Sarha <jsarha@ti.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/3] ASoC: simple-card: Add support jack detection via codec
Date: Thu, 21 Apr 2016 09:19:21 -0500	[thread overview]
Message-ID: <20160421141921.GA25900@rob-hp-laptop> (raw)
In-Reply-To: <1460967452-24574-3-git-send-email-zhengxing@rock-chips.com>

On Mon, Apr 18, 2016 at 04:17:31PM +0800, Xing Zheng wrote:
> In most cases, many codecs already supports jack detection, previouslly,
> we need to create a customized machine driver every time.
> 
> Hence, the simple-card need to support use them dynamically via parse dts
> file for better flexibility.
> 
> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> ---
> 
>  .../devicetree/bindings/sound/simple-card.txt      |   17 +++
>  sound/soc/generic/simple-card.c                    |  126 +++++++++++++++++++-
>  2 files changed, 140 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
> index cf3979e..d25c8eb 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.txt
> +++ b/Documentation/devicetree/bindings/sound/simple-card.txt
> @@ -22,6 +22,23 @@ Optional properties:
>  					  headphones are attached.
>  - simple-audio-card,mic-det-gpio	: Reference to GPIO that signals when
>  					  a microphone is attached.
> +- simple-audio-card,codec-jack		: A list of the codec supports jack detection.
> +					  The jack types which are supported refer to include/sound/jack.h.
> +					  All of the jack types:
> +						"JACK_HEADPHONE",
> +						"JACK_MICROPHONE",
> +						"JACK_HEADSET",
> +						"JACK_LINEOUT",
> +						"JACK_MECHANICAL",
> +						"JACK_VIDEOOUT",
> +						"JACK_AVOUT",
> +						"JACK_LINEIN",
> +						"JACK_BTN_0",
> +						"JACK_BTN_1",
> +						"JACK_BTN_2",
> +						"JACK_BTN_3",
> +						"JACK_BTN_4",
> +						"JACK_BTN_5".

simple-card is not so simple...

I think this information be part of the codec node if the codec 
provides the functionality. The binding should not be different whether 
a codec is part of simple-card or not. Also, I would make all these just 
boolean props. 

Rob

  reply	other threads:[~2016-04-21 14:19 UTC|newest]

Thread overview: 9+ 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 2/3] ASoC: simple-card: Add support jack detection via codec Xing Zheng
2016-04-21 14:19   ` Rob Herring [this message]
2016-04-22  1:17     ` Xing Zheng
     [not found]       ` <57197BBA.50304-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-04-22  9:22         ` Mark Brown
     [not found]           ` <20160422092250.GA3217-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-22 16:37             ` [alsa-devel] " Jeremy McDermond
2016-04-25 12:55               ` Mark Brown
     [not found]                 ` <20160425125504.GL3217-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-25 18:17                   ` [alsa-devel] " Jeremy McDermond
2016-04-22 16:40           ` Jeremy McDermond

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=20160421141921.GA25900@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=Adam.Thomson@diasemi.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew@lunn.ch \
    --cc=arnaud.pouliquen@st.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jay.xu@rock-chips.com \
    --cc=jsarha@ti.com \
    --cc=jun.nie@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mengdong.lin@linux.intel.com \
    --cc=pawel.moll@arm.com \
    --cc=perex@perex.cz \
    --cc=sugar.zhang@rock-chips.com \
    --cc=tiwai@suse.com \
    --cc=zhengxing@rock-chips.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