Skip to contentSkip to conversation

ASoc updates for -next

PATCH In review Mark Brown 3 participants 13 messages Jan 8, 2009 – Jan 9, 2009

Subsystems (5)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover ASoc updates for -next

The following changes since commit 227b4dc6432d271eecd0ff0aefe6f0897ec47397:
Mark Brown (1):
ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-tiwai

Ian Molton (1):
ASoC: dapm: Allow explictly named mixer controls

Mark Brown (4):
Merge branch 'asoc' of git://git.mnementh.co.uk/linux-2.6-im into for-tiwai
ASoC: Constify pin names for DAPM pin status APIs
ASoC: Add jack reporting interface
ASoC: Implement WM8350 headphone jack detection

Peter Ujfalusi (3):
ASoC: Merge the soc_value_enum to soc_enum struct
ASoC: TWL4030: Change the soc_value_enum back to soc_enum
ASoC: TWL4030: Module unloading fix

 Documentation/sound/alsa/soc/dapm.txt |    3 +
 include/linux/mfd/wm8350/audio.h      |    1 +
 include/sound/soc-dapm.h              |   21 ++++-
 include/sound/soc.h                   |   47 ++++++++----
 sound/soc/Kconfig                     |    1 +
 sound/soc/Makefile                    |    2 +-
 sound/soc/codecs/twl4030.c            |   12 ++-
 sound/soc/codecs/wm8350.c             |  116 +++++++++++++++++++++++++++
 sound/soc/codecs/wm8350.h             |    8 ++
 sound/soc/soc-core.c                  |   37 +--------
 sound/soc/soc-dapm.c                  |  137 +++++++++++----------------------
 sound/soc/soc-jack.c                  |  138 +++++++++++++++++++++++++++++++++
 12 files changed, 372 insertions(+), 151 deletions(-)
 create mode 100644 sound/soc/soc-jack.c
#1 lore raw

PATCH 1/7 ASoC: dapm: Allow explictly named mixer controls

From: Ian Molton <[email protected]>

This patch allows you to define the mixer paths as having the same name as the paths they represent.

This is required to support codecs such as the wm9705 neatly without extra controls in the alsa mixer.

---
 Documentation/sound/alsa/soc/dapm.txt |    3 ++
 include/sound/soc-dapm.h              |   11 +++++++
 sound/soc/soc-dapm.c                  |   47 +++++++++++++++++++++++++-------
 3 files changed, 50 insertions(+), 11 deletions(-)
Documentation/sound/alsa/soc/dapm.txt +3 -0
index 46f9684..9e67632 100644
@@ -116,6 +116,9 @@ SOC_DAPM_SINGLE("HiFi Playback Switch", WM8731_APANA, 4, 1, 0),
 SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, wm8731_output_mixer_controls,
 	ARRAY_SIZE(wm8731_output_mixer_controls)),
 
+If you dont want the mixer elements prefixed with the name of the mixer widget,
+you can use SND_SOC_DAPM_MIXER_NAMED_CTL instead. the parameters are the same
+as for SND_SOC_DAPM_MIXER.
 
 2.3 Platform/Machine domain Widgets
 -----------------------------------
include/sound/soc-dapm.h +11 -0
index 4af1083..cc99dd4 100644
@@ -76,6 +76,11 @@
 	 wcontrols, wncontrols)\
 {	.id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols}
+#define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \
+	 wcontrols, wncontrols)\
+{       .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \
+	.shift = wshift, .invert = winvert, .kcontrols = wcontrols, \
+	.num_kcontrols = wncontrols}
 #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
 {	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrols = NULL, .num_kcontrols = 0}
@@ -101,6 +106,11 @@
 {	.id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \
 	.event = wevent, .event_flags = wflags}
