ASoC: Add SmartQ sound driver
Subsystems (3)
PATCH 2/3 ASoC: Add SmartQ sound driver
This adds sound support for the SmartQ board.
The hardware consists of a S3C6410 coupled with a WM8987 over I?S. The WM8750 driver is used for driving the WM8987, as they are register compatible.
--- sound/soc/s3c24xx/Kconfig | 6 + sound/soc/s3c24xx/Makefile | 2 + sound/soc/s3c24xx/smartq_wm8987.c | 296 +++++++++++++++++++++++++++++++++++++ 3 files changed, 304 insertions(+), 0 deletions(-) create mode 100644 sound/soc/s3c24xx/smartq_wm8987.c
sound/soc/s3c24xx/Kconfig +6 -0
@@ -125,3 +125,9 @@ config SND_SOC_SMDK_WM9713 select SND_S3C_SOC_AC97 help Sat Y if you want to add support for SoC audio on the SMDK. + +config SND_S3C64XX_SOC_SMARTQ + tristate "SoC I2S Audio support for SmartQ board" + depends on SND_S3C24XX_SOC && MACH_SMARTQ + select SND_S3C64XX_SOC_I2S + select SND_SOC_WM8750
sound/soc/s3c24xx/Makefile +2 -0
@@ -29,6 +29,7 @@ snd-soc-s3c24xx-simtec-hermes-objs := s3c24xx_simtec_hermes.o snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o snd-soc-smdk64xx-wm8580-objs := smdk64xx_wm8580.o snd-soc-smdk-wm9713-objs := smdk_wm9713.o +snd-soc-s3c64xx-smartq-wm8987-objs := smartq_wm8987.o obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o
@@ -41,3 +42,4 @@ obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES) += snd-soc-s3c24xx-simtec-hermes.o obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv320aic23.o obj-$(CONFIG_SND_S3C64XX_SOC_WM8580) += snd-soc-smdk64xx-wm8580.o obj-$(CONFIG_SND_SOC_SMDK_WM9713) += snd-soc-smdk-wm9713.o +obj-$(CONFIG_SND_S3C64XX_SOC_SMARTQ) += snd-soc-s3c64xx-smartq-wm8987.o
sound/soc/s3c24xx/smartq_wm8987.c new file +296 -0
296 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Quoted 4 lines · Maurus Cuelenaere
This adds sound support for the SmartQ board.
The hardware consists of a S3C6410 coupled with a WM8987 over I²S. The WM8750 driver is used for driving the WM8987, as they are register compatible.
I've applied this, but...
sound/soc/s3c24xx/smartq_wm8987.c line 117
Quoted 8 lines
sound/soc/s3c24xx/smartq_wm8987.c new file +8
-0+static struct snd_soc_jack_pin smartq_jack_pins[] = { +/* Disable speaker when headphone is plugged in */ + { + .pin ="Internal Speaker" , + .mask =SND_JACK_HEADPHONE , + .invert = true, + }, +};
...it probably also make sense to disable the headphone output when the headphone is not plugged in to save power?
Op 04-07-10 11:05, Mark Brown schreef:
Quoted 7 lines · Maurus Cuelenaere
Quoted 4 lines
This adds sound support for the SmartQ board.
The hardware consists of a S3C6410 coupled with a WM8987 over I?S. The WM8750 driver is used for driving the WM8987, as they are register compatible.
I've applied this, but...
Quoted 10 lines
sound/soc/s3c24xx/smartq_wm8987.c line 117
Quoted 8 lines
sound/soc/s3c24xx/smartq_wm8987.c new file +8
-0+static struct snd_soc_jack_pin smartq_jack_pins[] = { +/* Disable speaker when headphone is plugged in */ + { + .pin ="Internal Speaker" , + .mask =SND_JACK_HEADPHONE , + .invert = true, + }, +};...it probably also make sense to disable the headphone output when the headphone is not plugged in to save power?
I don't see what power there is to save? The speaker and headphone jack are connected to the same physical pins, so when disabling the pins for one of them, the other is also disabled.
The only way to disable the speaker is to shutdown its amplifier (using that GPIO pin).
Signature · 1 line
Maurus Cuelenaere
Quoted 3 lines · Maurus Cuelenaere
I don't see what power there is to save? The speaker and headphone jack are connected to the same physical pins, so when disabling the pins for one of them, the other is also disabled.
Meh, so they are. That's a slightly unusual design - normally you'd wire the speaker amplifier to a separate set of outputs to the headphone.
Op 04-07-10 11:42, Mark Brown schreef:
Quoted 8 lines · Maurus Cuelenaere
Quoted 4 lines
I don't see what power there is to save? The speaker and headphone jack are connected to the same physical pins, so when disabling the pins for one of them, the other is also disabled.
Meh, so they are. That's a slightly unusual design - normally you'd wire the speaker amplifier to a separate set of outputs to the headphone.
I know, most of the SmartQ design is "slightly unusual"..
Signature · 1 line
Maurus Cuelenaere
Op 03-07-10 02:46, Maurus Cuelenaere schreef:
sound/soc/s3c24xx/smartq_wm8987.c line 117
Quoted 8 lines
sound/soc/s3c24xx/smartq_wm8987.c new file +8
-0+static struct snd_soc_jack_pin smartq_jack_pins[] = { +/* Disable speaker when headphone is plugged in */ + { + .pin ="Internal Speaker" , + .mask =SND_JACK_HEADPHONE , + .invert = true, + }, +};
Hmm I just discovered that this .invert should be false (guess I didn't test enough), should I resubmit this patch or submit an incremental one?
Signature · 1 line
Maurus Cuelenaere
Quoted 11 lines · Maurus Cuelenaere
Op 03-07-10 02:46, Maurus Cuelenaere schreef:
sound/soc/s3c24xx/smartq_wm8987.c line 117
Quoted 8 lines
sound/soc/s3c24xx/smartq_wm8987.c new file +8
-0+static struct snd_soc_jack_pin smartq_jack_pins[] = { +/* Disable speaker when headphone is plugged in */ + { + .pin ="Internal Speaker" , + .mask =SND_JACK_HEADPHONE , + .invert = true, + }, +};Hmm I just discovered that this .invert should be false (guess I didn't test enough), should I resubmit this patch or submit an incremental one?
Incremental please.
PATCH 1/1 ASoC: Invert speaker enabling behaviour in SmartQ sound driver
The speaker was enabled when the headphone was plugged in, which isn't the wanted behaviour so correct this.
--- sound/soc/s3c24xx/smartq_wm8987.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/smartq_wm8987.c +0 -1
@@ -112,7 +112,6 @@ static struct snd_soc_jack_pin smartq_jack_pins[] = { { .pin = "Internal Speaker", .mask = SND_JACK_HEADPHONE, - .invert = true, }, };
Signature · 1 line
1.7.0.4
Re: [alsa-devel] [PATCH] ASoC: Invert speaker enabling behaviour in SmartQ sound driver
Quoted 13 lines · Maurus Cuelenaere
The speaker was enabled when the headphone was plugged in, which isn't the wanted behaviour so correct this.
Signed-off-by Maurus Cuelenaere <[email protected]>--- sound/soc/s3c24xx/smartq_wm8987.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)sound/soc/s3c24xx/smartq_wm8987.c +0
-0
sound/soc/s3c24xx/smartq_wm8987.c static struct snd_soc_jack_pin smartq_jack_pins[] = { · line 117
Quoted 7 lines
sound/soc/s3c24xx/smartq_wm8987.c +0
-1@@ -112,7 +112,6 @@ static struct snd_soc_jack_pin smartq_jack_pins[] = { { .pin = "Internal Speaker", .mask = SND_JACK_HEADPHONE, - .invert = true, }, };
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedRe: [PATCH] ASoC: Invert speaker enabling behaviour in SmartQ sound driver
Quoted 5 lines · Liam Girdwood
Quoted 4 lines · Maurus Cuelenaere
The speaker was enabled when the headphone was plugged in, which isn't the wanted behaviour so correct this.
Signed-off-by Maurus Cuelenaere <[email protected]>
Applied, thanks.