* Fixing ALC269 the right way?
@ 2010-07-30 7:37 David Henningsson
2010-07-30 8:11 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2010-07-30 7:37 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
Here's what I try to fix by playing around with it in hda-emu, it seems
like more than one thing is broken here, but let's start with playback.
This machine has one internal speaker and one line-out. Codec proc file
is attached.
Here's my analysis so far:
1) If there's one internal speaker and one line-out (rather than
headphone-out), should the internal speaker auto-mute? What's standard
practice?
2) There are two DAC nids, 0x02 and 0x03, but only 0x02 is used (i e
activated on playback). But line-out is connected (via nid 0x0d) to DAC
0x03, so there is no sound on line-out.
Should we try to activate DAC nid 0x03 or try to move line-out to DAC
0x02? And is either possible through just fiddling with pin_configs
(which Takashi preferred), or should we add fixup verbs, or a completely
new model? What would upstream prefer in this case?
3) Another strange thing is the controls, there is both Master Playback
and Speaker Playback Volumes and Switches, but they both control
Volume=0x02 and Switch=0x14, and setting one then getting the other
returns the wrong result since they're not updating each other's cached
values (I assume). So we should try to get rid of one of these, but how
depends on the answer to question 1...
Thanks in advance for helping out!
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[-- Attachment #2: opti_xe.txt --]
[-- Type: text/plain, Size: 8535 bytes --]
Codec: Realtek ALC259
Address: 2
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0269
Subsystem Id: 0x102802fb
Revision Id: 0x100100
No Modem Function Group found
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC259 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
Amp-Out vals: [0x57 0x57]
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out
Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
Amp-Out vals: [0x00 0x00]
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x07 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Capture Switch", index=0, device=0
Control: name="Capture Volume", index=0, device=0
Device: name="ALC259 Analog", type="Audio", device=0
Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x8b 0x8b]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x23
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Capture Switch", index=1, device=0
Control: name="Capture Volume", index=1, device=0
Amp-In caps: ofs=0x0b, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x00 0x00]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x22
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Audio Mixer] wcaps 0x20010b: 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]
Connection: 5
0x18 0x19 0x1a 0x1b 0x1d
Node 0x0c [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Connection: 2
0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Connection: 2
0x03 0x0b
Node 0x0e [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0f [Audio Mixer] wcaps 0x20010a: Mono Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00] [0x00]
Connection: 2
0x02 0x0b
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Pin Complex] wcaps 0x40000b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0
Amp-In vals: [0x00 0x00]
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Speaker Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x00010014: OUT EAPD Detect
EAPD 0x2: EAPD
Pin Default 0x99130110: [Fixed] Speaker at Int ATAPI
Conn = ATAPI, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 2
0x0c* 0x0d
Node 0x15 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x16 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x17 [Pin Complex] wcaps 0x40010c: Mono Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80]
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Connection: 1
0x0f
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00001734: IN OUT Detect
Vref caps: HIZ 50 GRD 80
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=00, enabled=0
Connection: 1
0x0d
Node 0x19 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
Control: name="Mic Boost", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0
Amp-In vals: [0x00 0x00]
Pincap 0x00001724: IN Detect
Vref caps: HIZ 50 GRD 80
Pin Default 0x01a19830: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
DefAssociation = 0x3, Sequence = 0x0
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=00, enabled=0
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000003c: IN OUT HP Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 2
0x0c* 0x0d
Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x00000034: IN OUT Detect
Pin Default 0x01014020: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Green
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 2
0x0c 0x0d*
Node 0x1c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Node 0x1e [Pin Complex] wcaps 0x400381: Stereo Digital
Pincap 0x00000014: OUT Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x06
Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=25
Node 0x21 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0000001c: OUT HP Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0xc0: OUT HP
Unsolicited: tag=00, enabled=0
Connection: 2
0x0c* 0x0d
Node 0x22 [Audio Selector] wcaps 0x30010b: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Connection: 7
0x18* 0x19 0x1a 0x1b 0x1d 0x0b 0x12
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
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]
Connection: 6
0x18 0x19 0x1a 0x1b 0x1d 0x0b
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Fixing ALC269 the right way?
2010-07-30 7:37 Fixing ALC269 the right way? David Henningsson
@ 2010-07-30 8:11 ` Takashi Iwai
2010-07-30 11:42 ` David Henningsson
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2010-07-30 8:11 UTC (permalink / raw)
To: David Henningsson; +Cc: alsa-devel@alsa-project.org
At Fri, 30 Jul 2010 09:37:33 +0200,
David Henningsson wrote:
>
> Here's what I try to fix by playing around with it in hda-emu, it seems
> like more than one thing is broken here, but let's start with playback.
> This machine has one internal speaker and one line-out. Codec proc file
> is attached.
Please give alsa-info.sh output instead. It'll contain more
comprehensive information to analyze.
> Here's my analysis so far:
>
> 1) If there's one internal speaker and one line-out (rather than
> headphone-out), should the internal speaker auto-mute? What's standard
> practice?
It's just because the pin is a line-out, no headphone (in addition to
the bug below).
If the pin is declared as a headphone, the driver turns on the
auto-mute function.
> 2) There are two DAC nids, 0x02 and 0x03, but only 0x02 is used (i e
> activated on playback). But line-out is connected (via nid 0x0d) to DAC
> 0x03, so there is no sound on line-out.
Right, it's a missing check of the pin. The pin 0x1b doesn't exist on
ALC268, so the parser (shared by both ALC268/269) ignored it.
The one-liner below fixes the problem.
> Should we try to activate DAC nid 0x03 or try to move line-out to DAC
> 0x02? And is either possible through just fiddling with pin_configs
> (which Takashi preferred), or should we add fixup verbs, or a completely
> new model? What would upstream prefer in this case?
>
> 3) Another strange thing is the controls, there is both Master Playback
> and Speaker Playback Volumes and Switches, but they both control
> Volume=0x02 and Switch=0x14, and setting one then getting the other
> returns the wrong result since they're not updating each other's cached
> values (I assume). So we should try to get rid of one of these, but how
> depends on the answer to question 1...
Ditto.
thanks,
Takashi
---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 14ef383..60bb361 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -13124,6 +13124,7 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid,
dac = 0x02;
break;
case 0x15:
+ case 0x1b:
case 0x21: /* ALC269vb has this pin, too */
dac = 0x03;
break;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Fixing ALC269 the right way?
2010-07-30 8:11 ` Takashi Iwai
@ 2010-07-30 11:42 ` David Henningsson
2010-07-30 12:06 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2010-07-30 11:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@alsa-project.org
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
2010-07-30 10:11, Takashi Iwai skrev:
> At Fri, 30 Jul 2010 09:37:33 +0200,
> David Henningsson wrote:
>>
>> Here's what I try to fix by playing around with it in hda-emu, it seems
>> like more than one thing is broken here, but let's start with playback.
>> This machine has one internal speaker and one line-out. Codec proc file
>> is attached.
>
> Please give alsa-info.sh output instead. It'll contain more
> comprehensive information to analyze.
Sorry. I have an alsa-info of a slightly differently machine here:
http://launchpadlibrarian.net/49532111/alsa-info-forrest
The difference is two outputs (one line, one headphone), and two inputs.
>
>> Here's my analysis so far:
>>
>> 1) If there's one internal speaker and one line-out (rather than
>> headphone-out), should the internal speaker auto-mute? What's standard
>> practice?
>
> It's just because the pin is a line-out, no headphone (in addition to
> the bug below).
> If the pin is declared as a headphone, the driver turns on the
> auto-mute function.
>
>> 2) There are two DAC nids, 0x02 and 0x03, but only 0x02 is used (i e
>> activated on playback). But line-out is connected (via nid 0x0d) to DAC
>> 0x03, so there is no sound on line-out.
>
> Right, it's a missing check of the pin.
Should that have given a warning message, or is it a normal condition
to ignore pins?
> The pin 0x1b doesn't exist on
> ALC268, so the parser (shared by both ALC268/269) ignored it.
> The one-liner below fixes the problem.
Nice, thanks for spotting! I've attached a signed-off commit that
un-ignores both 0x1b and 0x1a (the latter one used in the alsa-info link
above). Please apply.
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[-- Attachment #2: 0005-Add-analog-output-NIDs-used-by-Dell-Optiplex.patch --]
[-- Type: text/x-patch, Size: 884 bytes --]
>From 4f4cb61722e71283df17d1cc2e1eae0dc404c838 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Fri, 30 Jul 2010 10:51:23 +0200
Subject: [PATCH 5/5] Add analog output NIDs used by Dell Optiplex
This patch enables playback on Dell Optiplex XE, 380 and 980.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/patch_realtek.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b4b7f58..0b87715 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -13108,6 +13108,8 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid,
dac = 0x02;
break;
case 0x15:
+ case 0x1a:
+ case 0x1b:
case 0x21: /* ALC269vb has this pin, too */
dac = 0x03;
break;
--
1.7.0.4
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Fixing ALC269 the right way?
2010-07-30 11:42 ` David Henningsson
@ 2010-07-30 12:06 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-07-30 12:06 UTC (permalink / raw)
To: David Henningsson; +Cc: alsa-devel@alsa-project.org
At Fri, 30 Jul 2010 13:42:32 +0200,
David Henningsson wrote:
>
> 2010-07-30 10:11, Takashi Iwai skrev:
> > At Fri, 30 Jul 2010 09:37:33 +0200,
> > David Henningsson wrote:
> >>
> >> Here's what I try to fix by playing around with it in hda-emu, it seems
> >> like more than one thing is broken here, but let's start with playback.
> >> This machine has one internal speaker and one line-out. Codec proc file
> >> is attached.
> >
> > Please give alsa-info.sh output instead. It'll contain more
> > comprehensive information to analyze.
>
> Sorry. I have an alsa-info of a slightly differently machine here:
>
> http://launchpadlibrarian.net/49532111/alsa-info-forrest
>
> The difference is two outputs (one line, one headphone), and two inputs.
Thanks.
> >> Here's my analysis so far:
> >>
> >> 1) If there's one internal speaker and one line-out (rather than
> >> headphone-out), should the internal speaker auto-mute? What's standard
> >> practice?
> >
> > It's just because the pin is a line-out, no headphone (in addition to
> > the bug below).
> > If the pin is declared as a headphone, the driver turns on the
> > auto-mute function.
> >
> >> 2) There are two DAC nids, 0x02 and 0x03, but only 0x02 is used (i e
> >> activated on playback). But line-out is connected (via nid 0x0d) to DAC
> >> 0x03, so there is no sound on line-out.
> >
> > Right, it's a missing check of the pin.
>
> Should that have given a warning message, or is it a normal condition
> to ignore pins?
It depends. I personally think it's good to give a warning, though.
> > The pin 0x1b doesn't exist on
> > ALC268, so the parser (shared by both ALC268/269) ignored it.
> > The one-liner below fixes the problem.
>
> Nice, thanks for spotting! I've attached a signed-off commit that
> un-ignores both 0x1b and 0x1a (the latter one used in the alsa-info link
> above). Please apply.
OK, 0x1a is another thing. As I already applied the fix for 0x1b,
I apply it in addition.
But, this isn't the "right" fix -- these pins are actually invalid on
ALC268. The parse should be changed to check the pin capability,
and assign dynamically.
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-30 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 7:37 Fixing ALC269 the right way? David Henningsson
2010-07-30 8:11 ` Takashi Iwai
2010-07-30 11:42 ` David Henningsson
2010-07-30 12:06 ` Takashi Iwai
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.