+#define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \
+	wcontrols, wncontrols, wevent, wflags) \
+{       .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
+	.invert = winvert, .kcontrols = wcontrols, \
+	.num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags}
 #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \
 {	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \
@@ -263,6 +273,7 @@ enum snd_soc_dapm_type {
 	snd_soc_dapm_mux,			/* selects 1 analog signal from many inputs */
 	snd_soc_dapm_value_mux,			/* selects 1 analog signal from many inputs */
 	snd_soc_dapm_mixer,			/* mixes several analog signals together */
+	snd_soc_dapm_mixer_named_ctl,		/* mixer with named controls */
 	snd_soc_dapm_pga,			/* programmable gain/attenuation (volume) */
 	snd_soc_dapm_adc,			/* analog to digital converter */
 	snd_soc_dapm_dac,			/* digital to analog converter */
sound/soc/soc-dapm.c +36 -11

102 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 2/7 ASoC: Merge the soc_value_enum to soc_enum struct

From: Peter Ujfalusi <[email protected]>

Merge the recently introduced soc_value_enum structure to the soc_enum. The value based enums are still handled separately from the normal enum types, but with the merge some of the newly introduced functions can be removed.

---
 include/sound/soc-dapm.h |    2 +-
 include/sound/soc.h      |   15 +--------
 sound/soc/soc-core.c     |   37 +--------------------
 sound/soc/soc-dapm.c     |   80 +++-------------------------------------------
 4 files changed, 9 insertions(+), 125 deletions(-)
include/sound/soc-dapm.h +1 -1
index 4af1083..93a4edb 100644
@@ -178,7 +178,7 @@
   	.private_value = (unsigned long)&xenum }
 #define SOC_DAPM_VALUE_ENUM(xname, xenum) \
 {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
-	.info = snd_soc_info_value_enum_double, \
+	.info = snd_soc_info_enum_double, \
 	.get = snd_soc_dapm_get_value_enum_double, \
 	.put = snd_soc_dapm_put_value_enum_double, \
 	.private_value = (unsigned long)&xenum }
include/sound/soc.h +1 -14
index 9b930d3..24593ac 100644
@@ -106,7 +106,7 @@
 	.private_value = (unsigned long)&xenum }
 #define SOC_VALUE_ENUM(xname, xenum) \
 {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
-	.info = snd_soc_info_value_enum_double, \
+	.info = snd_soc_info_enum_double, \
 	.get = snd_soc_get_value_enum_double, \
 	.put = snd_soc_put_value_enum_double, \
 	.private_value = (unsigned long)&xenum }
@@ -211,8 +211,6 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol);
 int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol);
-int snd_soc_info_value_enum_double(struct snd_kcontrol *kcontrol,
-	struct snd_ctl_elem_info *uinfo);
 int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol);
 int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol,
