From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Henningsson Subject: HDA: Sound mutes when combination is below -48 dB Date: Fri, 03 Dec 2010 12:30:02 +0100 Message-ID: <4CF8D4BA.8080904@canonical.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000009020600050600030002" Return-path: Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by alsa0.perex.cz (Postfix) with ESMTP id 22FAE24458 for ; Fri, 3 Dec 2010 12:30:03 +0100 (CET) Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1POTpy-00018U-H8 for ; Fri, 03 Dec 2010 11:30:02 +0000 Received: from c-83-233-18-148.cust.bredband2.com ([83.233.18.148] helo=[192.168.8.102]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1POTpy-0007Ya-Dg for alsa-devel@alsa-project.org; Fri, 03 Dec 2010 11:30:02 +0000 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org This is a multi-part message in MIME format. --------------000009020600050600030002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I'm trying to nail down a strange behaviour. I have one "Master" and one "Speaker" (or "Headphone") volume control, each ranging from -48 dB to 0 dB. Whenever the sum of "Master" and "Speaker" is below -48 dB, the output mutes. Codec is attached. "Master" is a "Virtual master" control, and both "Master" and "Speaker" control amp-out on nid 0x13. Nid 0x13 does not have amp-out caps, but the AFG specifies a range of -96 dB to 0 dB in 0.75 dB steps. There is some strange things here. First, in patch_sigmatel:create_controls_idx, there is this comment: /* if dB scale is over -64dB, and finer enough, * let's reduce it to half */ Hmm? Removing half of the volume slider? Second, assuming we actually buy this decision, wouldn't it make sense for people to be able to combine Master and Speaker to get the full -96 to 0 dB range? Instead, "Master" is just working over the range defined by "Speaker". Third, there is an interesting condition in hda_codec.c:update_amp_value: if (val > 0) val += ofs; Now this is in practice turning all volume controls which have ofs (e g those being "reduced to half") to a minimum-is-mute error: I can set the amp value to either 0 (-96 dB) or the 65 - 127 range (~ -48 dB - 0 dB). So it isn't really mute, it's -96 dB signal, but I can't hear that anyway. So; I think I understand the problem, but I'm not sure of where I should try to patch it, to make the best solution. Finally, is there right to exist for both "virtual masters" and the "PCM" softvol talked about a while ago? If I were to decide, I'd personally like them both removed (the additional complexity isn't motivated IMO), but wouldn't it at least make sense to name the virtual master "PCM", to avoid the PCM softvol? -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic --------------000009020600050600030002 Content-Type: text/plain; name="hp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hp.txt" Codec: IDT 92HD81B1X5 Address: 0 Function Id: 0x1 Vendor Id: 0x111d7605 Subsystem Id: 0x103c1413 Revision Id: 0x100402 No Modem Function Group found Default PCM: rates [0x5e0]: 44100 48000 88200 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Default Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1 GPIO: io=3, o=0, i=0, unsolicited=1, wake=1 IO[0]: enable=1, dir=1, wake=0, sticky=0, data=0, unsol=0 IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 Power-Map: 0x00 Node 0x0a [Pin Complex] wcaps 0x400583: Stereo Amp-In Control: name="Mic Jack Mode", index=0, device=0 ControlAmp: chs=0, dir=In, idx=0, ofs=0 Control: name="Mic Capture Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x0001173c: IN OUT HP EAPD Detect Vref caps: HIZ 50 GRD 80 EAPD 0x2: EAPD Pin Default 0x03a19020: [Jack] Mic at Ext Left Conn = 1/8, Color = Pink DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0x24: IN VREF_80 Unsolicited: tag=02, enabled=1 Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c Node 0x0b [Pin Complex] wcaps 0x400581: Stereo Pincap 0x0001001c: OUT HP EAPD Detect EAPD 0x2: EAPD Pin Default 0x0321401f: [Jack] HP Out at Ext Left Conn = 1/8, Color = Green DefAssociation = 0x1, Sequence = 0xf Pin-ctls: 0xc0: OUT HP Unsolicited: tag=01, enabled=1 Power: setting=D0, actual=D0 Connection: 3 0x13 0x14* 0x1c Node 0x0c [Pin Complex] wcaps 0x400583: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x00011734: IN OUT EAPD Detect Vref caps: HIZ 50 GRD 80 EAPD 0x2: EAPD Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: VREF_HIZ Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c Node 0x0d [Pin Complex] wcaps 0x400501: Stereo Pincap 0x00010050: OUT EAPD Balanced EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x00: Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c Node 0x0e [Pin Complex] wcaps 0x400583: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x00010034: IN OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Connection: 3 0x13 0x14* 0x1c Node 0x0f [Pin Complex] wcaps 0x400583: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x00010034: IN OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Connection: 3 0x13 0x14* 0x1c Node 0x10 [Pin Complex] wcaps 0x400500: Mono Pincap 0x00000010: OUT Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: Power: setting=D0, actual=D0 Connection: 1 0x1a Node 0x11 [Pin Complex] wcaps 0x400483: Stereo Amp-In Control: name="Front Mic Capture Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: N/A Amp-In vals: [0x01 0x01] Pincap 0x00000024: IN Detect Pin Default 0x90a60130: [Fixed] Mic at Int N/A Conn = Digital, Color = Unknown DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Node 0x12 [Vendor Defined Widget] wcaps 0xf00503: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x00 0x00] Power: setting=D0, actual=D0 Connection: 1 0x20 Node 0x13 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=63 Control: name="Speaker Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Device: name="STAC92xx Analog", type="Audio", device=0 Amp-Out caps: N/A Amp-Out vals: [0x41 0x41] Converter: stream=5, channel=0 Power: setting=D0, actual=D0 Delay: 13 samples Node 0x14 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L Control: name="Headphone Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=63 Control: name="Headphone Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: N/A Amp-Out vals: [0x40 0x40] Converter: stream=5, channel=0 Power: setting=D0, actual=D0 Delay: 13 samples Node 0x15 [Audio Input] wcaps 0x1d0541: Stereo Device: name="STAC92xx Analog", type="Audio", device=0 Converter: stream=0, channel=0 SDI-Select: 0 Power: setting=D0, actual=D0 Delay: 13 samples Connection: 1 0x17 Processing caps: benign=0, ncoeff=0 Node 0x16 [Audio Input] wcaps 0x1d0541: Stereo Converter: stream=0, channel=0 SDI-Select: 0 Power: setting=D0, actual=D0 Delay: 13 samples Connection: 1 0x18 Processing caps: benign=0, ncoeff=0 Node 0x17 [Audio Selector] wcaps 0x300d0d: Stereo Amp-Out R/L Control: name="Capture Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Capture Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1 Amp-Out vals: [0x00 0x00] Power: setting=D0, actual=D0 Connection: 7 0x0c 0x0e 0x0f 0x1b 0x11* 0x12 0x0a Node 0x18 [Audio Selector] wcaps 0x300d0d: Stereo Amp-Out R/L Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1 Amp-Out vals: [0x80 0x80] Power: setting=D0, actual=D0 Connection: 7 0x0c* 0x0e 0x0f 0x1b 0x11 0x12 0x0a Node 0x19 [Audio Selector] wcaps 0x300501: Stereo Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c Node 0x1a [Audio Mixer] wcaps 0x200500: Mono Power: setting=D0, actual=D0 Connection: 1 0x19 Node 0x1b [Audio Mixer] wcaps 0x20050b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] Power: setting=D0, actual=D0 Connection: 6 0x0c 0x0e 0x0f 0x13 0x14 0x0a Node 0x1c [Audio Selector] wcaps 0x30050d: Stereo Amp-Out Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x9f 0x9f] Power: setting=D0, actual=D0 Connection: 1 0x1b Node 0x1d [Audio Output] wcaps 0x4061d: Stereo Digital Amp-Out Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Converter: stream=0, channel=0 Digital: Digital category: 0x0 PCM: rates [0x5e0]: 44100 48000 88200 96000 192000 bits [0xe]: 16 20 24 formats [0x5]: PCM AC3 Power: setting=D0, actual=D0 Delay: 4 samples Node 0x1e [Audio Output] wcaps 0x4061d: Stereo Digital Amp-Out Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Converter: stream=0, channel=0 Digital: Digital category: 0x0 PCM: rates [0x5e0]: 44100 48000 88200 96000 192000 bits [0xe]: 16 20 24 formats [0x5]: PCM AC3 Power: setting=D0, actual=D0 Delay: 4 samples Node 0x1f [Pin Complex] wcaps 0x400781: Stereo Digital Pincap 0x00000014: OUT Detect Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Connection: 1 0x1d Node 0x20 [Pin Complex] wcaps 0x400781: Stereo Digital Pincap 0x00000034: IN OUT Detect Pin Default 0x40f000f0: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0xf, Sequence = 0x0 Pin-ctls: 0x00: Unsolicited: tag=00, enabled=0 Power: setting=D0, actual=D0 Connection: 1 0x1e Node 0x21 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out Control: name="Beep Playback Switch", index=0, device=0 ControlAmp: chs=1, dir=Out, idx=0, ofs=0 Control: name="Beep Playback Volume", index=0, device=0 ControlAmp: chs=1, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=1 Amp-Out vals: [0x00] Node 0x22 [Vendor Defined Widget] wcaps 0xf00000: Mono --------------000009020600050600030002 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel --------------000009020600050600030002--