* [PATCH] ALSA: ASoC: cs4271: add DT property for AMUTEB=BMUTEC feature
@ 2012-10-04 11:53 Daniel Mack
2012-10-04 11:56 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mack @ 2012-10-04 11:53 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Alexander Sverdlin, lrg, Daniel Mack
The CS4271 has a feature to sync its analog mute flags, so one mute
circuitry can be used for both channels.
Give DT uses access to this feature with a new property.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Alexander Sverdlin <subaparts@yandex.ru>
---
Documentation/devicetree/bindings/sound/cs4271.txt | 2 ++
sound/soc/codecs/cs4271.c | 13 ++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/cs4271.txt b/Documentation/devicetree/bindings/sound/cs4271.txt
index c81b5fd..a850fb9 100644
--- a/Documentation/devicetree/bindings/sound/cs4271.txt
+++ b/Documentation/devicetree/bindings/sound/cs4271.txt
@@ -18,6 +18,8 @@ Optional properties:
- reset-gpio: a GPIO spec to define which pin is connected to the chip's
!RESET pin
+ - cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag
+ is enabled.
Examples:
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index f994af3..56ec8dd2 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -474,11 +474,17 @@ static int cs4271_probe(struct snd_soc_codec *codec)
struct cs4271_platform_data *cs4271plat = codec->dev->platform_data;
int ret;
int gpio_nreset = -EINVAL;
+ int amutec_eq_bmutec = 0;
#ifdef CONFIG_OF
- if (of_match_device(cs4271_dt_ids, codec->dev))
+ if (of_match_device(cs4271_dt_ids, codec->dev)) {
gpio_nreset = of_get_named_gpio(codec->dev->of_node,
"reset-gpio", 0);
+
+ if (!of_get_property(codec->dev->of_node,
+ "cirrus,amutec-eq-bmutec", NULL))
+ amutec_eq_bmutec = 1;
+ }
#endif
if (cs4271plat && gpio_is_valid(cs4271plat->gpio_nreset))
@@ -528,6 +534,11 @@ static int cs4271_probe(struct snd_soc_codec *codec)
/* Power-up sequence requires 85 uS */
udelay(85);
+ if (amutec_eq_bmutec)
+ snd_soc_update_bits(codec, CS4271_MODE2,
+ CS4271_MODE2_MUTECAEQUB,
+ CS4271_MODE2_MUTECAEQUB);
+
return snd_soc_add_codec_controls(codec, cs4271_snd_controls,
ARRAY_SIZE(cs4271_snd_controls));
}
--
1.7.11.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: ASoC: cs4271: add DT property for AMUTEB=BMUTEC feature
2012-10-04 11:53 [PATCH] ALSA: ASoC: cs4271: add DT property for AMUTEB=BMUTEC feature Daniel Mack
@ 2012-10-04 11:56 ` Mark Brown
2012-10-04 11:58 ` Daniel Mack
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-10-04 11:56 UTC (permalink / raw)
To: Daniel Mack; +Cc: alsa-devel, Alexander Sverdlin, lrg
On Thu, Oct 04, 2012 at 01:53:59PM +0200, Daniel Mack wrote:
> The CS4271 has a feature to sync its analog mute flags, so one mute
> circuitry can be used for both channels.
>
> Give DT uses access to this feature with a new property.
Is there some reason not to add this to the platform data while we're at
it?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: ASoC: cs4271: add DT property for AMUTEB=BMUTEC feature
2012-10-04 11:56 ` Mark Brown
@ 2012-10-04 11:58 ` Daniel Mack
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2012-10-04 11:58 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Alexander Sverdlin, lrg
On 04.10.2012 13:56, Mark Brown wrote:
> On Thu, Oct 04, 2012 at 01:53:59PM +0200, Daniel Mack wrote:
>> The CS4271 has a feature to sync its analog mute flags, so one mute
>> circuitry can be used for both channels.
>>
>> Give DT uses access to this feature with a new property.
>
> Is there some reason not to add this to the platform data while we're at
> it?
>
Well, no :) Can do that, just a sec.
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-04 11:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-04 11:53 [PATCH] ALSA: ASoC: cs4271: add DT property for AMUTEB=BMUTEC feature Daniel Mack
2012-10-04 11:56 ` Mark Brown
2012-10-04 11:58 ` Daniel Mack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).