@@ -419,17 +417,6 @@ struct soc_enum {
 	unsigned char shift_l;
 	unsigned char shift_r;
 	unsigned int max;
-	const char **texts;
-	void *dapm;
-};
-
-/* semi enumerated kcontrol */
-struct soc_value_enum {
-	unsigned short reg;
-	unsigned short reg2;
-	unsigned char shift_l;
-	unsigned char shift_r;
-	unsigned int max;
 	unsigned int mask;
 	const char **texts;
 	const unsigned int *values;
sound/soc/soc-core.c +2 -35
index 6cbe7e8..55fdb4a 100644
@@ -1585,37 +1585,6 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
 EXPORT_SYMBOL_GPL(snd_soc_put_enum_double);
 
 /**
- * snd_soc_info_value_enum_double - semi enumerated double mixer info callback
- * @kcontrol: mixer control
- * @uinfo: control element information
- *
- * Callback to provide information about a double semi enumerated
- * mixer control.
- *
- * Semi enumerated mixer: the enumerated items are referred as values. Can be
- * used for handling bitfield coded enumeration for example.
- *
- * Returns 0 for success.
- */
-int snd_soc_info_value_enum_double(struct snd_kcontrol *kcontrol,
-	struct snd_ctl_elem_info *uinfo)
-{
-	struct soc_value_enum *e = (struct soc_value_enum *)
-			kcontrol->private_value;
-
-	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
-	uinfo->count = e->shift_l == e->shift_r ? 1 : 2;
-	uinfo->value.enumerated.items = e->max;
-
-	if (uinfo->value.enumerated.item > e->max - 1)
-		uinfo->value.enumerated.item = e->max - 1;
-	strcpy(uinfo->value.enumerated.name,
-		e->texts[uinfo->value.enumerated.item]);
-	return 0;
-}
-EXPORT_SYMBOL_GPL(snd_soc_info_value_enum_double);
-
-/**
  * snd_soc_get_value_enum_double - semi enumerated double mixer get callback
  * @kcontrol: mixer control
  * @ucontrol: control element information
@@ -1631,8 +1600,7 @@ int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
 	struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct soc_value_enum *e = (struct soc_value_enum *)
-			kcontrol->private_value;
+	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
 	unsigned short reg_val, val, mux;
 
 	reg_val = snd_soc_read(codec, e->reg);
@@ -1671,8 +1639,7 @@ int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol)
 {
 	struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
-	struct soc_value_enum *e = (struct soc_value_enum *)
-			kcontrol->private_value;
+	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
 	unsigned short val;
 	unsigned short mask;
 
sound/soc/soc-dapm.c +5 -75

127 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#3 lore raw

PATCH 3/7 ASoC: TWL4030: Change the soc_value_enum back to soc_enum

From: Peter Ujfalusi <[email protected]>

The soc_value_enum has been merged to soc_enum.

---
 sound/soc/codecs/twl4030.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/codecs/twl4030.c +5 -5
index fd0f338..db24f83 100644
@@ -197,7 +197,7 @@ static const char *twl4030_earpiece_texts[] =
 static const unsigned int twl4030_earpiece_values[] =
 		{0x0, 0x1, 0x2, 0x4};
 
-static const struct soc_value_enum twl4030_earpiece_enum =
+static const struct soc_enum twl4030_earpiece_enum =
 	SOC_VALUE_ENUM_SINGLE(TWL4030_REG_EAR_CTL, 1, 0x7,
 			ARRAY_SIZE(twl4030_earpiece_texts),
 			twl4030_earpiece_texts,
@@ -213,7 +213,7 @@ static const char *twl4030_predrivel_texts[] =
 static const unsigned int twl4030_predrivel_values[] =
 		{0x0, 0x1, 0x2, 0x4};
 
-static const struct soc_value_enum twl4030_predrivel_enum =
+static const struct soc_enum twl4030_predrivel_enum =
 	SOC_VALUE_ENUM_SINGLE(TWL4030_REG_PREDL_CTL, 1, 0x7,
 			ARRAY_SIZE(twl4030_predrivel_texts),
 			twl4030_predrivel_texts,
@@ -229,7 +229,7 @@ static const char *twl4030_predriver_texts[] =
 static const unsigned int twl4030_predriver_values[] =
 		{0x0, 0x1, 0x2, 0x4};
 
-static const struct soc_value_enum twl4030_predriver_enum =
+static const struct soc_enum twl4030_predriver_enum =
 	SOC_VALUE_ENUM_SINGLE(TWL4030_REG_PREDR_CTL, 1, 0x7,
 			ARRAY_SIZE(twl4030_predriver_texts),
 			twl4030_predriver_texts,
@@ -317,7 +317,7 @@ static const char *twl4030_analoglmic_texts[] =
 static const unsigned int twl4030_analoglmic_values[] =
 		{0x0, 0x1, 0x2, 0x4, 0x8};
 
-static const struct soc_value_enum twl4030_analoglmic_enum =
+static const struct soc_enum twl4030_analoglmic_enum =
 	SOC_VALUE_ENUM_SINGLE(TWL4030_REG_ANAMICL, 0, 0xf,
 			ARRAY_SIZE(twl4030_analoglmic_texts),
 			twl4030_analoglmic_texts,
@@ -333,7 +333,7 @@ static const char *twl4030_analogrmic_texts[] =
 static const unsigned int twl4030_analogrmic_values[] =
 		{0x0, 0x1, 0x4};
 
-static const struct soc_value_enum twl4030_analogrmic_enum =
+static const struct soc_enum twl4030_analogrmic_enum =
 	SOC_VALUE_ENUM_SINGLE(TWL4030_REG_ANAMICR, 0, 0x5,
 			ARRAY_SIZE(twl4030_analogrmic_texts),
 			twl4030_analogrmic_texts,
Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 4/7 ASoC: TWL4030: Module unloading fix

From: Peter Ujfalusi <[email protected]>

Call the snd_soc_free_pcm and snd_soc_dapm_free when the codec driver is unloaded.

---
 sound/soc/codecs/twl4030.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/twl4030.c +2 -0
index db24f83..ea370a4 100644
@@ -1280,6 +1280,8 @@ static int twl4030_remove(struct platform_device *pdev)
 	struct snd_soc_codec *codec = socdev->codec;
 
 	printk(KERN_INFO "TWL4030 Audio Codec remove\n");
+	snd_soc_free_pcms(socdev);
+	snd_soc_dapm_free(socdev);
 	kfree(codec);
 
 	return 0;
Signature · 1 line
1.5.6.5
#5 lore raw

PATCH 5/7 ASoC: Constify pin names for DAPM pin status APIs

---
 include/sound/soc-dapm.h |    8 ++++----
 sound/soc/soc-dapm.c     |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
include/sound/soc-dapm.h +4 -4
index a7f4a5e..0accdba 100644
@@ -260,10 +260,10 @@ int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
 int snd_soc_dapm_sys_add(struct device *dev);
 
 /* dapm audio pin control and status */
-int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin);
-int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin);
-int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin);
-int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin);
+int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, const char *pin);
+int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, const char *pin);
+int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, const char *pin);
+int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, const char *pin);
 int snd_soc_dapm_sync(struct snd_soc_codec *codec);
 
 /* dapm widget types */
