All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
@ 2012-04-25 20:07 Christoph Fritz
  2012-04-26 10:15 ` Christoph Fritz
  2012-04-26 11:27 ` Mark Brown
  0 siblings, 2 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-04-25 20:07 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel; +Cc: Hans J. Koch

Hi Mark, Liam, Hans J. and List,

 I have a "wm9712" codec-chip on an ARM mx35 board and everything works
except Microphone.

Strange is that I can't change the Mic-Select-Source:

# amixer sset "Mic Select Source" 'Mic 2'
Simple mixer control 'Mic Select Source',0
  Capabilities: enum
  Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
  Item0: 'Mic 1'

When I tested arecord for line-in, the "Capture Slide" in alsamixer was
wrongly inverted.
in sound/soc/codecs/wm9712.c:
       SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
should get:
       SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
If you want I can send a patch in.

I'm using the current linus git tree (3.4.0-rc4). I tried it with
linux-2.6.33.20 (with sound/soc/imx/imx-ssi.c etc. from 2.6.34) and it
works. On a fairly similar board I was told that it works on Kernel
3.0.4 with this patch applied:

Since patch "ASoC: Sync initial widget state with hardware"
(commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture doesn't
work. The MICBIAS bit from the "Power Management" Register are alway 1 (disabled).
So that the captering works the active status must be set to 1, at the right time.
That this works the stream name must be set.
---
 include/sound/soc-dapm.h |    3 ++-
 sound/soc/soc-dapm.c     |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index c46e7d8..308122a 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -85,7 +85,8 @@
 	.shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \
 	.num_kcontrols = wncontrols}
 #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
