Skip to contentSkip to conversation

ALC892, Clevo P150HM: Input Source gets reset to "Mic" every resume

DISCUSSION Julian Sikorski 3 participants 12 messages Dec 3, 2011 – Mar 3, 2012 3 messages not in the archive Sound

lore
Share & tools
lore
#0 lore raw

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

Regards,
Julian

#1 lore raw

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 6 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

As alc892 has two [Audio Mixer] instead of [Audio Selector]

I wonder whether the hardware support a more an advanced "Input Source" controls to support

"Mic"
"Internal Mic"
"Line"
"Mic + Internal Mic"
"Mic + Line"
"Internal Mic" + "Line"

instead of the current implementation

Simple mixer control 'Input Source',0
Capabilities: cenum
Items: 'Mic' 'Internal Mic' 'Line'
Item0: 'Mic'

Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="Input Source", index=1, device=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80
0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 12

     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b 0x12

Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="Input Source", index=0, device=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80
0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 11

     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
#2 lore raw
In reply to Julian Sikorski

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

#3 lore raw

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Julian

#4 lore raw

2012/2/24, Julian Sikorski <[email protected]>:

Quoted 84 lines

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Julian

A dirty hack is to swap the order of the external mic and internal mic at the end of sort_autocfg_input_pins()

+ if (cfg->num_inputs > 1) {
+ struct auto_pin_cfg_item tmp;
+ tmp = cfg->inputs[0];
+ cfg->inputs[0] = cfg->inputs[1];
+ cfg->inputs[1] = tmp;
+ }

25 Input Source:0
ITEM: 0:Internal Mic, 1:Mic, 2:Line, VAL: [Internal Mic]

#5 lore raw
In reply to Julian Sikorski

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 85 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Does the patch below fix?

Takashi

---

sound/pci/hda/patch_realtek.c +1 -1
index 19f85b7..4cd5489 100644
@@ -4147,7 +4147,7 @@ static void alc_auto_init_input_src(struct hda_codec *codec)
 	else
 		nums = spec->num_adc_nids;
 	for (c = 0; c < nums; c++)
-		alc_mux_select(codec, 0, spec->cur_mux[c], true);
+		alc_mux_select(codec, c, spec->cur_mux[c], true);
 }
 
 /* add mic boosts if needed */
#6 lore raw

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 90 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 88 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 86 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 7 lines
Quoted 2 lines

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Julian

#7 lore raw

At Fri, 24 Feb 2012 23:06:26 +0100,

Quoted 95 lines · Julian Sikorski

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 93 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 90 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Quoted 8 lines
Quoted 4 lines

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Thanks for checking. I committed the fix to git tree, also Cc'ed to stable.

Takashi

#8 lore raw

W dniu 25.02.2012 11:16, Takashi Iwai pisze:

Quoted 106 lines

At Fri, 24 Feb 2012 23:06:26 +0100,

Quoted 95 lines · Julian Sikorski

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 93 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 90 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Quoted 8 lines
Quoted 4 lines

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Quoted 5 lines

Thanks for checking. I committed the fix to git tree, also Cc'ed to stable.

Takashi

I cannot seem to find this patch in the 3.2 stable tree, was it rejected?

Regards,
Julian

#11 lore raw
In reply to a message not in the archive

W dniu 02.03.2012 19:43, Greg KH pisze:

Quoted 108 lines · Julian Sikorski
Quoted 107 lines

W dniu 25.02.2012 11:16, Takashi Iwai pisze:

Quoted 106 lines

At Fri, 24 Feb 2012 23:06:26 +0100,

Quoted 103 lines · Julian Sikorski

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 90 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 88 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 86 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 7 lines
Quoted 2 lines

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

Thanks for checking. I committed the fix to git tree, also Cc'ed to stable.

Takashi

I cannot seem to find this patch in the 3.2 stable tree, was it rejected?

What is the git commit id of it in Linus's tree?

Hmm, it does not seem to be in Linus' tree yet. It is in for-linus branch of sound tree under commit 068b9394 though.

Julian

#13 lore raw
In reply to a message not in the archive

W dniu 2012-03-02 23:08, Greg KH pisze:

Quoted 117 lines · Julian Sikorski
Quoted 116 lines

W dniu 02.03.2012 19:43, Greg KH pisze:

Quoted 115 lines · Julian Sikorski
Quoted 113 lines

W dniu 25.02.2012 11:16, Takashi Iwai pisze:

Quoted 106 lines

At Fri, 24 Feb 2012 23:06:26 +0100,