sound/soc/soc-dapm.c +5 -5
index a678065..3a759c2 100644
@@ -898,7 +898,7 @@ static void dapm_free_widgets(struct snd_soc_codec *codec)
 }
 
 static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec,
-	char *pin, int status)
+				const char *pin, int status)
 {
 	struct snd_soc_dapm_widget *w;
 
@@ -1573,7 +1573,7 @@ int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
-int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin)
+int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, const char *pin)
 {
 	return snd_soc_dapm_set_pin(codec, pin, 1);
 }
@@ -1588,7 +1588,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
-int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin)
+int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, const char *pin)
 {
 	return snd_soc_dapm_set_pin(codec, pin, 0);
 }
@@ -1608,7 +1608,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
  * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
  * do any widget power switching.
  */
-int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin)
+int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, const char *pin)
 {
 	return snd_soc_dapm_set_pin(codec, pin, 0);
 }
@@ -1623,7 +1623,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin);
  *
  * Returns 1 for connected otherwise 0.
  */
-int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin)
+int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, const char *pin)
 {
 	struct snd_soc_dapm_widget *w;
 
Signature · 1 line
1.5.6.5
#6 lore raw

PATCH 6/7 ASoC: Add jack reporting interface

This patch adds a jack reporting interface to ASoC. This wraps the ALSA core jack detection functionality and provides integration with DAPM to automatically update the power state of pins based on the jack state.

Since embedded platforms can have multiple detecton methods used for a single jack (eg, separate microphone and headphone detection) the report function allows specification of which bits are being updated on a given report.

The expected usage is that machine drivers will create jack objects and then configure jack detection methods to update that jack.

---
 include/sound/soc.h  |   32 ++++++++++++
 sound/soc/Kconfig    |    1 +
 sound/soc/Makefile   |    2 +-
 sound/soc/soc-jack.c |  138 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 172 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/soc-jack.c
include/sound/soc.h +32 -0
index 24593ac..68d8149 100644
@@ -154,6 +154,8 @@ enum snd_soc_bias_level {
 	SND_SOC_BIAS_OFF,
 };
 
+struct snd_jack;
+struct snd_soc_card;
 struct snd_soc_device;
 struct snd_soc_pcm_stream;
 struct snd_soc_ops;
@@ -164,6 +166,8 @@ struct snd_soc_platform;
 struct snd_soc_codec;
 struct soc_enum;
 struct snd_soc_ac97_ops;
+struct snd_soc_jack;
+struct snd_soc_jack_pin;
 
 typedef int (*hw_write_t)(void *,const char* ,int);
 typedef int (*hw_read_t)(void *,char* ,int);
@@ -184,6 +188,13 @@ int snd_soc_init_card(struct snd_soc_device *socdev);
 int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
 	const struct snd_pcm_hardware *hw);
 