-{	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
+{	.id = snd_soc_dapm_micbias, .name = wname, .sname = \
+	"Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0}
 #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \
 {	.id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 32ab7fc..250a1d2 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -646,7 +646,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget)
 			return snd_soc_dapm_suspend_check(widget);
 
 		/* connected VMID/Bias for lower pops */
-		if (widget->id == snd_soc_dapm_vmid)
+		if (widget->id == snd_soc_dapm_vmid || widget->id == snd_soc_dapm_micbias)
 			return snd_soc_dapm_suspend_check(widget);
 
 		/* connected jack ? */
@@ -1835,6 +1835,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
 			break;
 		case snd_soc_dapm_adc:
 		case snd_soc_dapm_aif_out:
+		case snd_soc_dapm_micbias:
 			w->power_check = dapm_adc_check_power;
 			break;
 		case snd_soc_dapm_dac:
@@ -1848,7 +1849,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
 			break;
 		case snd_soc_dapm_input:
 		case snd_soc_dapm_output:
-		case snd_soc_dapm_micbias:
 		case snd_soc_dapm_spk:
 		case snd_soc_dapm_hp:
 		case snd_soc_dapm_mic:
--


 Thanks,
   -- Christoph


It follows the output of "amixer scontents", "amixer controls" and
"amixer contents":

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 20 [65%] [on]
  Front Right: Playback 20 [65%] [on]
Simple mixer control 'Headphone Playback ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 6 [19%] [off]
  Front Right: Playback 6 [19%] [off]
Simple mixer control 'Speaker Mixer Aux',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Mixer Line Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Mixer PCBeep Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Mixer PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Mixer Phone Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Mux',0
  Capabilities: enum
  Items: 'Speaker Mix' 'Headphone Mix'
  Item0: 'Speaker Mix'
Simple mixer control 'Speaker Playback Invert',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Speaker Playback ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Tone Cut-off',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Bass',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'Bass Control',0
  Capabilities: enum
  Items: 'Linear Control' 'Adaptive Boost'
  Item0: 'Linear Control'
Simple mixer control 'Bass Cut-off',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Treble',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 9 [60%]
Simple mixer control 'PCM',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 17 [55%]
  Front Right: Playback 17 [55%]
Simple mixer control 'Line',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 23 [74%]
  Front Right: Capture 23 [74%]
Simple mixer control 'Mic 1',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 23 [74%] [0.00dB]
Simple mixer control 'Mic 2',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 18 [58%] [-7.50dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 1
  Mono: 0 [0%] [0.00dB]
Simple mixer control 'Mic Headphone ',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 3 [43%]
Simple mixer control 'Mic Select Source',0
  Capabilities: enum
  Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
  Item0: 'Mic 1'
Simple mixer control 'Phone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 14 [93%]
Simple mixer control 'Phone Mixer Aux',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Phone Mixer Line Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Phone Mixer Mic 1 Sidetone',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Phone Mixer Mic 2 Sidetone',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Phone Mixer PCBeep Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Phone Mixer PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Aux Playback Headphone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Aux Playback Phone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Aux Playback Speaker',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Mono',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
Simple mixer control 'Mono Playback ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Playback Attenuate (-6dB)',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 13 [21%]
  Front Right: Capture 13 [21%]
Simple mixer control 'Capture 20dB Boost',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Capture ADC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture Phone Mux',0
  Capabilities: enum
  Items: 'Stereo' 'Left' 'Right' 'Mute'
  Item0: 'Mute'
Simple mixer control 'Capture Volume Steps',0
  Capabilities: enum
  Items: '+1.5dB Steps' '+0.75dB Steps'
  Item0: '+0.75dB Steps'
  Item1: '+0.75dB Steps'
Simple mixer control 'Capture ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture to Phone 20dB Boost',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control '3D',0
  Capabilities: pvolume pvolume-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 15
  Mono: Playback 0 [0%]
Simple mixer control '3D Lower Cut-off',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control '3D Upper Cut-off',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ALC Attack Time',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'ALC Decay Time',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'ALC Function',0
  Capabilities: enum
  Items: 'None' 'Left' 'Right' 'Stereo'
  Item0: 'None'
Simple mixer control 'ALC Headphone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'ALC Hold Time',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'ALC Max',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'ALC NG',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ALC NG Threshold',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 0 [0%]
Simple mixer control 'ALC NG Type',0
  Capabilities: enum
  Items: 'Constant Gain' 'Mute'
  Item0: 'Mute'
Simple mixer control 'ALC Sidetone Mux',0
  Capabilities: enum
  Items: 'Stereo' 'Left' 'Right' 'None'
  Item0: 'Stereo'
Simple mixer control 'ALC Target',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'ALC ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ALC ZC Timeout',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'Differential Source',0
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'
Simple mixer control 'Left Capture Select',0
  Capabilities: enum
  Items: 'Mic' 'NC' 'NC' 'Speaker Mixer' 'Line' 'Headphone Mixer' 'Phone
Mixer' 'Phone'
  Item0: 'NC'
Simple mixer control 'Left HP Mixer Aux',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left HP Mixer Line Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Left HP Mixer Mic Sidetone',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left HP Mixer PCBeep Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left HP Mixer PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Left HP Mixer Phone Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Out3',0
  Capabilities: volume volume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 0 [0%] Playback [off]
Simple mixer control 'Out3 Mux',0
  Capabilities: enum
  Items: 'Left' 'VREF' 'Left + Right' 'Mono'
  Item0: 'Mono'
Simple mixer control 'Out3 ZC',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'PCBeep Bypass Headphone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'PCBeep Bypass Phone',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'PCBeep Bypass Speaker',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Right Capture Select',0
  Capabilities: enum
  Items: 'Mic' 'NC' 'NC' 'Speaker Mixer' 'Line' 'Headphone Mixer' 'Phone
Mixer' 'Phone'
  Item0: 'NC'
Simple mixer control 'Right HP Mixer Aux',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Right HP Mixer Line Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Right HP Mixer Mic Sidetone',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Right HP Mixer PCBeep Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right HP Mixer PCM',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Right HP Mixer Phone Bypass',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
numid=8,iface=MIXER,name='Headphone Playback ZC Switch'
numid=4,iface=MIXER,name='Headphone Playback Switch'
numid=3,iface=MIXER,name='Headphone Playback Volume'
numid=5,iface=MIXER,name='PCM Playback Volume'
numid=35,iface=MIXER,name='Line Capture Volume'
numid=51,iface=MIXER,name='Mic 1 Volume'
numid=52,iface=MIXER,name='Mic 2 Volume'
numid=53,iface=MIXER,name='Mic Boost Volume'
numid=23,iface=MIXER,name='Mic Headphone  Volume'
numid=78,iface=MIXER,name='Mic Select Source'
numid=60,iface=MIXER,name='Phone Mixer Aux Playback Switch'
numid=61,iface=MIXER,name='Phone Mixer Line Bypass Switch'
numid=63,iface=MIXER,name='Phone Mixer Mic 1 Sidetone Switch'
numid=64,iface=MIXER,name='Phone Mixer Mic 2 Sidetone Switch'
numid=59,iface=MIXER,name='Phone Mixer PCBeep Bypass Switch'
numid=62,iface=MIXER,name='Phone Mixer PCM Playback Switch'
numid=34,iface=MIXER,name='Phone Volume'
numid=31,iface=MIXER,name='Aux Playback Headphone Volume'
numid=33,iface=MIXER,name='Aux Playback Phone Volume'
numid=32,iface=MIXER,name='Aux Playback Speaker Volume'
numid=9,iface=MIXER,name='Mono Playback ZC Switch'
numid=11,iface=MIXER,name='Mono Playback Switch'
numid=10,iface=MIXER,name='Mono Playback Volume'
numid=36,iface=MIXER,name='Capture 20dB Boost Switch'
numid=47,iface=MIXER,name='Capture ADC Switch'
numid=81,iface=MIXER,name='Capture Phone Mux'
numid=50,iface=MIXER,name='Capture ZC Switch'
numid=37,iface=MIXER,name='Capture to Phone 20dB Boost Switch'
numid=49,iface=MIXER,name='Capture Volume'
numid=48,iface=MIXER,name='Capture Volume Steps'
numid=44,iface=MIXER,name='Playback Attenuate (-6dB) Switch'
numid=39,iface=MIXER,name='3D Lower Cut-off Switch'
numid=40,iface=MIXER,name='3D Playback Volume'
numid=38,iface=MIXER,name='3D Upper Cut-off Switch'
numid=15,iface=MIXER,name='ALC Attack Time'
numid=14,iface=MIXER,name='ALC Decay Time'
numid=16,iface=MIXER,name='ALC Function'
numid=24,iface=MIXER,name='ALC Headphone Volume'
numid=13,iface=MIXER,name='ALC Hold Time'
numid=17,iface=MIXER,name='ALC Max Volume'
numid=20,iface=MIXER,name='ALC NG Switch'
numid=22,iface=MIXER,name='ALC NG Threshold'
numid=21,iface=MIXER,name='ALC NG Type'
numid=84,iface=MIXER,name='ALC Sidetone Mux'
numid=12,iface=MIXER,name='ALC Target Volume'
numid=19,iface=MIXER,name='ALC ZC Switch'
numid=18,iface=MIXER,name='ALC ZC Timeout'
numid=41,iface=MIXER,name='Bass Control'
numid=42,iface=MIXER,name='Bass Cut-off Switch'
numid=45,iface=MIXER,name='Bass Volume'
numid=77,iface=MIXER,name='Differential Source'
numid=80,iface=MIXER,name='Left Capture Select'
numid=72,iface=MIXER,name='Left HP Mixer Aux Playback Switch'
numid=74,iface=MIXER,name='Left HP Mixer Line Bypass Switch'
numid=76,iface=MIXER,name='Left HP Mixer Mic Sidetone Switch'
numid=71,iface=MIXER,name='Left HP Mixer PCBeep Bypass Switch'
numid=75,iface=MIXER,name='Left HP Mixer PCM Playback Switch'
numid=73,iface=MIXER,name='Left HP Mixer Phone Bypass Switch'
numid=83,iface=MIXER,name='Out3 Mux'
numid=25,iface=MIXER,name='Out3 Switch'
numid=27,iface=MIXER,name='Out3 Volume'
numid=26,iface=MIXER,name='Out3 ZC Switch'
numid=28,iface=MIXER,name='PCBeep Bypass Headphone Volume'
numid=30,iface=MIXER,name='PCBeep Bypass Phone Volume'
numid=29,iface=MIXER,name='PCBeep Bypass Speaker Volume'
numid=79,iface=MIXER,name='Right Capture Select'
numid=66,iface=MIXER,name='Right HP Mixer Aux Playback Switch'
numid=68,iface=MIXER,name='Right HP Mixer Line Bypass Switch'
numid=70,iface=MIXER,name='Right HP Mixer Mic Sidetone Switch'
numid=65,iface=MIXER,name='Right HP Mixer PCBeep Bypass Switch'
numid=69,iface=MIXER,name='Right HP Mixer PCM Playback Switch'
numid=67,iface=MIXER,name='Right HP Mixer Phone Bypass Switch'
numid=55,iface=MIXER,name='Speaker Mixer Aux Playback Switch'
numid=57,iface=MIXER,name='Speaker Mixer Line Bypass Switch'
numid=54,iface=MIXER,name='Speaker Mixer PCBeep Bypass Switch'
numid=58,iface=MIXER,name='Speaker Mixer PCM Playback Switch'
numid=56,iface=MIXER,name='Speaker Mixer Phone Bypass Switch'
numid=82,iface=MIXER,name='Speaker Mux'
numid=7,iface=MIXER,name='Speaker Playback Invert Switch'
numid=2,iface=MIXER,name='Speaker Playback Switch'
numid=1,iface=MIXER,name='Speaker Playback Volume'
numid=6,iface=MIXER,name='Speaker Playback ZC Switch'
numid=43,iface=MIXER,name='Tone Cut-off Switch'
numid=46,iface=MIXER,name='Treble Volume'
numid=8,iface=MIXER,name='Headphone Playback ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=4,iface=MIXER,name='Headphone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=3,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
  : values=20,20
numid=5,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
  : values=17,17
numid=35,iface=MIXER,name='Line Capture Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
  : values=23,23
numid=51,iface=MIXER,name='Mic 1 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
  : values=23
  | dBscale-min=-34.50dB,step=1.50dB,mute=0
numid=52,iface=MIXER,name='Mic 2 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
  : values=18
  | dBscale-min=-34.50dB,step=1.50dB,mute=0
numid=53,iface=MIXER,name='Mic Boost Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
  : values=0
  | dBscale-min=0.00dB,step=20.00dB,mute=0
numid=23,iface=MIXER,name='Mic Headphone  Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=3
numid=78,iface=MIXER,name='Mic Select Source'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Mic 1'
  ; Item #1 'Differential'
  ; Item #2 'Mic 2'
  ; Item #3 'Stereo'
  : values=0
numid=60,iface=MIXER,name='Phone Mixer Aux Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=61,iface=MIXER,name='Phone Mixer Line Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=63,iface=MIXER,name='Phone Mixer Mic 1 Sidetone Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=64,iface=MIXER,name='Phone Mixer Mic 2 Sidetone Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=59,iface=MIXER,name='Phone Mixer PCBeep Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=62,iface=MIXER,name='Phone Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='Phone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=14
numid=31,iface=MIXER,name='Aux Playback Headphone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=33,iface=MIXER,name='Aux Playback Phone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=32,iface=MIXER,name='Aux Playback Speaker Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=9,iface=MIXER,name='Mono Playback ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=11,iface=MIXER,name='Mono Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=10,iface=MIXER,name='Mono Playback Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=0
numid=36,iface=MIXER,name='Capture 20dB Boost Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=47,iface=MIXER,name='Capture ADC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=81,iface=MIXER,name='Capture Phone Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Stereo'
  ; Item #1 'Left'
  ; Item #2 'Right'
  ; Item #3 'Mute'
  : values=3
numid=50,iface=MIXER,name='Capture ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=37,iface=MIXER,name='Capture to Phone 20dB Boost Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=49,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=63,step=0
  : values=13,13
numid=48,iface=MIXER,name='Capture Volume Steps'
  ; type=ENUMERATED,access=rw------,values=2,items=2
  ; Item #0 '+1.5dB Steps'
  ; Item #1 '+0.75dB Steps'
  : values=1,1
numid=44,iface=MIXER,name='Playback Attenuate (-6dB) Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=39,iface=MIXER,name='3D Lower Cut-off Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=40,iface=MIXER,name='3D Playback Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=38,iface=MIXER,name='3D Upper Cut-off Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=15,iface=MIXER,name='ALC Attack Time'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=14,iface=MIXER,name='ALC Decay Time'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=16,iface=MIXER,name='ALC Function'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'None'
  ; Item #1 'Left'
  ; Item #2 'Right'
  ; Item #3 'Stereo'
  : values=0
numid=24,iface=MIXER,name='ALC Headphone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=13,iface=MIXER,name='ALC Hold Time'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=17,iface=MIXER,name='ALC Max Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=20,iface=MIXER,name='ALC NG Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=22,iface=MIXER,name='ALC NG Threshold'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=0
numid=21,iface=MIXER,name='ALC NG Type'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Constant Gain'
  ; Item #1 'Mute'
  : values=1
numid=84,iface=MIXER,name='ALC Sidetone Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Stereo'
  ; Item #1 'Left'
  ; Item #2 'Right'
  ; Item #3 'None'
  : values=0
numid=12,iface=MIXER,name='ALC Target Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=19,iface=MIXER,name='ALC ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=18,iface=MIXER,name='ALC ZC Timeout'
  ; type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
  : values=0
numid=41,iface=MIXER,name='Bass Control'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Linear Control'
  ; Item #1 'Adaptive Boost'
  : values=0
numid=42,iface=MIXER,name='Bass Cut-off Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=45,iface=MIXER,name='Bass Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=77,iface=MIXER,name='Differential Source'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Mic'
  ; Item #1 'Line'
  : values=0
numid=80,iface=MIXER,name='Left Capture Select'
  ; type=ENUMERATED,access=rw------,values=1,items=8
  ; Item #0 'Mic'
  ; Item #1 'NC'
  ; Item #2 'NC'
  ; Item #3 'Speaker Mixer'
  ; Item #4 'Line'
  ; Item #5 'Headphone Mixer'
  ; Item #6 'Phone Mixer'
  ; Item #7 'Phone'
  : values=1
numid=72,iface=MIXER,name='Left HP Mixer Aux Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=74,iface=MIXER,name='Left HP Mixer Line Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=76,iface=MIXER,name='Left HP Mixer Mic Sidetone Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=71,iface=MIXER,name='Left HP Mixer PCBeep Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=75,iface=MIXER,name='Left HP Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=73,iface=MIXER,name='Left HP Mixer Phone Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=83,iface=MIXER,name='Out3 Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Left'
  ; Item #1 'VREF'
  ; Item #2 'Left + Right'
  ; Item #3 'Mono'
  : values=3
numid=25,iface=MIXER,name='Out3 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=27,iface=MIXER,name='Out3 Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=0
numid=26,iface=MIXER,name='Out3 ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=28,iface=MIXER,name='PCBeep Bypass Headphone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=30,iface=MIXER,name='PCBeep Bypass Phone Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=29,iface=MIXER,name='PCBeep Bypass Speaker Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=79,iface=MIXER,name='Right Capture Select'
  ; type=ENUMERATED,access=rw------,values=1,items=8
  ; Item #0 'Mic'
  ; Item #1 'NC'
  ; Item #2 'NC'
  ; Item #3 'Speaker Mixer'
  ; Item #4 'Line'
  ; Item #5 'Headphone Mixer'
  ; Item #6 'Phone Mixer'
  ; Item #7 'Phone'
  : values=1
numid=66,iface=MIXER,name='Right HP Mixer Aux Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=68,iface=MIXER,name='Right HP Mixer Line Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=70,iface=MIXER,name='Right HP Mixer Mic Sidetone Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=65,iface=MIXER,name='Right HP Mixer PCBeep Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=69,iface=MIXER,name='Right HP Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=67,iface=MIXER,name='Right HP Mixer Phone Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=55,iface=MIXER,name='Speaker Mixer Aux Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=57,iface=MIXER,name='Speaker Mixer Line Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=54,iface=MIXER,name='Speaker Mixer PCBeep Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=58,iface=MIXER,name='Speaker Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=56,iface=MIXER,name='Speaker Mixer Phone Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=82,iface=MIXER,name='Speaker Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Speaker Mix'
  ; Item #1 'Headphone Mix'
  : values=0
numid=7,iface=MIXER,name='Speaker Playback Invert Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=2,iface=MIXER,name='Speaker Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=1,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
  : values=6,6
numid=6,iface=MIXER,name='Speaker Playback ZC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=43,iface=MIXER,name='Tone Cut-off Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=46,iface=MIXER,name='Treble Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=9

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-25 20:07 ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Christoph Fritz
@ 2012-04-26 10:15 ` Christoph Fritz
  2012-04-26 11:27 ` Mark Brown
  1 sibling, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-04-26 10:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood


update:
 "Item: Differential Source" in alsamixer can't be changed too. Maybe
Sascha has any ideas?

 Thanks,
   -- Christoph

On Wed, 2012-04-25 at 22:07 +0200, Christoph Fritz wrote:
> Hi Mark, Liam, Hans J. and List,
> 
>  I have a "wm9712" codec-chip on an ARM mx35 board and everything works
> except Microphone.
> 
> Strange is that I can't change the Mic-Select-Source:
> 
> # amixer sset "Mic Select Source" 'Mic 2'
> Simple mixer control 'Mic Select Source',0
>   Capabilities: enum
>   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
>   Item0: 'Mic 1'
> 
> When I tested arecord for line-in, the "Capture Slide" in alsamixer was
> wrongly inverted.
> in sound/soc/codecs/wm9712.c:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
> should get:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
> If you want I can send a patch in.
> 
> I'm using the current linus git tree (3.4.0-rc4). I tried it with
> linux-2.6.33.20 (with sound/soc/imx/imx-ssi.c etc. from 2.6.34) and it
> works. On a fairly similar board I was told that it works on Kernel
> 3.0.4 with this patch applied:
> 
> Since patch "ASoC: Sync initial widget state with hardware"
> (commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture doesn't
> work. The MICBIAS bit from the "Power Management" Register are alway 1 (disabled).
> So that the captering works the active status must be set to 1, at the right time.
> That this works the stream name must be set.
> ---
>  include/sound/soc-dapm.h |    3 ++-
>  sound/soc/soc-dapm.c     |    4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
> index c46e7d8..308122a 100644
> --- a/include/sound/soc-dapm.h
> +++ b/include/sound/soc-dapm.h
> @@ -85,7 +85,8 @@
>  	.shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \
>  	.num_kcontrols = wncontrols}
>  #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
> -{	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
> +{	.id = snd_soc_dapm_micbias, .name = wname, .sname = \
> +	"Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \
>  	.invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0}
>  #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \
>  {	.id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 32ab7fc..250a1d2 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -646,7 +646,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget)
>  			return snd_soc_dapm_suspend_check(widget);
>  
>  		/* connected VMID/Bias for lower pops */
> -		if (widget->id == snd_soc_dapm_vmid)
> +		if (widget->id == snd_soc_dapm_vmid || widget->id == snd_soc_dapm_micbias)
>  			return snd_soc_dapm_suspend_check(widget);
>  
>  		/* connected jack ? */
> @@ -1835,6 +1835,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
>  			break;
>  		case snd_soc_dapm_adc:
>  		case snd_soc_dapm_aif_out:
> +		case snd_soc_dapm_micbias:
>  			w->power_check = dapm_adc_check_power;
>  			break;
>  		case snd_soc_dapm_dac:
> @@ -1848,7 +1849,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
>  			break;
>  		case snd_soc_dapm_input:
>  		case snd_soc_dapm_output:
> -		case snd_soc_dapm_micbias:
>  		case snd_soc_dapm_spk:
>  		case snd_soc_dapm_hp:
>  		case snd_soc_dapm_mic:
> --
> 
> 
>  Thanks,
>    -- Christoph
> 
> 
> It follows the output of "amixer scontents", "amixer controls" and
> "amixer contents":
> 
> Simple mixer control 'Headphone',0
>   Capabilities: pvolume pswitch pswitch-joined penum
>   Playback channels: Front Left - Front Right
>   Limits: Playback 0 - 31
>   Mono:
>   Front Left: Playback 20 [65%] [on]
>   Front Right: Playback 20 [65%] [on]
> Simple mixer control 'Headphone Playback ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker',0
>   Capabilities: pvolume pswitch pswitch-joined penum
>   Playback channels: Front Left - Front Right
>   Limits: Playback 0 - 31
>   Mono:
>   Front Left: Playback 6 [19%] [off]
>   Front Right: Playback 6 [19%] [off]
> Simple mixer control 'Speaker Mixer Aux',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Mixer Line Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Mixer PCBeep Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Mixer PCM',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Mixer Phone Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Mux',0
>   Capabilities: enum
>   Items: 'Speaker Mix' 'Headphone Mix'
>   Item0: 'Speaker Mix'
> Simple mixer control 'Speaker Playback Invert',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Speaker Playback ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Tone Cut-off',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Bass',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 0 [0%]
> Simple mixer control 'Bass Control',0
>   Capabilities: enum
>   Items: 'Linear Control' 'Adaptive Boost'
>   Item0: 'Linear Control'
> Simple mixer control 'Bass Cut-off',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Treble',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 9 [60%]
> Simple mixer control 'PCM',0
>   Capabilities: pvolume penum
>   Playback channels: Front Left - Front Right
>   Limits: Playback 0 - 31
>   Mono:
>   Front Left: Playback 17 [55%]
>   Front Right: Playback 17 [55%]
> Simple mixer control 'Line',0
>   Capabilities: cvolume penum
>   Capture channels: Front Left - Front Right
>   Limits: Capture 0 - 31
>   Front Left: Capture 23 [74%]
>   Front Right: Capture 23 [74%]
> Simple mixer control 'Mic 1',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 31
>   Mono: 23 [74%] [0.00dB]
> Simple mixer control 'Mic 2',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 31
>   Mono: 18 [58%] [-7.50dB]
> Simple mixer control 'Mic Boost',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 1
>   Mono: 0 [0%] [0.00dB]
> Simple mixer control 'Mic Headphone ',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 3 [43%]
> Simple mixer control 'Mic Select Source',0
>   Capabilities: enum
>   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
>   Item0: 'Mic 1'
> Simple mixer control 'Phone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 14 [93%]
> Simple mixer control 'Phone Mixer Aux',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Phone Mixer Line Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Phone Mixer Mic 1 Sidetone',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Phone Mixer Mic 2 Sidetone',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Phone Mixer PCBeep Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Phone Mixer PCM',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Aux Playback Headphone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'Aux Playback Phone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'Aux Playback Speaker',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'Mono',0
>   Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
>   Playback channels: Mono
>   Limits: Playback 0 - 31
>   Mono: Playback 0 [0%] [off]
> Simple mixer control 'Mono Playback ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Playback Attenuate (-6dB)',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Capture',0
>   Capabilities: cvolume penum
>   Capture channels: Front Left - Front Right
>   Limits: Capture 0 - 63
>   Front Left: Capture 13 [21%]
>   Front Right: Capture 13 [21%]
> Simple mixer control 'Capture 20dB Boost',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Capture ADC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Capture Phone Mux',0
>   Capabilities: enum
>   Items: 'Stereo' 'Left' 'Right' 'Mute'
>   Item0: 'Mute'
> Simple mixer control 'Capture Volume Steps',0
>   Capabilities: enum
>   Items: '+1.5dB Steps' '+0.75dB Steps'
>   Item0: '+0.75dB Steps'
>   Item1: '+0.75dB Steps'
> Simple mixer control 'Capture ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Capture to Phone 20dB Boost',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control '3D',0
>   Capabilities: pvolume pvolume-joined penum
>   Playback channels: Mono
>   Limits: Playback 0 - 15
>   Mono: Playback 0 [0%]
> Simple mixer control '3D Lower Cut-off',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control '3D Upper Cut-off',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'ALC Attack Time',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 0 [0%]
> Simple mixer control 'ALC Decay Time',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 0 [0%]
> Simple mixer control 'ALC Function',0
>   Capabilities: enum
>   Items: 'None' 'Left' 'Right' 'Stereo'
>   Item0: 'None'
> Simple mixer control 'ALC Headphone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'ALC Hold Time',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 0 [0%]
> Simple mixer control 'ALC Max',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'ALC NG',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'ALC NG Threshold',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 31
>   Mono: 0 [0%]
> Simple mixer control 'ALC NG Type',0
>   Capabilities: enum
>   Items: 'Constant Gain' 'Mute'
>   Item0: 'Mute'
> Simple mixer control 'ALC Sidetone Mux',0
>   Capabilities: enum
>   Items: 'Stereo' 'Left' 'Right' 'None'
>   Item0: 'Stereo'
> Simple mixer control 'ALC Target',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 15
>   Mono: 0 [0%]
> Simple mixer control 'ALC ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'ALC ZC Timeout',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 3
>   Mono: 0 [0%]
> Simple mixer control 'Differential Source',0
>   Capabilities: enum
>   Items: 'Mic' 'Line'
>   Item0: 'Mic'
> Simple mixer control 'Left Capture Select',0
>   Capabilities: enum
>   Items: 'Mic' 'NC' 'NC' 'Speaker Mixer' 'Line' 'Headphone Mixer' 'Phone
> Mixer' 'Phone'
>   Item0: 'NC'
> Simple mixer control 'Left HP Mixer Aux',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Left HP Mixer Line Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Left HP Mixer Mic Sidetone',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Left HP Mixer PCBeep Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Left HP Mixer PCM',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Left HP Mixer Phone Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Out3',0
>   Capabilities: volume volume-joined pswitch pswitch-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 31
>   Mono: 0 [0%] Playback [off]
> Simple mixer control 'Out3 Mux',0
>   Capabilities: enum
>   Items: 'Left' 'VREF' 'Left + Right' 'Mono'
>   Item0: 'Mono'
> Simple mixer control 'Out3 ZC',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'PCBeep Bypass Headphone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'PCBeep Bypass Phone',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'PCBeep Bypass Speaker',0
>   Capabilities: volume volume-joined penum
>   Playback channels: Mono
>   Capture channels: Mono
>   Limits: 0 - 7
>   Mono: 0 [0%]
> Simple mixer control 'Right Capture Select',0
>   Capabilities: enum
>   Items: 'Mic' 'NC' 'NC' 'Speaker Mixer' 'Line' 'Headphone Mixer' 'Phone
> Mixer' 'Phone'
>   Item0: 'NC'
> Simple mixer control 'Right HP Mixer Aux',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Right HP Mixer Line Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Right HP Mixer Mic Sidetone',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Right HP Mixer PCBeep Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> Simple mixer control 'Right HP Mixer PCM',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> Simple mixer control 'Right HP Mixer Phone Bypass',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [off]
> numid=8,iface=MIXER,name='Headphone Playback ZC Switch'
> numid=4,iface=MIXER,name='Headphone Playback Switch'
> numid=3,iface=MIXER,name='Headphone Playback Volume'
> numid=5,iface=MIXER,name='PCM Playback Volume'
> numid=35,iface=MIXER,name='Line Capture Volume'
> numid=51,iface=MIXER,name='Mic 1 Volume'
> numid=52,iface=MIXER,name='Mic 2 Volume'
> numid=53,iface=MIXER,name='Mic Boost Volume'
> numid=23,iface=MIXER,name='Mic Headphone  Volume'
> numid=78,iface=MIXER,name='Mic Select Source'
> numid=60,iface=MIXER,name='Phone Mixer Aux Playback Switch'
> numid=61,iface=MIXER,name='Phone Mixer Line Bypass Switch'
> numid=63,iface=MIXER,name='Phone Mixer Mic 1 Sidetone Switch'
> numid=64,iface=MIXER,name='Phone Mixer Mic 2 Sidetone Switch'
> numid=59,iface=MIXER,name='Phone Mixer PCBeep Bypass Switch'
> numid=62,iface=MIXER,name='Phone Mixer PCM Playback Switch'
> numid=34,iface=MIXER,name='Phone Volume'
> numid=31,iface=MIXER,name='Aux Playback Headphone Volume'
> numid=33,iface=MIXER,name='Aux Playback Phone Volume'
> numid=32,iface=MIXER,name='Aux Playback Speaker Volume'
> numid=9,iface=MIXER,name='Mono Playback ZC Switch'
> numid=11,iface=MIXER,name='Mono Playback Switch'
> numid=10,iface=MIXER,name='Mono Playback Volume'
> numid=36,iface=MIXER,name='Capture 20dB Boost Switch'
> numid=47,iface=MIXER,name='Capture ADC Switch'
> numid=81,iface=MIXER,name='Capture Phone Mux'
> numid=50,iface=MIXER,name='Capture ZC Switch'
> numid=37,iface=MIXER,name='Capture to Phone 20dB Boost Switch'
> numid=49,iface=MIXER,name='Capture Volume'
> numid=48,iface=MIXER,name='Capture Volume Steps'
> numid=44,iface=MIXER,name='Playback Attenuate (-6dB) Switch'
> numid=39,iface=MIXER,name='3D Lower Cut-off Switch'
> numid=40,iface=MIXER,name='3D Playback Volume'
> numid=38,iface=MIXER,name='3D Upper Cut-off Switch'
> numid=15,iface=MIXER,name='ALC Attack Time'
> numid=14,iface=MIXER,name='ALC Decay Time'
> numid=16,iface=MIXER,name='ALC Function'
> numid=24,iface=MIXER,name='ALC Headphone Volume'
> numid=13,iface=MIXER,name='ALC Hold Time'
> numid=17,iface=MIXER,name='ALC Max Volume'
> numid=20,iface=MIXER,name='ALC NG Switch'
> numid=22,iface=MIXER,name='ALC NG Threshold'
> numid=21,iface=MIXER,name='ALC NG Type'
> numid=84,iface=MIXER,name='ALC Sidetone Mux'
> numid=12,iface=MIXER,name='ALC Target Volume'
> numid=19,iface=MIXER,name='ALC ZC Switch'
> numid=18,iface=MIXER,name='ALC ZC Timeout'
> numid=41,iface=MIXER,name='Bass Control'
> numid=42,iface=MIXER,name='Bass Cut-off Switch'
> numid=45,iface=MIXER,name='Bass Volume'
> numid=77,iface=MIXER,name='Differential Source'
> numid=80,iface=MIXER,name='Left Capture Select'
> numid=72,iface=MIXER,name='Left HP Mixer Aux Playback Switch'
> numid=74,iface=MIXER,name='Left HP Mixer Line Bypass Switch'
> numid=76,iface=MIXER,name='Left HP Mixer Mic Sidetone Switch'
> numid=71,iface=MIXER,name='Left HP Mixer PCBeep Bypass Switch'
> numid=75,iface=MIXER,name='Left HP Mixer PCM Playback Switch'
> numid=73,iface=MIXER,name='Left HP Mixer Phone Bypass Switch'
> numid=83,iface=MIXER,name='Out3 Mux'
> numid=25,iface=MIXER,name='Out3 Switch'
> numid=27,iface=MIXER,name='Out3 Volume'
> numid=26,iface=MIXER,name='Out3 ZC Switch'
> numid=28,iface=MIXER,name='PCBeep Bypass Headphone Volume'
> numid=30,iface=MIXER,name='PCBeep Bypass Phone Volume'
> numid=29,iface=MIXER,name='PCBeep Bypass Speaker Volume'
> numid=79,iface=MIXER,name='Right Capture Select'
> numid=66,iface=MIXER,name='Right HP Mixer Aux Playback Switch'
> numid=68,iface=MIXER,name='Right HP Mixer Line Bypass Switch'
> numid=70,iface=MIXER,name='Right HP Mixer Mic Sidetone Switch'
> numid=65,iface=MIXER,name='Right HP Mixer PCBeep Bypass Switch'
> numid=69,iface=MIXER,name='Right HP Mixer PCM Playback Switch'
> numid=67,iface=MIXER,name='Right HP Mixer Phone Bypass Switch'
> numid=55,iface=MIXER,name='Speaker Mixer Aux Playback Switch'
> numid=57,iface=MIXER,name='Speaker Mixer Line Bypass Switch'
> numid=54,iface=MIXER,name='Speaker Mixer PCBeep Bypass Switch'
> numid=58,iface=MIXER,name='Speaker Mixer PCM Playback Switch'
> numid=56,iface=MIXER,name='Speaker Mixer Phone Bypass Switch'
> numid=82,iface=MIXER,name='Speaker Mux'
> numid=7,iface=MIXER,name='Speaker Playback Invert Switch'
> numid=2,iface=MIXER,name='Speaker Playback Switch'
> numid=1,iface=MIXER,name='Speaker Playback Volume'
> numid=6,iface=MIXER,name='Speaker Playback ZC Switch'
> numid=43,iface=MIXER,name='Tone Cut-off Switch'
> numid=46,iface=MIXER,name='Treble Volume'
> numid=8,iface=MIXER,name='Headphone Playback ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=4,iface=MIXER,name='Headphone Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=3,iface=MIXER,name='Headphone Playback Volume'
>   ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
>   : values=20,20
> numid=5,iface=MIXER,name='PCM Playback Volume'
>   ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
>   : values=17,17
> numid=35,iface=MIXER,name='Line Capture Volume'
>   ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
>   : values=23,23
> numid=51,iface=MIXER,name='Mic 1 Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
>   : values=23
>   | dBscale-min=-34.50dB,step=1.50dB,mute=0
> numid=52,iface=MIXER,name='Mic 2 Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
>   : values=18
>   | dBscale-min=-34.50dB,step=1.50dB,mute=0
> numid=53,iface=MIXER,name='Mic Boost Volume'
>   ; type=INTEGER,access=rw---R--,values=1,min=0,max=1,step=0
>   : values=0
>   | dBscale-min=0.00dB,step=20.00dB,mute=0
> numid=23,iface=MIXER,name='Mic Headphone  Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=3
> numid=78,iface=MIXER,name='Mic Select Source'
>   ; type=ENUMERATED,access=rw------,values=1,items=4
>   ; Item #0 'Mic 1'
>   ; Item #1 'Differential'
>   ; Item #2 'Mic 2'
>   ; Item #3 'Stereo'
>   : values=0
> numid=60,iface=MIXER,name='Phone Mixer Aux Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=61,iface=MIXER,name='Phone Mixer Line Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=63,iface=MIXER,name='Phone Mixer Mic 1 Sidetone Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=64,iface=MIXER,name='Phone Mixer Mic 2 Sidetone Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=59,iface=MIXER,name='Phone Mixer PCBeep Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=62,iface=MIXER,name='Phone Mixer PCM Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=34,iface=MIXER,name='Phone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=14
> numid=31,iface=MIXER,name='Aux Playback Headphone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=33,iface=MIXER,name='Aux Playback Phone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=32,iface=MIXER,name='Aux Playback Speaker Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=9,iface=MIXER,name='Mono Playback ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=11,iface=MIXER,name='Mono Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=10,iface=MIXER,name='Mono Playback Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
>   : values=0
> numid=36,iface=MIXER,name='Capture 20dB Boost Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=47,iface=MIXER,name='Capture ADC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=81,iface=MIXER,name='Capture Phone Mux'
>   ; type=ENUMERATED,access=rw------,values=1,items=4
>   ; Item #0 'Stereo'
>   ; Item #1 'Left'
>   ; Item #2 'Right'
>   ; Item #3 'Mute'
>   : values=3
> numid=50,iface=MIXER,name='Capture ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=37,iface=MIXER,name='Capture to Phone 20dB Boost Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=49,iface=MIXER,name='Capture Volume'
>   ; type=INTEGER,access=rw------,values=2,min=0,max=63,step=0
>   : values=13,13
> numid=48,iface=MIXER,name='Capture Volume Steps'
>   ; type=ENUMERATED,access=rw------,values=2,items=2
>   ; Item #0 '+1.5dB Steps'
>   ; Item #1 '+0.75dB Steps'
>   : values=1,1
> numid=44,iface=MIXER,name='Playback Attenuate (-6dB) Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=39,iface=MIXER,name='3D Lower Cut-off Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=40,iface=MIXER,name='3D Playback Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=38,iface=MIXER,name='3D Upper Cut-off Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=15,iface=MIXER,name='ALC Attack Time'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=14,iface=MIXER,name='ALC Decay Time'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=16,iface=MIXER,name='ALC Function'
>   ; type=ENUMERATED,access=rw------,values=1,items=4
>   ; Item #0 'None'
>   ; Item #1 'Left'
>   ; Item #2 'Right'
>   ; Item #3 'Stereo'
>   : values=0
> numid=24,iface=MIXER,name='ALC Headphone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=13,iface=MIXER,name='ALC Hold Time'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=17,iface=MIXER,name='ALC Max Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=20,iface=MIXER,name='ALC NG Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=22,iface=MIXER,name='ALC NG Threshold'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
>   : values=0
> numid=21,iface=MIXER,name='ALC NG Type'
>   ; type=ENUMERATED,access=rw------,values=1,items=2
>   ; Item #0 'Constant Gain'
>   ; Item #1 'Mute'
>   : values=1
> numid=84,iface=MIXER,name='ALC Sidetone Mux'
>   ; type=ENUMERATED,access=rw------,values=1,items=4
>   ; Item #0 'Stereo'
>   ; Item #1 'Left'
>   ; Item #2 'Right'
>   ; Item #3 'None'
>   : values=0
> numid=12,iface=MIXER,name='ALC Target Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=19,iface=MIXER,name='ALC ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=18,iface=MIXER,name='ALC ZC Timeout'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
>   : values=0
> numid=41,iface=MIXER,name='Bass Control'
>   ; type=ENUMERATED,access=rw------,values=1,items=2
>   ; Item #0 'Linear Control'
>   ; Item #1 'Adaptive Boost'
>   : values=0
> numid=42,iface=MIXER,name='Bass Cut-off Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=45,iface=MIXER,name='Bass Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=0
> numid=77,iface=MIXER,name='Differential Source'
>   ; type=ENUMERATED,access=rw------,values=1,items=2
>   ; Item #0 'Mic'
>   ; Item #1 'Line'
>   : values=0
> numid=80,iface=MIXER,name='Left Capture Select'
>   ; type=ENUMERATED,access=rw------,values=1,items=8
>   ; Item #0 'Mic'
>   ; Item #1 'NC'
>   ; Item #2 'NC'
>   ; Item #3 'Speaker Mixer'
>   ; Item #4 'Line'
>   ; Item #5 'Headphone Mixer'
>   ; Item #6 'Phone Mixer'
>   ; Item #7 'Phone'
>   : values=1
> numid=72,iface=MIXER,name='Left HP Mixer Aux Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=74,iface=MIXER,name='Left HP Mixer Line Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=76,iface=MIXER,name='Left HP Mixer Mic Sidetone Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=71,iface=MIXER,name='Left HP Mixer PCBeep Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=75,iface=MIXER,name='Left HP Mixer PCM Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=73,iface=MIXER,name='Left HP Mixer Phone Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=83,iface=MIXER,name='Out3 Mux'
>   ; type=ENUMERATED,access=rw------,values=1,items=4
>   ; Item #0 'Left'
>   ; Item #1 'VREF'
>   ; Item #2 'Left + Right'
>   ; Item #3 'Mono'
>   : values=3
> numid=25,iface=MIXER,name='Out3 Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=27,iface=MIXER,name='Out3 Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
>   : values=0
> numid=26,iface=MIXER,name='Out3 ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=28,iface=MIXER,name='PCBeep Bypass Headphone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=30,iface=MIXER,name='PCBeep Bypass Phone Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=29,iface=MIXER,name='PCBeep Bypass Speaker Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
>   : values=0
> numid=79,iface=MIXER,name='Right Capture Select'
>   ; type=ENUMERATED,access=rw------,values=1,items=8
>   ; Item #0 'Mic'
>   ; Item #1 'NC'
>   ; Item #2 'NC'
>   ; Item #3 'Speaker Mixer'
>   ; Item #4 'Line'
>   ; Item #5 'Headphone Mixer'
>   ; Item #6 'Phone Mixer'
>   ; Item #7 'Phone'
>   : values=1
> numid=66,iface=MIXER,name='Right HP Mixer Aux Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=68,iface=MIXER,name='Right HP Mixer Line Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=70,iface=MIXER,name='Right HP Mixer Mic Sidetone Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=65,iface=MIXER,name='Right HP Mixer PCBeep Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=69,iface=MIXER,name='Right HP Mixer PCM Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=on
> numid=67,iface=MIXER,name='Right HP Mixer Phone Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=55,iface=MIXER,name='Speaker Mixer Aux Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=57,iface=MIXER,name='Speaker Mixer Line Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=54,iface=MIXER,name='Speaker Mixer PCBeep Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=58,iface=MIXER,name='Speaker Mixer PCM Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=56,iface=MIXER,name='Speaker Mixer Phone Bypass Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=82,iface=MIXER,name='Speaker Mux'
>   ; type=ENUMERATED,access=rw------,values=1,items=2
>   ; Item #0 'Speaker Mix'
>   ; Item #1 'Headphone Mix'
>   : values=0
> numid=7,iface=MIXER,name='Speaker Playback Invert Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=2,iface=MIXER,name='Speaker Playback Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=1,iface=MIXER,name='Speaker Playback Volume'
>   ; type=INTEGER,access=rw------,values=2,min=0,max=31,step=0
>   : values=6,6
> numid=6,iface=MIXER,name='Speaker Playback ZC Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=43,iface=MIXER,name='Tone Cut-off Switch'
>   ; type=BOOLEAN,access=rw------,values=1
>   : values=off
> numid=46,iface=MIXER,name='Treble Volume'
>   ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
>   : values=9
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-25 20:07 ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Christoph Fritz
  2012-04-26 10:15 ` Christoph Fritz
@ 2012-04-26 11:27 ` Mark Brown
  2012-04-26 13:49   ` Christoph Fritz
  1 sibling, 1 reply; 27+ messages in thread
From: Mark Brown @ 2012-04-26 11:27 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: alsa-devel, Hans J. Koch, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 1660 bytes --]

On Wed, Apr 25, 2012 at 10:07:49PM +0200, Christoph Fritz wrote:

> # amixer sset "Mic Select Source" 'Mic 2'
> Simple mixer control 'Mic Select Source',0
>   Capabilities: enum
>   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
>   Item0: 'Mic 1'

Nothing springing to mind here, can you see logging for the register
writes?

> When I tested arecord for line-in, the "Capture Slide" in alsamixer was
> wrongly inverted.
> in sound/soc/codecs/wm9712.c:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
> should get:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
> If you want I can send a patch in.

Yes, please.  In general this is always a good thing to do if you spot
an error in the code.

> Since patch "ASoC: Sync initial widget state with hardware"
> (commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture doesn't
> work. The MICBIAS bit from the "Power Management" Register are alway 1 (disabled).
> So that the captering works the active status must be set to 1, at the right time.
> That this works the stream name must be set.

This analysis seems a bit confused - how does changing the initial state
affect the dynamic changes at runtime?

>  #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
> -{	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
> +{	.id = snd_soc_dapm_micbias, .name = wname, .sname = \
> +	"Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \

This isn't right, the mic bias clearly shouldn't be associated with a
stream as you can do capture without microphone (eg, from a line input)
and you can have a bypass path with no capture.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-26 11:27 ` Mark Brown
@ 2012-04-26 13:49   ` Christoph Fritz
  2012-04-26 17:20     ` Mark Brown
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Fritz @ 2012-04-26 13:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood

On Thu, 2012-04-26 at 12:27 +0100, Mark Brown wrote:
> On Wed, Apr 25, 2012 at 10:07:49PM +0200, Christoph Fritz wrote:
> 
> > # amixer sset "Mic Select Source" 'Mic 2'
> > Simple mixer control 'Mic Select Source',0
> >   Capabilities: enum
> >   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
> >   Item0: 'Mic 1'
> 
> Nothing springing to mind here, can you see logging for the register
> writes?

I added some printks into ac97_write() "sound/soc/codecs/wm9712.c" and
when I do for example change "Item: Mic Boost [dB gain: 20.00] " I get
this:

 write  eh 8000  [6808]
 write  eh 8000  [6888]

but when I try to change "Mic Select Source" or "Item: Differential
Source", nothing happens here.

And in "sound/soc/codecs/wm9712.c":

static const struct soc_enum wm9712_enum[] = {
SOC_ENUM_SINGLE(AC97_PCI_SVID, 14, 4, wm9712_alc_select),
SOC_ENUM_SINGLE(AC97_VIDEO, 12, 4, wm9712_alc_mux),
SOC_ENUM_SINGLE(AC97_AUX, 9, 4, wm9712_out3_src),
SOC_ENUM_SINGLE(AC97_AUX, 8, 2, wm9712_spk_src),
SOC_ENUM_SINGLE(AC97_REC_SEL, 12, 4, wm9712_rec_adc),
SOC_ENUM_SINGLE(AC97_MASTER_TONE, 15, 2, wm9712_base),
SOC_ENUM_DOUBLE(AC97_REC_GAIN, 14, 6, 2, wm9712_rec_gain),
SOC_ENUM_SINGLE(AC97_MIC, 5, 4, wm9712_mic),
SOC_ENUM_SINGLE(AC97_REC_SEL, 8, 8, wm9712_rec_sel),
SOC_ENUM_SINGLE(AC97_REC_SEL, 0, 8, wm9712_rec_sel),
SOC_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9712_ng_type),
SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel),
};

Why is wm9712_enum[0] never used?

Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
the ">> 1" shift in ac97_write() ?


Thanks,
 -- Christoph


> 
> > When I tested arecord for line-in, the "Capture Slide" in alsamixer
was
> > wrongly inverted.
> > in sound/soc/codecs/wm9712.c:
> >        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
> > should get:
> >        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
> > If you want I can send a patch in.
> 
> Yes, please.  In general this is always a good thing to do if you spot
> an error in the code.
> 
> > Since patch "ASoC: Sync initial widget state with hardware"
> > (commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture
doesn't
> > work. The MICBIAS bit from the "Power Management" Register are alway
1 (disabled).
> > So that the captering works the active status must be set to 1, at
the right time.
> > That this works the stream name must be set.
> 
> This analysis seems a bit confused - how does changing the initial
state
> affect the dynamic changes at runtime?
> 
> >  #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
> > -{  .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift =
wshift, \
> > +{  .id = snd_soc_dapm_micbias, .name = wname, .sname = \
> > +   "Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \
> 
> This isn't right, the mic bias clearly shouldn't be associated with a
> stream as you can do capture without microphone (eg, from a line
input)
> and you can have a bypass path with no capture.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-26 13:49   ` Christoph Fritz
@ 2012-04-26 17:20     ` Mark Brown
  2012-04-26 21:11       ` Christoph Fritz
  0 siblings, 1 reply; 27+ messages in thread
From: Mark Brown @ 2012-04-26 17:20 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 742 bytes --]

On Thu, Apr 26, 2012 at 03:49:02PM +0200, Christoph Fritz wrote:

> I added some printks into ac97_write() "sound/soc/codecs/wm9712.c" and
> when I do for example change "Item: Mic Boost [dB gain: 20.00] " I get
> this:

>  write  eh 8000  [6808]
>  write  eh 8000  [6888]

> but when I try to change "Mic Select Source" or "Item: Differential
> Source", nothing happens here.

Odd.  Can you see the write actually happening on the bus?

> Why is wm9712_enum[0] never used?

I rather imagine it's just a simple case of the feature having being
missed when the driver was implemented.

> Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
> the ">> 1" shift in ac97_write() ?

What makes you think it might not be correct?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-26 17:20     ` Mark Brown
@ 2012-04-26 21:11       ` Christoph Fritz
  2012-04-26 21:37         ` Mark Brown
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Fritz @ 2012-04-26 21:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood

On Thu, 2012-04-26 at 18:20 +0100, Mark Brown wrote:
> On Thu, Apr 26, 2012 at 03:49:02PM +0200, Christoph Fritz wrote:
> 
> > I added some printks into ac97_write() "sound/soc/codecs/wm9712.c" and
> > when I do for example change "Item: Mic Boost [dB gain: 20.00] " I get
> > this:
> 
> >  write  eh 8000  [6808]
> >  write  eh 8000  [6888]
> 
> > but when I try to change "Mic Select Source" or "Item: Differential
> > Source", nothing happens here.
> 
> Odd.  Can you see the write actually happening on the bus?
> 

Not at the moment, I'll dig into this tomorrow.


> > Why is wm9712_enum[0] never used?
> 
> I rather imagine it's just a simple case of the feature having being
> missed when the driver was implemented.
> 
> > Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
> > the ">> 1" shift in ac97_write() ?
> 
> What makes you think it might not be correct?
> 

ac97_write() doesn't get called when I try to change "Item: Differential Source".

Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-26 21:11       ` Christoph Fritz
@ 2012-04-26 21:37         ` Mark Brown
  2012-04-27  8:00           ` Christoph Fritz
       [not found]           ` <20120430192258.GA15188@local>
  0 siblings, 2 replies; 27+ messages in thread
From: Mark Brown @ 2012-04-26 21:37 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 861 bytes --]

On Thu, Apr 26, 2012 at 11:11:33PM +0200, Christoph Fritz wrote:
> On Thu, 2012-04-26 at 18:20 +0100, Mark Brown wrote:
> > On Thu, Apr 26, 2012 at 03:49:02PM +0200, Christoph Fritz wrote:

> > > Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
> > > the ">> 1" shift in ac97_write() ?

> > What makes you think it might not be correct?

> ac97_write() doesn't get called when I try to change "Item: Differential Source".

Oh, right - you're not actually seeing any attempt to write.  There
won't be anything on the bus, then.  Still, why are you identifying the
shift there?  The write will be suppresed if the register contents don't
change which looks like what you're seeing here - though I can't see
anything obviously wrong with the enum from looking at the code, it's
saying that the enumeration exists in bit 8 of register 0x5c...

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-26 21:37         ` Mark Brown
@ 2012-04-27  8:00           ` Christoph Fritz
  2012-04-27 13:46             ` Mark Brown
       [not found]           ` <20120430192258.GA15188@local>
  1 sibling, 1 reply; 27+ messages in thread
From: Christoph Fritz @ 2012-04-27  8:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood

On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> On Thu, Apr 26, 2012 at 11:11:33PM +0200, Christoph Fritz wrote:
> > On Thu, 2012-04-26 at 18:20 +0100, Mark Brown wrote:
> > > On Thu, Apr 26, 2012 at 03:49:02PM +0200, Christoph Fritz wrote:
> 
> > > > Is "SOC_ENUM_SINGLE(0x5c, 8, 2, wm9712_diff_sel)," correct? Because of
> > > > the ">> 1" shift in ac97_write() ?
> 
> > > What makes you think it might not be correct?
> 
> > ac97_write() doesn't get called when I try to change "Item: Differential Source".
> 
> Oh, right - you're not actually seeing any attempt to write.  There
> won't be anything on the bus, then.  Still, why are you identifying the
> shift there?

The shift should be fine here.

>   The write will be suppresed if the register contents don't
> change which looks like what you're seeing here - 

Can you imagine why the registers don't change?

> though I can't see
> anything obviously wrong with the enum from looking at the code, it's
> saying that the enumeration exists in bit 8 of register 0x5c...

Yes I rechecked this too.


Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-27  8:00           ` Christoph Fritz
@ 2012-04-27 13:46             ` Mark Brown
  2012-05-04 13:28               ` Christoph Fritz
  0 siblings, 1 reply; 27+ messages in thread
From: Mark Brown @ 2012-04-27 13:46 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:

> >   The write will be suppresed if the register contents don't
> > change which looks like what you're seeing here - 

> Can you imagine why the registers don't change?

I can't immediately think of any reason, no - I'd step through or
annotate the code and have a look.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
       [not found]           ` <20120430192258.GA15188@local>
@ 2012-04-30 21:43             ` Mark Brown
       [not found]               ` <20120430234458.GB15188@local>
  0 siblings, 1 reply; 27+ messages in thread
From: Mark Brown @ 2012-04-30 21:43 UTC (permalink / raw)
  To: Hans J. Koch; +Cc: Christoph Fritz, alsa-devel, Sascha Hauer, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 1101 bytes --]

On Mon, Apr 30, 2012 at 09:40:55PM +0200, Hans J. Koch wrote:
> On Thu, Apr 26, 2012 at 10:37:45PM +0100, Mark Brown wrote:
> > On Thu, Apr 26, 2012 at 11:11:33PM +0200, Christoph Fritz wrote:

> > > ac97_write() doesn't get called when I try to change "Item: Differential Source".

> > Oh, right - you're not actually seeing any attempt to write.  There
> > won't be anything on the bus, then.  Still, why are you identifying the
> > shift there?  The write will be suppresed if the register contents don't
> > change which looks like what you're seeing here - though I can't see
> [...]

> I overlooked that one. What kind of horror show is that? It's definetly wrong
> to make any assumptions about hardware register contents. A low-level write
> function always has to write the given value to the given register. Everything
> else, like suppressing a write because you _think_ a register hasn't changed,
> will sooner or later lead to hard-to-find errors.

> Any performance optimizations have to take place on the highest possible level.

I'm not entirely sure you've looked at the code here...

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
       [not found]               ` <20120430234458.GB15188@local>
@ 2012-05-01 17:12                 ` Mark Brown
       [not found]                   ` <20120501200755.GF15188@local>
  0 siblings, 1 reply; 27+ messages in thread
From: Mark Brown @ 2012-05-01 17:12 UTC (permalink / raw)
  To: Hans J. Koch; +Cc: Christoph Fritz, alsa-devel, Sascha Hauer, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 666 bytes --]

On Tue, May 01, 2012 at 01:44:58AM +0200, Hans J. Koch wrote:
> On Mon, Apr 30, 2012 at 10:43:33PM +0100, Mark Brown wrote:

> > I'm not entirely sure you've looked at the code here...

> Oh yes, sorry. I got distracted by your mentioning of the suppressed writes.
> Actually, we have suppressed reads. ac97_read() does a "return cache[reg];"
> for most registers, assuming the hardware register cannot change after a
> ac97_write(). That might or might not be true, to me it looks dangerous.

The driver knows exactly which registers are volatile and takes
advantage of this - this is entirely idiomatic for devices like this and
not really that hard to get right.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
       [not found]                   ` <20120501200755.GF15188@local>
@ 2012-05-01 22:25                     ` Mark Brown
  0 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2012-05-01 22:25 UTC (permalink / raw)
  To: Hans J. Koch; +Cc: Christoph Fritz, alsa-devel, Sascha Hauer, Liam Girdwood

On Tue, May 01, 2012 at 10:07:57PM +0200, Hans J. Koch wrote:
> On Tue, May 01, 2012 at 06:12:07PM +0100, Mark Brown wrote:

> > The driver knows exactly which registers are volatile

> Then this is the first complex chip I've ever seen where the datasheet covers

That's...  horrifying, really.  The WM9712 really isn't at all complex
by modern standards for that matter, but the idea that it's common to
have devices with documented registers that might spontaneously change
in normal operation doesn't seem at all clever.  What happens if the
configuration that was set was important?

> all corner cases. And what about things like dirty supply voltages or EMI?

If you've got that sort of problem with supply quality or EMI there's
obviously a very serious system issue to contend with, one that
typically requires highly aggressive action to resolve - you're starting
to get into games like having to constantly poll the device and restart
it if you detect that it fell over which isn't pleasant and most likely
means you've already hit serious user visible consequences.  Things like
device initialisation will need to be redone, for example.  I can only
think of one driver that takes such measures, and it's actually relying
on restore from register cache for part of the recovery :)

That said, many devices will get a moderate degree of robustness against
this through power saving - the closer the device can get to cold during
idle the better from this point of view, and in many cases it's possible
to completely power down the device when idle.  A common idiom is to
take the device down to cold when idle then dump the setup changes that
don't need sequencing into the device from cache before doing the bits
that need sequencing, especially where many of the register settings can
be mapped direictly into userspace.

Indeed I'm not sure a cache isn't a bad plan for detecting this sort of
thing; if you find the cache values diverging from the physical values
for non-volatile registers you know something's up.

> Just to save a few clock cycles every now and then you happily accept the
> risk of the driver simply stop working after an unusual event, without
> any chances of recovery.

For the sort of devices we're talking about here it's way more than a
few clock cycles that are involved, you're talking about fairly slow
and at times congested buses like I2C here.  Never mind what happens
when someone decides to use a bigbanged controller, which is more common
than one might dream of.  Obviously if you're on a bus with trivial I/O
costs the tradeoffs vary but for the sort of buses we're talking about
it's much easier to see a win.

Indeed with many older devices readback just isn't physically supported
in the first place so if you want to do any kind of readback based thing
you're going to have to cache in some way.  This was true for the
majority of devices at the time WM9712 was new.

> Sound is not my usual playing ground, but at least I learned now why the
> sound system on my desktop refuses to work after a few days uptime...

I don't actually think desktop drivers bother with this much, though 
ICBW.  They relatively infrequently use the slow buses.  I'd suggest
reporting the issue, anyway - it's probably more constructive.

> Fortunately, most other subsystems would never accept such code for mainline.

This is actually a standard feature of the regmap API that drivers can
use if they want, there's a bunch of device classes where it can offer a
useful win (those that typically have slow control interfaces and not so
mnay volatile registers).

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-04-27 13:46             ` Mark Brown
@ 2012-05-04 13:28               ` Christoph Fritz
  2012-05-07 21:55                   ` Christoph Fritz
  0 siblings, 1 reply; 27+ messages in thread
From: Christoph Fritz @ 2012-05-04 13:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood

On Fri, Apr 27, 2012 at 02:46:39PM +0100, Mark Brown wrote:
> On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> > On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> 
> > >   The write will be suppresed if the register contents don't
> > > change which looks like what you're seeing here - 
> 
> > Can you imagine why the registers don't change?
> 
> I can't immediately think of any reason, no - I'd step through or
> annotate the code and have a look.

I'm still on.

And while testing WM9712 its touchpad interface, connecting a 800x600
display (instead of the default 640x480 one) results in a gone sound and
input-device - pretty queer:

WM9711/WM9712 SoC Audio Codec 0.4
asoc: platform pcm constructor failed
asoc: can't create pcm HiFi
asoc: failed to instantiate card PhyCORE-ac97-audio: -12

I have to admit that I used this time a 3.2 kernel. I'll test with
current later these days.


Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-05-04 13:28               ` Christoph Fritz
@ 2012-05-07 21:55                   ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-07 21:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Fri, May 04, 2012 at 03:28:45PM +0200, Christoph Fritz wrote:
> On Fri, Apr 27, 2012 at 02:46:39PM +0100, Mark Brown wrote:
> > On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> > > On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> > 
> > > >   The write will be suppresed if the register contents don't
> > > > change which looks like what you're seeing here - 
> > 
> > > Can you imagine why the registers don't change?
> > 
> > I can't immediately think of any reason, no - I'd step through or
> > annotate the code and have a look.
> 
> I'm still on.
> 
> And while testing WM9712 its touchpad interface, connecting a 800x600
> display (instead of the default 640x480 one) results in a gone sound and
> input-device - pretty queer:
> 
> WM9711/WM9712 SoC Audio Codec 0.4
> asoc: platform pcm constructor failed
> asoc: can't create pcm HiFi
> asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> 
> I have to admit that I used this time a 3.2 kernel. I'll test with
> current later these days.

Same behaviour with 3.4.0-rc6:

Framebuffer driver mx3fb configured for a 800x600 display:

  soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
  asoc: platform pcm constructor failed
  asoc: can't create pcm HiFi :-12
  asoc: failed to instantiate card PhyCORE-ac97-audio: -12


mx3fb configured for a 640x480 display:
  soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use
  snd_soc_register_card()
  asoc: wm9712-hifi <-> imx-ssi.0 mapping ok

 
Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
@ 2012-05-07 21:55                   ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-07 21:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Fri, May 04, 2012 at 03:28:45PM +0200, Christoph Fritz wrote:
> On Fri, Apr 27, 2012 at 02:46:39PM +0100, Mark Brown wrote:
> > On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> > > On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> > 
> > > >   The write will be suppresed if the register contents don't
> > > > change which looks like what you're seeing here - 
> > 
> > > Can you imagine why the registers don't change?
> > 
> > I can't immediately think of any reason, no - I'd step through or
> > annotate the code and have a look.
> 
> I'm still on.
> 
> And while testing WM9712 its touchpad interface, connecting a 800x600
> display (instead of the default 640x480 one) results in a gone sound and
> input-device - pretty queer:
> 
> WM9711/WM9712 SoC Audio Codec 0.4
> asoc: platform pcm constructor failed
> asoc: can't create pcm HiFi
> asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> 
> I have to admit that I used this time a 3.2 kernel. I'll test with
> current later these days.

Same behaviour with 3.4.0-rc6:

Framebuffer driver mx3fb configured for a 800x600 display:

  soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
  asoc: platform pcm constructor failed
  asoc: can't create pcm HiFi :-12
  asoc: failed to instantiate card PhyCORE-ac97-audio: -12


mx3fb configured for a 640x480 display:
  soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use
  snd_soc_register_card()
  asoc: wm9712-hifi <-> imx-ssi.0 mapping ok

 
Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
  2012-05-07 21:55                   ` Christoph Fritz
@ 2012-05-08 10:29                     ` Christoph Fritz
  -1 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-08 10:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Mon, May 07, 2012 at 11:55:06PM +0200, Christoph Fritz wrote:
> On Fri, May 04, 2012 at 03:28:45PM +0200, Christoph Fritz wrote:
> > On Fri, Apr 27, 2012 at 02:46:39PM +0100, Mark Brown wrote:
> > > On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> > > > On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> > > 
> > > > >   The write will be suppresed if the register contents don't
> > > > > change which looks like what you're seeing here - 
> > > 
> > > > Can you imagine why the registers don't change?
> > > 
> > > I can't immediately think of any reason, no - I'd step through or
> > > annotate the code and have a look.
> > 
> > I'm still on.
> > 
> > And while testing WM9712 its touchpad interface, connecting a 800x600
> > display (instead of the default 640x480 one) results in a gone sound and
> > input-device - pretty queer:
> > 
> > WM9711/WM9712 SoC Audio Codec 0.4
> > asoc: platform pcm constructor failed
> > asoc: can't create pcm HiFi
> > asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> > 
> > I have to admit that I used this time a 3.2 kernel. I'll test with
> > current later these days.
> 
> Same behaviour with 3.4.0-rc6:
> 
> Framebuffer driver mx3fb configured for a 800x600 display:
> 
>   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
>   asoc: platform pcm constructor failed
>   asoc: can't create pcm HiFi :-12
>   asoc: failed to instantiate card PhyCORE-ac97-audio: -12

When I do decrease from 800x600 to 800x594, wm9712 works. 

Any ideas?

> 
> 
> mx3fb configured for a 640x480 display:
>   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use
>   snd_soc_register_card()
>   asoc: wm9712-hifi <-> imx-ssi.0 mapping ok
> 
>  
> Thanks,
>  -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted
@ 2012-05-08 10:29                     ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-08 10:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Mon, May 07, 2012 at 11:55:06PM +0200, Christoph Fritz wrote:
> On Fri, May 04, 2012 at 03:28:45PM +0200, Christoph Fritz wrote:
> > On Fri, Apr 27, 2012 at 02:46:39PM +0100, Mark Brown wrote:
> > > On Fri, Apr 27, 2012 at 10:00:02AM +0200, Christoph Fritz wrote:
> > > > On Thu, 2012-04-26 at 22:37 +0100, Mark Brown wrote:
> > > 
> > > > >   The write will be suppresed if the register contents don't
> > > > > change which looks like what you're seeing here - 
> > > 
> > > > Can you imagine why the registers don't change?
> > > 
> > > I can't immediately think of any reason, no - I'd step through or
> > > annotate the code and have a look.
> > 
> > I'm still on.
> > 
> > And while testing WM9712 its touchpad interface, connecting a 800x600
> > display (instead of the default 640x480 one) results in a gone sound and
> > input-device - pretty queer:
> > 
> > WM9711/WM9712 SoC Audio Codec 0.4
> > asoc: platform pcm constructor failed
> > asoc: can't create pcm HiFi
> > asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> > 
> > I have to admit that I used this time a 3.2 kernel. I'll test with
> > current later these days.
> 
> Same behaviour with 3.4.0-rc6:
> 
> Framebuffer driver mx3fb configured for a 800x600 display:
> 
>   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
>   asoc: platform pcm constructor failed
>   asoc: can't create pcm HiFi :-12
>   asoc: failed to instantiate card PhyCORE-ac97-audio: -12

When I do decrease from 800x600 to 800x594, wm9712 works. 

Any ideas?

> 
> 
> mx3fb configured for a 640x480 display:
>   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use
>   snd_soc_register_card()
>   asoc: wm9712-hifi <-> imx-ssi.0 mapping ok
> 
>  
> Thanks,
>  -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
  2012-05-08 10:29                     ` Christoph Fritz
@ 2012-05-12  0:15                       ` Christoph Fritz
  -1 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-12  0:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

> > Framebuffer driver mx3fb configured for a 800x600 display:
> > 
> >   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
> >   asoc: platform pcm constructor failed
> >   asoc: can't create pcm HiFi :-12
> >   asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> 
> When I do decrease from 800x600 to 800x594, wm9712 works. 
> 
> Any ideas?

It seems to be a dma problem and not directly related to wm9712.


But the not working microphone input still bothers me. I suppose this
is related to not beeing able to change some muxes:

$ amixer sset "Mic Select Source" 'Mic 2'
 Simple mixer control 'Mic Select Source',0
   Capabilities: enum
   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
   Item0: 'Mic 1'

$ amixer sset "Differential Source" 'Line'
Simple mixer control 'Differential Source',0
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'

They refuse to change their Item0 because they are defined as
SND_SOC_DAPM_MUX without a correlating path->name so that
snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
change anything.

It works in 2.6.33, but current kernel has different mux handling and
it seems that no one since cared that much about microphone support.

Mark, can you confirm this, purpose a fix or even come up with
a patch?


Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
@ 2012-05-12  0:15                       ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-12  0:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

> > Framebuffer driver mx3fb configured for a 800x600 display:
> > 
> >   soc-audio soc-audio: ASoC machine PhyCORE-ac97-audio should use snd_soc_register_card()
> >   asoc: platform pcm constructor failed
> >   asoc: can't create pcm HiFi :-12
> >   asoc: failed to instantiate card PhyCORE-ac97-audio: -12
> 
> When I do decrease from 800x600 to 800x594, wm9712 works. 
> 
> Any ideas?

It seems to be a dma problem and not directly related to wm9712.


But the not working microphone input still bothers me. I suppose this
is related to not beeing able to change some muxes:

$ amixer sset "Mic Select Source" 'Mic 2'
 Simple mixer control 'Mic Select Source',0
   Capabilities: enum
   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
   Item0: 'Mic 1'

$ amixer sset "Differential Source" 'Line'
Simple mixer control 'Differential Source',0
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'

They refuse to change their Item0 because they are defined as
SND_SOC_DAPM_MUX without a correlating path->name so that
snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
change anything.

It works in 2.6.33, but current kernel has different mux handling and
it seems that no one since cared that much about microphone support.

Mark, can you confirm this, purpose a fix or even come up with
a patch?


Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
  2012-05-12  0:15                       ` Christoph Fritz
@ 2012-05-12 11:51                         ` Mark Brown
  -1 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2012-05-12 11:51 UTC (permalink / raw)
  To: Christoph Fritz
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:

> They refuse to change their Item0 because they are defined as
> SND_SOC_DAPM_MUX without a correlating path->name so that
> snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> change anything.

A route into a mux without a path name (other than a supply) just isn't
meaningful and I'm surprised it ever worked.

> It works in 2.6.33, but current kernel has different mux handling and
> it seems that no one since cared that much about microphone support.

It's nothing to do with microphones really, it's more that AC'97 CODECs
are rarely used with modern kernels as the boards that use AC'97 are
mostly quite old and suffer performance issues with modern software
stacks so newer kernels haven't been getting much testing with them.

> Mark, can you confirm this, purpose a fix or even come up with
> a patch?

Just filling in the appropriate mux value in the relevant route should
do the trick.  Looking at the code it looks like the widget isn't hooked
into the audio routing map at all so I'm a little surprised.  I'm out of
the office at the minute and so can't readily set up a test system
myself.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
@ 2012-05-12 11:51                         ` Mark Brown
  0 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2012-05-12 11:51 UTC (permalink / raw)
  To: Christoph Fritz
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev


[-- Attachment #1.1: Type: text/plain, Size: 1187 bytes --]

On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:

> They refuse to change their Item0 because they are defined as
> SND_SOC_DAPM_MUX without a correlating path->name so that
> snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> change anything.

A route into a mux without a path name (other than a supply) just isn't
meaningful and I'm surprised it ever worked.

> It works in 2.6.33, but current kernel has different mux handling and
> it seems that no one since cared that much about microphone support.

It's nothing to do with microphones really, it's more that AC'97 CODECs
are rarely used with modern kernels as the boards that use AC'97 are
mostly quite old and suffer performance issues with modern software
stacks so newer kernels haven't been getting much testing with them.

> Mark, can you confirm this, purpose a fix or even come up with
> a patch?

Just filling in the appropriate mux value in the relevant route should
do the trick.  Looking at the code it looks like the widget isn't hooked
into the audio routing map at all so I'm a little surprised.  I'm out of
the office at the minute and so can't readily set up a test system
myself.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
  2012-05-12 11:51                         ` Mark Brown
@ 2012-05-13  3:56                           ` Christoph Fritz
  -1 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-13  3:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Sat, May 12, 2012 at 12:51:31PM +0100, Mark Brown wrote:
> On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:
> 
> > They refuse to change their Item0 because they are defined as
> > SND_SOC_DAPM_MUX without a correlating path->name so that
> > snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> > change anything.
> 
> A route into a mux without a path name (other than a supply) just isn't
> meaningful and I'm surprised it ever worked.
> 
> > It works in 2.6.33, but current kernel has different mux handling and
> > it seems that no one since cared that much about microphone support.
> 
> It's nothing to do with microphones really, it's more that AC'97 CODECs
> are rarely used with modern kernels as the boards that use AC'97 are
> mostly quite old and suffer performance issues with modern software
> stacks so newer kernels haven't been getting much testing with them.
> 
> > Mark, can you confirm this, purpose a fix or even come up with
> > a patch?
> 
> Just filling in the appropriate mux value in the relevant route should
> do the trick.  Looking at the code it looks like the widget isn't hooked
> into the audio routing map at all so I'm a little surprised.  I'm out of
> the office at the minute and so can't readily set up a test system
> myself.

Thanks Mark, I'm pretty interested in testing too :-)

 -- Christoph


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
@ 2012-05-13  3:56                           ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-13  3:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Sat, May 12, 2012 at 12:51:31PM +0100, Mark Brown wrote:
> On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:
> 
> > They refuse to change their Item0 because they are defined as
> > SND_SOC_DAPM_MUX without a correlating path->name so that
> > snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> > change anything.
> 
> A route into a mux without a path name (other than a supply) just isn't
> meaningful and I'm surprised it ever worked.
> 
> > It works in 2.6.33, but current kernel has different mux handling and
> > it seems that no one since cared that much about microphone support.
> 
> It's nothing to do with microphones really, it's more that AC'97 CODECs
> are rarely used with modern kernels as the boards that use AC'97 are
> mostly quite old and suffer performance issues with modern software
> stacks so newer kernels haven't been getting much testing with them.
> 
> > Mark, can you confirm this, purpose a fix or even come up with
> > a patch?
> 
> Just filling in the appropriate mux value in the relevant route should
> do the trick.  Looking at the code it looks like the widget isn't hooked
> into the audio routing map at all so I'm a little surprised.  I'm out of
> the office at the minute and so can't readily set up a test system
> myself.

Thanks Mark, I'm pretty interested in testing too :-)

 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
  2012-05-13  3:56                           ` Christoph Fritz
@ 2012-05-15  9:15                             ` Christoph Fritz
  -1 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-15  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Sun, May 13, 2012 at 05:56:53AM +0200, Christoph Fritz wrote:
> On Sat, May 12, 2012 at 12:51:31PM +0100, Mark Brown wrote:
> > On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:
> > 
> > > They refuse to change their Item0 because they are defined as
> > > SND_SOC_DAPM_MUX without a correlating path->name so that
> > > snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> > > change anything.
> > 
> > A route into a mux without a path name (other than a supply) just isn't
> > meaningful and I'm surprised it ever worked.
> > 
> > > It works in 2.6.33, but current kernel has different mux handling and
> > > it seems that no one since cared that much about microphone support.
> > 
> > It's nothing to do with microphones really, it's more that AC'97 CODECs
> > are rarely used with modern kernels as the boards that use AC'97 are
> > mostly quite old and suffer performance issues with modern software
> > stacks so newer kernels haven't been getting much testing with them.
> > 
> > > Mark, can you confirm this, purpose a fix or even come up with
> > > a patch?
> > 
> > Just filling in the appropriate mux value in the relevant route should
> > do the trick.

Do you mean filling in to wm9712_audio_map or wm9712_enum?

> > Looking at the code it looks like the widget isn't hooked
> > into the audio routing map at all so I'm a little surprised.

Does that mean that wm9712_dapm_widgets should be referred by a
struct snd_kcontrol_new ?

> >I'm out of
> > the office at the minute and so can't readily set up a test system
> > myself.

I'm not that into alsa and would greatly appreciate if you could have
a look with your test system.

Thanks,
 -- Christoph


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
@ 2012-05-15  9:15                             ` Christoph Fritz
  0 siblings, 0 replies; 27+ messages in thread
From: Christoph Fritz @ 2012-05-15  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

On Sun, May 13, 2012 at 05:56:53AM +0200, Christoph Fritz wrote:
> On Sat, May 12, 2012 at 12:51:31PM +0100, Mark Brown wrote:
> > On Sat, May 12, 2012 at 02:15:56AM +0200, Christoph Fritz wrote:
> > 
> > > They refuse to change their Item0 because they are defined as
> > > SND_SOC_DAPM_MUX without a correlating path->name so that
> > > snd_soc_dapm_mux_update_power() (in sound/soc/soc-dapmc) doesn't
> > > change anything.
> > 
> > A route into a mux without a path name (other than a supply) just isn't
> > meaningful and I'm surprised it ever worked.
> > 
> > > It works in 2.6.33, but current kernel has different mux handling and
> > > it seems that no one since cared that much about microphone support.
> > 
> > It's nothing to do with microphones really, it's more that AC'97 CODECs
> > are rarely used with modern kernels as the boards that use AC'97 are
> > mostly quite old and suffer performance issues with modern software
> > stacks so newer kernels haven't been getting much testing with them.
> > 
> > > Mark, can you confirm this, purpose a fix or even come up with
> > > a patch?
> > 
> > Just filling in the appropriate mux value in the relevant route should
> > do the trick.

Do you mean filling in to wm9712_audio_map or wm9712_enum?

> > Looking at the code it looks like the widget isn't hooked
> > into the audio routing map at all so I'm a little surprised.

Does that mean that wm9712_dapm_widgets should be referred by a
struct snd_kcontrol_new ?

> >I'm out of
> > the office at the minute and so can't readily set up a test system
> > myself.

I'm not that into alsa and would greatly appreciate if you could have
a look with your test system.

Thanks,
 -- Christoph

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
  2012-05-15  9:15                             ` Christoph Fritz
@ 2012-05-15 17:15                               ` Mark Brown
  -1 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2012-05-15 17:15 UTC (permalink / raw)
  To: Christoph Fritz
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

On Tue, May 15, 2012 at 11:15:41AM +0200, Christoph Fritz wrote:
> On Sun, May 13, 2012 at 05:56:53AM +0200, Christoph Fritz wrote:

> > > Just filling in the appropriate mux value in the relevant route should
> > > do the trick.

> Do you mean filling in to wm9712_audio_map or wm9712_enum?

There will need to be routes in the audio map.  Don't know if there are
any fixes needed in the enum, it was the routing I noticed was missing.

> > > Looking at the code it looks like the widget isn't hooked
> > > into the audio routing map at all so I'm a little surprised.

> Does that mean that wm9712_dapm_widgets should be referred by a
> struct snd_kcontrol_new ?

No, that should never happen.

> > >I'm out of
> > > the office at the minute and so can't readily set up a test system
> > > myself.

> I'm not that into alsa and would greatly appreciate if you could have
> a look with your test system.

For personal reasons I don't really have an ETA for when I'll be in the
office, sorry.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: ASoC: wm9712: Microphone doesn't work: Mux handling broken?
@ 2012-05-15 17:15                               ` Mark Brown
  0 siblings, 0 replies; 27+ messages in thread
From: Mark Brown @ 2012-05-15 17:15 UTC (permalink / raw)
  To: Christoph Fritz
  Cc: alsa-devel, Hans J. Koch, Sascha Hauer, Liam Girdwood, linux-fbdev


[-- Attachment #1.1: Type: text/plain, Size: 992 bytes --]

On Tue, May 15, 2012 at 11:15:41AM +0200, Christoph Fritz wrote:
> On Sun, May 13, 2012 at 05:56:53AM +0200, Christoph Fritz wrote:

> > > Just filling in the appropriate mux value in the relevant route should
> > > do the trick.

> Do you mean filling in to wm9712_audio_map or wm9712_enum?

There will need to be routes in the audio map.  Don't know if there are
any fixes needed in the enum, it was the routing I noticed was missing.

> > > Looking at the code it looks like the widget isn't hooked
> > > into the audio routing map at all so I'm a little surprised.

> Does that mean that wm9712_dapm_widgets should be referred by a
> struct snd_kcontrol_new ?

No, that should never happen.

> > >I'm out of
> > > the office at the minute and so can't readily set up a test system
> > > myself.

> I'm not that into alsa and would greatly appreciate if you could have
> a look with your test system.

For personal reasons I don't really have an ETA for when I'll be in the
office, sorry.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2012-05-15 17:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 20:07 ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Christoph Fritz
2012-04-26 10:15 ` Christoph Fritz
2012-04-26 11:27 ` Mark Brown
2012-04-26 13:49   ` Christoph Fritz
2012-04-26 17:20     ` Mark Brown
2012-04-26 21:11       ` Christoph Fritz
2012-04-26 21:37         ` Mark Brown
2012-04-27  8:00           ` Christoph Fritz
2012-04-27 13:46             ` Mark Brown
2012-05-04 13:28               ` Christoph Fritz
2012-05-07 21:55                 ` Christoph Fritz
2012-05-07 21:55                   ` Christoph Fritz
2012-05-08 10:29                   ` Christoph Fritz
2012-05-08 10:29                     ` Christoph Fritz
2012-05-12  0:15                     ` ASoC: wm9712: Microphone doesn't work: Mux handling broken? Christoph Fritz
2012-05-12  0:15                       ` Christoph Fritz
2012-05-12 11:51                       ` Mark Brown
2012-05-12 11:51                         ` Mark Brown
2012-05-13  3:56                         ` Christoph Fritz
2012-05-13  3:56                           ` Christoph Fritz
2012-05-15  9:15                           ` Christoph Fritz
2012-05-15  9:15                             ` Christoph Fritz
2012-05-15 17:15                             ` Mark Brown
2012-05-15 17:15                               ` Mark Brown
     [not found]           ` <20120430192258.GA15188@local>
2012-04-30 21:43             ` ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted Mark Brown
     [not found]               ` <20120430234458.GB15188@local>
2012-05-01 17:12                 ` Mark Brown
     [not found]                   ` <20120501200755.GF15188@local>
2012-05-01 22:25                     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.