* Recent code changes for HD-audio on HG repo
@ 2007-08-10 15:53 Takashi Iwai
0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2007-08-10 15:53 UTC (permalink / raw)
To: alsa-devel
Hi,
right now I committed a series of patches for HD-audio driver to HG
repository. There are two big changes:
- The suspend/resume code is rewritten
Now the driver uses cached register values to restore the last
status. It's much cleaner than the previous code, and should work
better. But, I couldn't test it on all existing laptops.
So, please test and report any positive/negative feedbacks.
- New POWER_SAVE kconfig
The driver has POWER_SAVE confiugration. When enabled (it's so if
you build from alsa-driver tree), the driver turns off the codec and
the controller chips when not used, and turn on again dynamically on
demand. Good for laptops, good for mother earth! :)
The feature can be enabled/diabled even on the fly via "power_save"
module option of snd-hda-intel. For disabling it, write 0 to
/sys/modules/snd_hda_intel/parameters/power_save for disabling it,
or pass power_save=0 in modprobe option (or its configuration).
Again, please give any positive/negative feedbacks, as I couldn't test
many devices.
thanks,
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Recent code changes for HD-audio on HG repo
@ 2007-08-11 13:03 Claude Michel
2007-08-11 16:30 ` Tobin Davis
2007-08-13 13:48 ` Takashi Iwai
0 siblings, 2 replies; 12+ messages in thread
From: Claude Michel @ 2007-08-11 13:03 UTC (permalink / raw)
To: alsa-devel
Hi,
I have done come test of the new suspend/resume capabilities.
However suspend failed to correctly work on my laptop (dell d630).
You must note that there is a few trouble issues with sound on this laptop:
the snd_hda_intel driver correctly detect a STAC9205 and get the default
pin configuration from the bios. So far, so good ... however, pin B is by
default configured as line out and is working as such. But, it does not
correctly work with an external microphone as it need a vref. So,
instead of using the
bios settings, I use the windows default settings. This is not perfectly
working : I usually get some glinches that disappear after a logout/login
procedure. Nothing significant appears from a diff between
/proc/asound/card0/codec0
before and after this procedure ...
Now let talk about the suspend failure. The suspend procedure (which was
previously
working) produce a bug (I was not able to catch the message at this
stage. This is a
partial and hand written report ..):
Bug: unable to handle kernel NULL Pointer deferred at virtual address 0000
....
Call trace
...
<f9546d24> hda_set_power_state+0x34/0x150 [snd_hda_intel] <f9547768>
hda_call_code_suspend+0x39/0x60 [snd_hda_intel]
<f955477b7> snd_hda_suspend+0x27/0x50 [snd_hda_intel]<f954603c>
azx_suspend+0x60/0xd0 [snd_hda_intel]
<c023b29ac> pci_device_suspend+0x2c/0x70 <c0f29effd>
suspend_devide+0xdd/0x110
....
By the way, I am running mandriva 2007.1 with kernel 2.6.17-14mdv.
cpjm
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-11 13:03 Recent code changes for HD-audio on HG repo Claude Michel
@ 2007-08-11 16:30 ` Tobin Davis
2007-08-13 13:48 ` Takashi Iwai
1 sibling, 0 replies; 12+ messages in thread
From: Tobin Davis @ 2007-08-11 16:30 UTC (permalink / raw)
To: Claude Michel; +Cc: alsa-devel
I have some spare cycles to look into this over the weekend. Please
send me the output from
http://bulletproof.servebeer.com/alsa/scripts/alsa-info.sh .
We can take this off-list and I can send you some test patches.
Thanks,
Tobin
On Sat, 2007-08-11 at 15:03 +0200, Claude Michel wrote:
> Hi,
>
> I have done come test of the new suspend/resume capabilities.
> However suspend failed to correctly work on my laptop (dell d630).
> You must note that there is a few trouble issues with sound on this laptop:
> the snd_hda_intel driver correctly detect a STAC9205 and get the default
> pin configuration from the bios. So far, so good ... however, pin B is by
> default configured as line out and is working as such. But, it does not
> correctly work with an external microphone as it need a vref. So,
> instead of using the
> bios settings, I use the windows default settings. This is not perfectly
> working : I usually get some glinches that disappear after a logout/login
> procedure. Nothing significant appears from a diff between
> /proc/asound/card0/codec0
> before and after this procedure ...
>
> Now let talk about the suspend failure. The suspend procedure (which was
> previously
> working) produce a bug (I was not able to catch the message at this
> stage. This is a
> partial and hand written report ..):
> Bug: unable to handle kernel NULL Pointer deferred at virtual address 0000
> ....
> Call trace
> ...
> <f9546d24> hda_set_power_state+0x34/0x150 [snd_hda_intel] <f9547768>
> hda_call_code_suspend+0x39/0x60 [snd_hda_intel]
> <f955477b7> snd_hda_suspend+0x27/0x50 [snd_hda_intel]<f954603c>
> azx_suspend+0x60/0xd0 [snd_hda_intel]
> <c023b29ac> pci_device_suspend+0x2c/0x70 <c0f29effd>
> suspend_devide+0xdd/0x110
> ....
>
> By the way, I am running mandriva 2007.1 with kernel 2.6.17-14mdv.
> cpjm
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
Tobin Davis <tdavis@dsl-only.net>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-11 13:03 Recent code changes for HD-audio on HG repo Claude Michel
2007-08-11 16:30 ` Tobin Davis
@ 2007-08-13 13:48 ` Takashi Iwai
1 sibling, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2007-08-13 13:48 UTC (permalink / raw)
To: Claude Michel; +Cc: alsa-devel
At Sat, 11 Aug 2007 15:03:09 +0200,
Claude Michel wrote:
>
>
> Hi,
>
> I have done come test of the new suspend/resume capabilities.
> However suspend failed to correctly work on my laptop (dell d630).
> You must note that there is a few trouble issues with sound on this laptop:
> the snd_hda_intel driver correctly detect a STAC9205 and get the default
> pin configuration from the bios. So far, so good ... however, pin B is by
> default configured as line out and is working as such. But, it does not
> correctly work with an external microphone as it need a vref. So,
> instead of using the
> bios settings, I use the windows default settings. This is not perfectly
> working : I usually get some glinches that disappear after a logout/login
> procedure. Nothing significant appears from a diff between
> /proc/asound/card0/codec0
> before and after this procedure ...
>
> Now let talk about the suspend failure. The suspend procedure (which was
> previously
> working) produce a bug (I was not able to catch the message at this
> stage. This is a
> partial and hand written report ..):
> Bug: unable to handle kernel NULL Pointer deferred at virtual address 0000
> ....
> Call trace
> ...
> <f9546d24> hda_set_power_state+0x34/0x150 [snd_hda_intel] <f9547768>
> hda_call_code_suspend+0x39/0x60 [snd_hda_intel]
> <f955477b7> snd_hda_suspend+0x27/0x50 [snd_hda_intel]<f954603c>
> azx_suspend+0x60/0xd0 [snd_hda_intel]
> <c023b29ac> pci_device_suspend+0x2c/0x70 <c0f29effd>
> suspend_devide+0xdd/0x110
> ....
Could you copy the exact output of these call traces?
> By the way, I am running mandriva 2007.1 with kernel 2.6.17-14mdv.
I guess it's a problem with 2.6.17 kernel. Maybe the wrapper for the
new kernel API in alsa-driver tree is somehow broken. Check compiler
warnings especially for the compilation of hda_codec.c, too.
I didn't get oops, at least. Tthere was another bug that got fixed
today, so please update to the latest version from
hg.alsa-project.org (not from hg-mirror).
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Recent code changes for HD-audio on HG repo
@ 2007-08-14 18:41 nicfagn
2007-08-15 10:10 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: nicfagn @ 2007-08-14 18:41 UTC (permalink / raw)
To: alsa-devel
I tested the alsa-driver-hg20070814 snapshot on my system and after the power save timeout (10 secs) the sound stops working.
I am on an iMac 24''(2006) with hda and realtek ALC885 and Ubuntu Gutsy with a 2.6.22-9 kernel.
If I can help in some way, let me know.
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-14 18:41 nicfagn
@ 2007-08-15 10:10 ` Takashi Iwai
2007-08-15 19:40 ` Nicola Fagnani
0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2007-08-15 10:10 UTC (permalink / raw)
To: nicfagn; +Cc: alsa-devel
At Tue, 14 Aug 2007 20:41:04 +0200,
nicfagn wrote:
>
> I tested the alsa-driver-hg20070814 snapshot on my system and after the power save timeout (10 secs) the sound stops working.
> I am on an iMac 24''(2006) with hda and realtek ALC885 and Ubuntu Gutsy with a 2.6.22-9 kernel.
> If I can help in some way, let me know.
Try hg20070815. Some bugs were fixed yesterday :)
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-15 10:10 ` Takashi Iwai
@ 2007-08-15 19:40 ` Nicola Fagnani
2007-08-15 20:27 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Nicola Fagnani @ 2007-08-15 19:40 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Il giorno 15/ago/07, alle ore 12:10, Takashi Iwai ha scritto:
> At Tue, 14 Aug 2007 20:41:04 +0200,
> nicfagn wrote:
>>
>> I tested the alsa-driver-hg20070814 snapshot on my system and
>> after the power save timeout (10 secs) the sound stops working.
>> I am on an iMac 24''(2006) with hda and realtek ALC885 and Ubuntu
>> Gutsy with a 2.6.22-9 kernel.
>> If I can help in some way, let me know.
>
> Try hg20070815. Some bugs were fixed yesterday :)
>
>
> Takashi
Sorry, but hg20070815 still not working. After 10 seconds the sound
goes mute.
hg20070812 is the last snapshot where the sound worked as usual, but
that didn't include the fix for the test at the entry of the
azx_stop_chip() function in hda_intel.c, so the code in that function
was always skipped and the azx_init_chip() function was called only
once.
What these functions do is clear enough from their names, but the low
level details are a bit too much in depth for me. :-)
Is there anything I could check or test to help?
Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-15 19:40 ` Nicola Fagnani
@ 2007-08-15 20:27 ` Takashi Iwai
0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2007-08-15 20:27 UTC (permalink / raw)
To: Nicola Fagnani; +Cc: alsa-devel
At Wed, 15 Aug 2007 21:40:33 +0200,
Nicola Fagnani wrote:
>
>
> Il giorno 15/ago/07, alle ore 12:10, Takashi Iwai ha scritto:
>
> > At Tue, 14 Aug 2007 20:41:04 +0200,
> > nicfagn wrote:
> >>
> >> I tested the alsa-driver-hg20070814 snapshot on my system and
> >> after the power save timeout (10 secs) the sound stops working.
> >> I am on an iMac 24''(2006) with hda and realtek ALC885 and Ubuntu
> >> Gutsy with a 2.6.22-9 kernel.
> >> If I can help in some way, let me know.
> >
> > Try hg20070815. Some bugs were fixed yesterday :)
> >
> >
> > Takashi
>
> Sorry, but hg20070815 still not working. After 10 seconds the sound
> goes mute.
Which hardware, which codec and what mixer setting?
How did you check it went to mute?
> hg20070812 is the last snapshot where the sound worked as usual, but
> that didn't include the fix for the test at the entry of the
> azx_stop_chip() function in hda_intel.c, so the code in that function
> was always skipped and the azx_init_chip() function was called only
> once.
> What these functions do is clear enough from their names, but the low
> level details are a bit too much in depth for me. :-)
> Is there anything I could check or test to help?
Try to add printk in hda_power_up(), hda_power_down(), and
hda_power_work() functions to show the current codec->power_count
and codec->power_on values. The up and down have to be called at each
PCM open and close, respecitvely. Also the access to each mixer
element invokes up and down, too.
When the counts of all codecs go to zero, azx_power_notify() calls
azx_stop_chip(). OTOH, when a codec is powered on, azx_power_notify()
calls azx_init_chip() again. If these functions get called properly,
then there must be a problem in the initialization / resume phase.
You can set power_save_controller=0 module option to disable the call
of azx_stop_chip(). If this cures the problem, then the problem is in
the resume of the controller chip. If not, it's in another place,
e.g. the resume of codec registers. So, it's important to know the
detail of your hardware. The current driver works fine on my
systems.
BTW, the patch below is a fix I forgot to apply (now already on HG
tree), but it shouldn't influence on the "mute after 10 seconds"
behavior.
Takashi
---
# HG changeset patch
# User tiwai
# Date 1187209102 -7200
# Node ID 22fe10ab35e8e98413a3d95697579fb5dd0c7908
# Parent e02b6e9d22d79b4a6724561d49a398976fddc1d6
hda-intel - Add flush_scheduled_work() in snd_hda_codec_free()
Added flush_scheduled_work() in snd_hda_codec_free() to make sure that
the all work is gone. Also, optimized the condition to schedule the
delayed work in snd_hda_power_down().
diff -r e02b6e9d22d7 -r 22fe10ab35e8 pci/hda/hda_codec.c
--- a/pci/hda/hda_codec.c Wed Aug 15 16:44:04 2007 +0200
+++ b/pci/hda/hda_codec.c Wed Aug 15 22:18:22 2007 +0200
@@ -525,6 +525,7 @@ static void snd_hda_codec_free(struct hd
return;
#ifdef CONFIG_SND_HDA_POWER_SAVE
cancel_delayed_work(&codec->power_work);
+ flush_scheduled_work();
#endif
list_del(&codec->list);
codec->bus->caddr_tbl[codec->addr] = NULL;
@@ -2223,7 +2224,7 @@ void snd_hda_power_down(struct hda_codec
void snd_hda_power_down(struct hda_codec *codec)
{
--codec->power_count;
- if (!codec->power_on)
+ if (!codec->power_on || codec->power_count)
return;
if (power_save)
schedule_delayed_work(&codec->power_work,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
@ 2007-08-15 22:33 Nicola Fagnani
2007-08-16 10:17 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Nicola Fagnani @ 2007-08-15 22:33 UTC (permalink / raw)
To: tiwai; +Cc: alsa-devel
As you said, the patch didn't solve the problem.
To test audio I used this simple command:
aplay < /bin/bash
but if there is no audio output for a while, executing it produces no noise.
When I said the sound goes mute, I meant there is no sound, not that some
audio channel is muted.
If I set the power_save_controller=0 module option the sound works always,
so these are the details of my hardware:
lspci -v
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
Subsystem: Realtek Semiconductor Co., Ltd. Unknown device 0885
Flags: bus master, fast devsel, latency 0, IRQ 21
Memory at 52400000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [70] Express Unknown type IRQ 0
cat /proc/asound/card0/codec#0
Codec: Realtek ALC885
Address: 0
Vendor Id: 0x10ec0885
Subsystem Id: 0x106b1000
Revision Id: 0x100103
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
Node 0x02 [Audio Output] wcaps 0x11: Stereo
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x11: Stereo
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x04 [Audio Output] wcaps 0x11: Stereo
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x05 [Audio Output] wcaps 0x11: Stereo
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x24
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
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
Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x22
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Connection: 1
0x1f
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] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97]
Connection: 10
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x2c 0x2c]
Connection: 2
0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x05 0x0b
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x012b4050: [Jack] HP Out at Ext Rear
Conn = Comb, Color = Green
Pin-ctls: 0xc0: OUT HP
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x018b3020: [Jack] Line In at Ext Rear
Conn = Comb, Color = Blue
Pin-ctls: 0x20: IN
Connection: 5
0x0c 0x0d* 0x0e 0x0f 0x26
Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x083c: IN OUT HP Detect
Pin Default 0x400000f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x20: IN
Connection: 5
0x0c 0x0d 0x0e* 0x0f 0x26
Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x083c: IN OUT HP Detect
Pin Default 0x400000f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x20: IN
Connection: 5
0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x90100140: [Fixed] Speaker at Int N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x40: OUT
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x90a00110: [Fixed] Mic at Int N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x24: IN
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x90100141: [Fixed] Speaker at Int N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x40: OUT
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x08373c: IN OUT HP Detect
Pin Default 0x400000f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x20: IN
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x0820: IN
Pin Default 0x400000f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x20: IN
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
Pincap 0x0820: IN
Pin Default 0x400000f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x20: IN
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
Pincap 0x0810: OUT
Pin Default 0x014be060: [Jack] SPDIF Out at Ext Rear
Conn = Comb, Color = White
Pin-ctls: 0x40: OUT
Connection: 1
0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
Pincap 0x0820: IN
Pin Default 0x01cbe030: [Jack] SPDIF In at Ext Rear
Conn = Comb, Color = White
Pin-ctls: 0x20: IN
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [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
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] [0x80 0x80] [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
Node 0x24 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [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
Node 0x25 [Audio Output] wcaps 0x11: Stereo
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x25 0x0b
amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 44 [69%] [-20.00dB] [on]
Front Right: Playback 44 [69%] [-20.00dB] [on]
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Mono
Capture channels: Mono
Mono: Playback [off] Capture [off]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 0 [0%] [-16.00dB] [on]
Front Right: Capture 0 [0%] [-16.00dB] [on]
Simple mixer control 'Capture',1
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 0 [0%] [-16.00dB] [on]
Front Right: Capture 0 [0%] [-16.00dB] [on]
Simple mixer control 'Capture',2
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 0 [0%] [-16.00dB] [on]
Front Right: Capture 0 [0%] [-16.00dB] [on]
Simple mixer control 'Digital',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 120
Front Left: Capture 60 [50%] [0.00dB]
Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Input Source',0
Capabilities: enum
Items: 'Mic' 'Front Mic' 'Line' 'CD'
Item0: 'Mic'
Simple mixer control 'Input Source',1
Capabilities: enum
Items: 'Mic' 'Front Mic' 'Line' 'CD'
Item0: 'Mic'
Simple mixer control 'Input Source',2
Capabilities: enum
Items: 'Mic' 'Front Mic' 'Line' 'CD'
Item0: 'Mic'
If this isn't enough, let me know.
Thanks
Nicola Fagnani
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-15 22:33 Nicola Fagnani
@ 2007-08-16 10:17 ` Takashi Iwai
2007-08-16 12:21 ` Nicola Fagnani
0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2007-08-16 10:17 UTC (permalink / raw)
To: Nicola Fagnani; +Cc: alsa-devel
At Thu, 16 Aug 2007 00:33:15 +0200,
Nicola Fagnani wrote:
>
> As you said, the patch didn't solve the problem.
> To test audio I used this simple command:
>
> aplay < /bin/bash
>
> but if there is no audio output for a while, executing it produces no noise.
> When I said the sound goes mute, I meant there is no sound, not that some
> audio channel is muted.
Ah, so you mean that the sound goes away once after 10 second inactive
state that results in the automatic power-off?
I thought you meaning that the sound vanishes suddenly _during_
playing back.
> If I set the power_save_controller=0 module option the sound works always,
> so these are the details of my hardware:
Are you sure that you passed power_save_controller=0, not
power_save=0? See below.
> cat /proc/asound/card0/codec#0
>
> Codec: Realtek ALC885
> Address: 0
> Vendor Id: 0x10ec0885
> Subsystem Id: 0x106b1000
OK, it's an Intel Mac, right? Then maybe the culprit is the missing
GPIO initialization. It's done only at creation time.
Did you get the PM suspend/resume working with this machine?
I guess you'll have the same problem, too.
Anyway, try the patch below. Hopefully it fixes the power-save
problem too.
Takashi
diff -r 64a0f0aac927 pci/hda/patch_realtek.c
--- a/pci/hda/patch_realtek.c Wed Aug 15 22:20:45 2007 +0200
+++ b/pci/hda/patch_realtek.c Thu Aug 16 12:15:05 2007 +0200
@@ -5275,6 +5275,20 @@ static void alc882_gpio_mute(struct hda_
AC_VERB_SET_GPIO_DATA, gpiostate);
}
+/* set up GPIO at initialization */
+static void alc885_macpro_init_hook(struct hda_codec *codec)
+{
+ alc882_gpio_mute(codec, 0, 0);
+ alc882_gpio_mute(codec, 1, 0);
+}
+
+/* set up GPIO and update auto-muting at initialization */
+static void alc885_imac24_init_hook(struct hda_codec *codec)
+{
+ alc885_macpro_init_hook(codec);
+ alc885_imac24_automute(codec);
+}
+
/*
* generic initialization of ADC, input mixers and output mixers
*/
@@ -5479,6 +5493,7 @@ static struct alc_config_preset alc882_p
.num_channel_mode = ARRAY_SIZE(alc882_ch_modes),
.channel_mode = alc882_ch_modes,
.input_mux = &alc882_capture_source,
+ .init_hook = alc885_macpro_init_hook,
},
[ALC885_IMAC24] = {
.mixers = { alc885_imac24_mixer },
@@ -5491,7 +5506,7 @@ static struct alc_config_preset alc882_p
.channel_mode = alc882_ch_modes,
.input_mux = &alc882_capture_source,
.unsol_event = alc885_imac24_unsol_event,
- .init_hook = alc885_imac24_automute,
+ .init_hook = alc885_imac24_init_hook,
},
[ALC882_TARGA] = {
.mixers = { alc882_targa_mixer, alc882_chmode_mixer,
@@ -5693,11 +5708,6 @@ static int patch_alc882(struct hda_codec
if (board_config != ALC882_AUTO)
setup_preset(spec, &alc882_presets[board_config]);
-
- if (board_config == ALC885_MACPRO || board_config == ALC885_IMAC24) {
- alc882_gpio_mute(codec, 0, 0);
- alc882_gpio_mute(codec, 1, 0);
- }
spec->stream_name_analog = "ALC882 Analog";
spec->stream_analog_playback = &alc882_pcm_analog_playback;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-16 10:17 ` Takashi Iwai
@ 2007-08-16 12:21 ` Nicola Fagnani
2007-08-16 13:37 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Nicola Fagnani @ 2007-08-16 12:21 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
> Are you sure that you passed power_save_controller=0, not
> power_save=0? See below.
>
Yes, I set power_save_controller=0. This should have disabled the
power save
timeout, preventing the call of azx_stop_chip().
> OK, it's an Intel Mac, right? Then maybe the culprit is the missing
> GPIO initialization. It's done only at creation time.
> Did you get the PM suspend/resume working with this machine?
> I guess you'll have the same problem, too.
>
Right, I forgot that initialization and in fact the sound never
worked after a
suspend.
> Anyway, try the patch below. Hopefully it fixes the power-save
> problem too.
Yes, it does. :-) Great work!
It fixes suspend too :-D
Thanks very much
Nicola Fagnani
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Recent code changes for HD-audio on HG repo
2007-08-16 12:21 ` Nicola Fagnani
@ 2007-08-16 13:37 ` Takashi Iwai
0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2007-08-16 13:37 UTC (permalink / raw)
To: Nicola Fagnani; +Cc: alsa-devel
At Thu, 16 Aug 2007 14:21:39 +0200,
Nicola Fagnani wrote:
>
>
> > Are you sure that you passed power_save_controller=0, not
> > power_save=0? See below.
> >
>
> Yes, I set power_save_controller=0. This should have disabled the
> power save
> timeout, preventing the call of azx_stop_chip().
So, GPIO isn't reset as long as the controller alive. It sounds
reasonable.
> > OK, it's an Intel Mac, right? Then maybe the culprit is the missing
> > GPIO initialization. It's done only at creation time.
> > Did you get the PM suspend/resume working with this machine?
> > I guess you'll have the same problem, too.
> >
>
> Right, I forgot that initialization and in fact the sound never
> worked after a
> suspend.
>
> > Anyway, try the patch below. Hopefully it fixes the power-save
> > problem too.
>
> Yes, it does. :-) Great work!
> It fixes suspend too :-D
Thanks for confirmation. I committed it now to HG tree.
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-08-16 13:37 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-11 13:03 Recent code changes for HD-audio on HG repo Claude Michel
2007-08-11 16:30 ` Tobin Davis
2007-08-13 13:48 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2007-08-15 22:33 Nicola Fagnani
2007-08-16 10:17 ` Takashi Iwai
2007-08-16 12:21 ` Nicola Fagnani
2007-08-16 13:37 ` Takashi Iwai
2007-08-14 18:41 nicfagn
2007-08-15 10:10 ` Takashi Iwai
2007-08-15 19:40 ` Nicola Fagnani
2007-08-15 20:27 ` Takashi Iwai
2007-08-10 15:53 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.