[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57197BBA.50304@rock-chips.com>
Date: Fri, 22 Apr 2016 09:17:46 +0800
From: Xing Zheng <zhengxing@...k-chips.com>
To: Rob Herring <robh@...nel.org>, broonie@...nel.org
Cc: linux-rockchip@...ts.infradead.org, heiko@...ech.de,
Adam.Thomson@...semi.com, sugar.zhang@...k-chips.com,
jay.xu@...k-chips.com, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Arnaud Pouliquen <arnaud.pouliquen@...com>,
Aaro Koskinen <aaro.koskinen@....fi>,
Andrew Lunn <andrew@...n.ch>,
Mengdong Lin <mengdong.lin@...ux.intel.com>,
Jun Nie <jun.nie@...aro.org>, Jyri Sarha <jsarha@...com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH 2/3] ASoC: simple-card: Add support jack detection via
codec
On 2016年04月21日 22:19, Rob Herring wrote:
> 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@...k-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.
Yes, these things seem like make simple-card becomes more complicated,
and the generic jack detection method is still a problem currently.
Hi Mark, the other question here, how do we make sense to use the
simple-card to call the "snd_soc_dai_set_pll" if the codec (like da7219)
requires do this?
Thanks.
--
- Xing Zheng
Powered by blists - more mailing lists