+/* Jack reporting */
+int snd_soc_jack_new(struct snd_soc_card *card, const char *id, int type,
+		     struct snd_soc_jack *jack);
+void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
+int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
+			  struct snd_soc_jack_pin *pins);
+
 /* codec IO */
 #define snd_soc_read(codec, reg) codec->read(codec, reg)
 #define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
@@ -237,6 +248,27 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
 int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_value *ucontrol);
 
+/**
+ * struct snd_soc_jack_pin - Describes a pin to update based on jack detection
+ *
+ * @pin:    name of the pin to update
+ * @mask:   bits to check for in reported jack status
+ * @invert: if non-zero then pin is enabled when status is not reported
+ */
+struct snd_soc_jack_pin {
+	struct list_head list;
+	const char *pin;
+	int mask;
+	bool invert;
+};
+
+struct snd_soc_jack {
+	struct snd_jack *jack;
+	struct snd_soc_card *card;
+	struct list_head pins;
+	int status;
+};
+
 /* SoC PCM stream information */
 struct snd_soc_pcm_stream {
 	char *stream_name;
sound/soc/Kconfig +1 -0
index ef025c6..3d2bb6f 100644
@@ -6,6 +6,7 @@ menuconfig SND_SOC
 	tristate "ALSA for SoC audio support"
 	select SND_PCM
 	select AC97_BUS if SND_SOC_AC97_BUS
+	select SND_JACK if INPUT=y || INPUT=SND
 	---help---
 
 	  If you want ASoC support, you should say Y here and also to the
sound/soc/Makefile +1 -1
index 86a9b1f..0237879 100644
@@ -1,4 +1,4 @@
-snd-soc-core-objs := soc-core.o soc-dapm.o
+snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o
 
 obj-$(CONFIG_SND_SOC)	+= snd-soc-core.o
 obj-$(CONFIG_SND_SOC)	+= codecs/
sound/soc/soc-jack.c new file +138 -0

138 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#7 lore raw

PATCH 7/7 ASoC: Implement WM8350 headphone jack detection

---
 include/linux/mfd/wm8350/audio.h |    1 +
 sound/soc/codecs/wm8350.c        |  116 ++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/wm8350.h        |    8 +++
 3 files changed, 125 insertions(+), 0 deletions(-)
include/linux/mfd/wm8350/audio.h +1 -0
index af95a1d..d899dc0 100644
@@ -490,6 +490,7 @@
 /*
  * R231 (0xE7) - Jack Status
  */
+#define WM8350_JACK_L_LVL			0x0800
 #define WM8350_JACK_R_LVL                       0x0400
 
 /*
sound/soc/codecs/wm8350.c +116 -0

146 lines not on this page · raw message

sound/soc/codecs/wm8350.h +8 -0
index cc2887a..d11bd92 100644
@@ -17,4 +17,12 @@
 extern struct snd_soc_dai wm8350_dai;
 extern struct snd_soc_codec_device soc_codec_dev_wm8350;
 
+enum wm8350_jack {
+	WM8350_JDL = 1,
+	WM8350_JDR = 2,
+};
+
+int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which,
+			  struct snd_soc_jack *jack, int report);
+
 #endif
Signature · 1 line
1.5.6.5
#8 lore raw
In reply to Mark Brown

At Thu, 8 Jan 2009 19:37:20 +0000,

Quoted 8 lines · Mark Brown

The following changes since commit 227b4dc6432d271eecd0ff0aefe6f0897ec47397:
Mark Brown (1):
ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-tiwai

Which is it intended for, 2.6.29 or 2.6.30?

If it's 2.6.29, the patches look too much. If it's for 2.6.30, IMO, at least Peter's clean-up patches should go into 2.6.29, as this change was introduced firstly in the 2.6.29 merge.

thanks,

Takashi

Quoted 29 lines

Ian Molton (1):
ASoC: dapm: Allow explictly named mixer controls

Mark Brown (4):
Merge branch 'asoc' of git://git.mnementh.co.uk/linux-2.6-im into for-tiwai
ASoC: Constify pin names for DAPM pin status APIs
ASoC: Add jack reporting interface
ASoC: Implement WM8350 headphone jack detection

Peter Ujfalusi (3):
ASoC: Merge the soc_value_enum to soc_enum struct
ASoC: TWL4030: Change the soc_value_enum back to soc_enum
ASoC: TWL4030: Module unloading fix

 Documentation/sound/alsa/soc/dapm.txt |    3 +
 include/linux/mfd/wm8350/audio.h      |    1 +
 include/sound/soc-dapm.h              |   21 ++++-
 include/sound/soc.h                   |   47 ++++++++----
 sound/soc/Kconfig                     |    1 +
 sound/soc/Makefile                    |    2 +-
 sound/soc/codecs/twl4030.c            |   12 ++-
 sound/soc/codecs/wm8350.c             |  116 +++++++++++++++++++++++++++
 sound/soc/codecs/wm8350.h             |    8 ++
 sound/soc/soc-core.c                  |   37 +--------
 sound/soc/soc-dapm.c                  |  137 +++++++++++----------------------
 sound/soc/soc-jack.c                  |  138 +++++++++++++++++++++++++++++++++
 12 files changed, 372 insertions(+), 151 deletions(-)
 create mode 100644 sound/soc/soc-jack.c
author
#9 lore raw
Quoted 1 line · Takashi Iwai

Which is it intended for, 2.6.29 or 2.6.30?

.30

Quoted 3 lines

If it's 2.6.29, the patches look too much. If it's for 2.6.30, IMO, at least Peter's clean-up patches should go into 2.6.29, as this change was introduced firstly in the 2.6.29 merge.

Oh, OK. You've previously been much more reluctant to merge cleanups so I didn't think you'd want to merge those - if you're happy to merge his patches I'll regenerate the branches and push out again this morning.

#10 lore raw

At Fri, 9 Jan 2009 08:43:36 +0000,

Quoted 7 lines · Mark Brown
Quoted 1 line · Takashi Iwai

Which is it intended for, 2.6.29 or 2.6.30?

.30

Quoted 7 lines
Quoted 3 lines

If it's 2.6.29, the patches look too much. If it's for 2.6.30, IMO, at least Peter's clean-up patches should go into 2.6.29, as this change was introduced firstly in the 2.6.29 merge.

Oh, OK. You've previously been much more reluctant to merge cleanups so I didn't think you'd want to merge those - if you're happy to merge his patches I'll regenerate the branches and push out again this morning.

Well, in this case, it's more logical to merge them into 2.6.29 because that API change was introduced first on 2.6.29, and then we are now trying to kill it again. By merging the clean-up patches, such an intermediate API change will be gone gracefully.

thanks,

Takashi

author
#11 lore raw
Quoted 4 lines · Takashi Iwai

Well, in this case, it's more logical to merge them into 2.6.29 because that API change was introduced first on 2.6.29, and then we are now trying to kill it again. By merging the clean-up patches, such an intermediate API change will be gone gracefully.

Yeah, I agree entirely - the cases I was thinking of were similar things like the pop wait timer which was only in sysfs for one kernel release.

#12 lore raw

At Fri, 9 Jan 2009 11:55:43 +0000,

Quoted 10 lines · Mark Brown
Quoted 4 lines · Takashi Iwai

Well, in this case, it's more logical to merge them into 2.6.29 because that API change was introduced first on 2.6.29, and then we are now trying to kill it again. By merging the clean-up patches, such an intermediate API change will be gone gracefully.

Yeah, I agree entirely - the cases I was thinking of were similar things like the pop wait timer which was only in sysfs for one kernel release.

Ah, that one. Yeah, at that time I didn't want it because the span between the addition and the removal was big, and it was more or less only for debugging.

This time, it was introduced shortly ago, and the clean-up is really a clean-up.

... Or, shorter to say -- a new-year's snow brought me a better mood ;)

Takashi