Quoted 95 lines · Julian Sikorski

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 93 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 90 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski<[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Quoted 8 lines
Quoted 4 lines

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Quoted 5 lines

Thanks for checking. I committed the fix to git tree, also Cc'ed to stable.

Takashi

I cannot seem to find this patch in the 3.2 stable tree, was it rejected?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

What is the git commit id of it in Linus's tree?

Hmm, it does not seem to be in Linus' tree yet. It is in for-linus branch of sound tree under commit 068b9394 though.

Then there is nothing I can do about it at this point in time.

greg k-h

I see, thanks for clarification.

Regards,
Julian

#14 lore raw
In reply to a message not in the archive

W dniu 02.03.2012 23:08, Greg KH pisze:

Quoted 117 lines · Julian Sikorski
Quoted 116 lines

W dniu 02.03.2012 19:43, Greg KH pisze:

Quoted 115 lines · Julian Sikorski
Quoted 113 lines

W dniu 25.02.2012 11:16, Takashi Iwai pisze:

Quoted 106 lines

At Fri, 24 Feb 2012 23:06:26 +0100,

Quoted 95 lines · Julian Sikorski

W dniu 24.02.2012 10:43, Takashi Iwai pisze:

Quoted 93 lines

At Thu, 23 Feb 2012 20:11:44 +0100,

Quoted 90 lines · Julian Sikorski

W dniu 09.12.2011 14:32, Raymond Yau pisze:

Quoted 83 lines

2011/12/4 Julian Sikorski <[email protected]>:

Quoted 8 lines

Hi,

whenever I resume the machine, the Input Source would get changed back from "Internal Mic" to "Mic". This is a bit annoying, because pulseaudio is unaware of that change. As a result, everything looks fine in pavucontrol but no sound gets recorded. A quick look at alsamixer -c0 revealed the problem. My alsa info:

Quoted 5 lines

http://www.alsa-project.org/db/?f=c5776b615a5f3b9ae624e4250fb0c2b69118ce26

This is unrelated to the other problems I have been reporting, since this happens on a mostly-stock Fedora 3.1.2 kernel (the patch I added deals with xhci, not alsa).

The problem seem can be reproduced by using hda-emu,
it is init_capsrc_for_pin() and alc_auto_init_input_src() write value to cache before snd_hda_codec_resume_app() from cache

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

Quoted 1 line

set 28 1

send: NID=0x23, VERB=0x360(set_amp_gain_mute,I:L#0), PARM=0x80
send: NID=0x23, VERB=0x350(set_amp_gain_mute,I:R#0), PARM=0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0

Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Internal Mic]

pm
** SUSPENDING **
...
** RESUMING **
PM-Notified
...
exec_init_verbs
...

init_capsrc_for_pin 18
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x0
receive: 0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x0
receive: 0x0
init capsrc for pin 19
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x0
send: NID=0x23, VERB=0xb00(get_amp_gain_mute,I:R#0), PARM=0x1
receive: 0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x0 init capsrc for pin 1a
send: NID=0x23, VERB=0xb20(get_amp_gain_mute,I:L#0), PARM=0x2
receive: 0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x0

alc_auto_init_input_src
send: NID=0x23, VERB=0x361(set_amp_gain_mute,I:L#1), PARM=0x80
send: NID=0x23, VERB=0x351(set_amp_gain_mute,I:R#1), PARM=0x80
send: NID=0x23, VERB=0x362(set_amp_gain_mute,I:L#2), PARM=0x80
send: NID=0x23, VERB=0x352(set_amp_gain_mute,I:R#2), PARM=0x80

snd_hda_codec_resume_app
send: NID=0x23, VERB=0x363(set_amp_gain_mute,I:L#3), PARM=0x80
send: NID=0x23, VERB=0x353(set_amp_gain_mute,I:R#3), PARM=0x80
send: NID=0x23, VERB=0x364(set_amp_gain_mute,I:L#4), PARM=0x80
send: NID=0x23, VERB=0x354(set_amp_gain_mute,I:R#4), PARM=0x80
send: NID=0x23, VERB=0x365(set_amp_gain_mute,I:L#5), PARM=0x80
send: NID=0x23, VERB=0x355(set_amp_gain_mute,I:R#5), PARM=0x80
send: NID=0x23, VERB=0x366(set_amp_gain_mute,I:L#6), PARM=0x80
send: NID=0x23, VERB=0x356(set_amp_gain_mute,I:R#6), PARM=0x80
send: NID=0x23, VERB=0x367(set_amp_gain_mute,I:L#7), PARM=0x80
send: NID=0x23, VERB=0x357(set_amp_gain_mute,I:R#7), PARM=0x80
send: NID=0x23, VERB=0x368(set_amp_gain_mute,I:L#8), PARM=0x80
send: NID=0x23, VERB=0x358(set_amp_gain_mute,I:R#8), PARM=0x80
send: NID=0x23, VERB=0x369(set_amp_gain_mute,I:L#9), PARM=0x80
send: NID=0x23, VERB=0x359(set_amp_gain_mute,I:R#9), PARM=0x80
send: NID=0x23, VERB=0x36a(set_amp_gain_mute,I:L#10), PARM=0x80
send: NID=0x23, VERB=0x35a(set_amp_gain_mute,I:R#10), PARM=0x80
...

Quoted 3 lines
Quoted 1 line

get 28

28 Input Source:0
ITEM: 0:Mic, 1:Internal Mic, 2:Line, VAL: [Mic]

The problem still exists in 3.2.7-1.fc16.x86_64 kernel, is there any chance for a fix?

Quoted 8 lines
Quoted 4 lines

Does the patch below fix?

Takashi

Yes, it seems so. I don't want to get ahead of myself, but two suspend-resume cycles have passed and inputs are at Internal Mic and Mic, as expected.

Quoted 5 lines

Thanks for checking. I committed the fix to git tree, also Cc'ed to stable.

Takashi

I cannot seem to find this patch in the 3.2 stable tree, was it rejected?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

What is the git commit id of it in Linus's tree?

Hmm, it does not seem to be in Linus' tree yet. It is in for-linus branch of sound tree under commit 068b9394 though.

Then there is nothing I can do about it at this point in time.

greg k-h

Dear Greg,

it seems the patch has been merged to the Linus' tree:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=068b939431486f524438330b0848a8222e33d421

Regards,
Julian