LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
       [not found] <200703051024.l25AOIF3015951@shell0.pdx.osdl.net>
@ 2007-03-05 14:49 ` Michal Piotrowski
  2007-03-07 11:36   ` Michal Piotrowski
  2007-03-05 15:53 ` Michal Piotrowski
  2007-03-05 18:02 ` Michal Piotrowski
  2 siblings, 1 reply; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-05 14:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: perex, alsa-devel, Andrew Morton, linux-kernel

Hi,

akpm@linux-foundation.org napisał(a):
> The mm snapshot broken-out-2007-03-05-02-22.tar.gz has been uploaded to
> 
>    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/broken-out-2007-03-05-02-22.tar.gz
> 
> It contains the following patches against 2.6.21-rc2:
> 

Outstanding issue - my 3d surround doesn't work since 2.6.20.

I'll bisect this commits
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=724339d76d9407cd1a8ad32a9c1fdf64840cc51b
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6026179519896e7d35b2564e7544487d1c8948e7

00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
        Subsystem: ASUSTeK Computer Inc. P4P800 Mainboard
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0
        Interrupt: pin B routed to IRQ 17
        Region 0: I/O ports at d000 [size=256]
        Region 1: I/O ports at d400 [size=64]
        Region 2: Memory at f5fff800 (32-bit, non-prefetchable) [size=512]
        Region 3: Memory at f5fff400 (32-bit, non-prefetchable) [size=256]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).

CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m

CONFIG_SND_INTEL8X0=m

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
       [not found] <200703051024.l25AOIF3015951@shell0.pdx.osdl.net>
  2007-03-05 14:49 ` mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded Michal Piotrowski
@ 2007-03-05 15:53 ` Michal Piotrowski
  2007-03-05 18:02 ` Michal Piotrowski
  2 siblings, 0 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-05 15:53 UTC (permalink / raw)
  To: Andrew Morton, Pavel Machek, Rafael J. Wysocki, Ingo Molnar,
	Russell King, LKML

akpm@linux-foundation.org napisał(a):
> The mm snapshot broken-out-2007-03-05-02-22.tar.gz has been uploaded to
> 
>    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/broken-out-2007-03-05-02-22.tar.gz
> 
> It contains the following patches against 2.6.21-rc2:
> 

Hmmm... lockdep bug, possible serial8250 problem and suspend to disk doesn't work.

PM: suspend-to-disk mode set to 'shutdown'
Stopping tasks ... BUG: at kernel/lockdep.c:2428 check_flags()
 [<c0105256>] show_trace_log_lvl+0x1a/0x2f
 [<c010597b>] show_trace+0x12/0x14
 [<c0105a3d>] dump_stack+0x16/0x18
 [<c013d3bd>] check_flags+0xb7/0x187
 [<c01405f2>] lock_acquire+0x3a/0x93
 [<c033ae3f>] _spin_lock+0x35/0x42
 [<c0149b77>] refrigerator+0x14/0xb5
 [<c012eb85>] get_signal_to_deliver+0x42/0x709
 [<c0103786>] do_notify_resume+0x94/0x778
 [<c0104339>] work_notifysig+0x13/0x1a
 =======================
irq event stamp: 158057
hardirqs last  enabled at (158057): [<c0104391>] syscall_exit_work+0x11/0x26
hardirqs last disabled at (158056): [<c010427d>] syscall_exit+0x9/0x1a
softirqs last  enabled at (157962): [<c0128a03>] __do_softirq+0xc7/0xcc
softirqs last disabled at (157957): [<c0128a41>] do_softirq+0x39/0x55
BUG: workqueue leaked lock or atomic: events/0/0x00000000/8
    last function: console_callback+0x0/0xca
1 lock held by events/0/8:
 #0:  (&port_lock_key){....}, at: [<c0267c1f>] serial8250_console_write+0x55/0x13c
 [<c0105256>] show_trace_log_lvl+0x1a/0x2f
 [<c010597b>] show_trace+0x12/0x14
 [<c0105a3d>] dump_stack+0x16/0x18
 [<c0132945>] run_workqueue+0x121/0x14f
 [<c0133298>] worker_thread+0x118/0x126
 [<c01354eb>] kthread+0xb5/0xde
 [<c0104ed7>] kernel_thread_helper+0x7/0x10
 =======================
BUG: workqueue leaked lock or atomic: events/0/0x00000000/8
    last function: console_callback+0x0/0xca
1 lock held by events/0/8:
 #0:  (&port_lock_key){....}, at: [<c0267c1f>] serial8250_console_write+0x55/0x13c
 [<c0105256>] show_trace_log_lvl+0x1a/0x2f
 [<c010597b>] show_trace+0x12/0x14
 [<c0105a3d>] dump_stack+0x16/0x18
 [<c0132945>] run_workqueue+0x121/0x14f
 [<c0133298>] worker_thread+0x118/0x126
 [<c01354eb>] kthread+0xb5/0xde
 [<c0104ed7>] kernel_thread_helper+0x7/0x10
 =======================
done.
Shrinking memory...  <3>BUG: workqueue leaked lock or atomic: events/0/0x00000000/8
    last function: cache_reap+0x0/0x100
1 lock held by events/0/8:
 #0:  (&port_lock_key){....}, at: [<c0267c1f>] serial8250_console_write+0x55/0x13c
 [<c0105256>] show_trace_log_lvl+0x1a/0x2f
 [<c010597b>] show_trace+0x12/0x14
 [<c0105a3d>] dump_stack+0x16/0x18
 [<c0132945>] run_workqueue+0x121/0x14f
 [<c0133298>] worker_thread+0x118/0x126
 [<c01354eb>] kthread+0xb5/0xde
 [<c0104ed7>] kernel_thread_helper+0x7/0x10
 =======================
\b-\b\\b|\b/\b-\b\\bdone (76069 pages freed)
Freed 304276 kbytes in 1.04 seconds (292.57 MB/s)
Suspending console(s)

l *0xc0267c1f
0xc0267c1f is in serial8250_console_write (drivers/serial/8250.c:2469).
2464                    /* serial8250_handle_port() already took the lock */
2465                    locked = 0;
2466            } else if (oops_in_progress) {
2467                    locked = spin_trylock(&up->port.lock);
2468            } else
2469                    spin_lock(&up->port.lock);
2470
2471            /*
2472             *      First save the IER then disable the interrupts
2473             */

http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/broken-out-2007-03-05-02-22/mm-config

serial console log
http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/broken-out-2007-03-05-02-22/mm_snaps.txt

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
       [not found] <200703051024.l25AOIF3015951@shell0.pdx.osdl.net>
  2007-03-05 14:49 ` mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded Michal Piotrowski
  2007-03-05 15:53 ` Michal Piotrowski
@ 2007-03-05 18:02 ` Michal Piotrowski
  2 siblings, 0 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-05 18:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Mariusz Kozlowski

akpm@linux-foundation.org napisał(a):
> The mm snapshot broken-out-2007-03-05-02-22.tar.gz has been uploaded to
> 
>    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/broken-out-2007-03-05-02-22.tar.gz
> 
> It contains the following patches against 2.6.21-rc2:

This might be helpful in tracking down this bug

http://www.ussg.iu.edu/hypermail/linux/kernel/0703.0/index.html#0889
http://www.ussg.iu.edu/hypermail/linux/kernel/0703.0/index.html#1165

SysRq : Terminate All Tasks
SysRq : Kill All Tasks
SysRq : SAK
------------[ cut here ]------------
kernel BUG at kernel/workqueue.c:156!
invalid opcode: 0000 [#1]
PREEMPT SMP 
last sysfs file: devices/platform/i2c-9191/9191-0290/temp2_input
Modules linked in: isofs nls_base zlib_inflate ipt_MASQUERADE iptable_nat nf_nat nfsd exportfs lockd nfs_acl autofs4 sunrpc af_packet nf_conntrack_netbios_ns ipt_REJECT nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink xt_tcpudp iptable_filter ip_tables x_tables ipv6 binfmt_misc thermal processor fan container nvram snd_intel8x0 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm evdev snd_timer intel_agp snd agpgart soundcore skge i2c_i801 snd_page_alloc 8139too sk98lin mii ide_cd cdrom rtc unix
CPU:    0
EIP:    0060:[<c0132ddb>]    Not tainted VLI
EFLAGS: 00010002   (2.6.21-rc2-mm1 #2)
EIP is at queue_work+0x2f/0x8f
eax: 00000001   ebx: c07d783c   ecx: c042f96c   edx: 00000001
esi: c781a7f8   edi: 0000006b   ebp: d097be24   esp: d097be1c
ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
Process firefox-bin (pid: 12655, ti=d097a000 task=cec52ae0 task.ti=d097a000)
Stack: c044ea50 00000001 d097be2c c0132e4a d097be34 c0261e91 d097be5c c0261d8f 
       c03f0f61 c03f2f32 cc3686ec 00000008 00000082 00000025 00000000 00000025 
       d097be64 c0261f6a d097be90 c025cbb6 0000157f 007bb2e1 cc3686ec 01010036 
Call Trace:
 [<c0105256>] show_trace_log_lvl+0x1a/0x2f
 [<c0105308>] show_stack_log_lvl+0x9d/0xac
 [<c0105504>] show_registers+0x1ed/0x34c
 [<c0105780>] die+0x11d/0x234
 [<c0105921>] do_trap+0x8a/0xa3
 [<c010620a>] do_invalid_op+0x97/0xa1
 [<c033b764>] error_code+0x7c/0x84
 [<c0132e4a>] schedule_work+0xf/0x11
 [<c0261e91>] sysrq_handle_SAK+0x14/0x16
 [<c0261d8f>] __handle_sysrq+0x8c/0x109
 [<c0261f6a>] handle_sysrq+0x1f/0x21
 [<c025cbb6>] kbd_event+0x2d8/0x4ee
 [<c02bd926>] input_event+0x420/0x442
 [<c02c0ff9>] atkbd_interrupt+0x44d/0x518
 [<c02ba6b2>] serio_interrupt+0x49/0x7f
 [<c02bb4ec>] i8042_interrupt+0x226/0x239
 [<c0155886>] handle_IRQ_event+0x1a/0x46
 [<c015699e>] handle_edge_irq+0x10a/0x14e
 [<c0106c22>] do_IRQ+0xa3/0xbd
 [<c0104c52>] common_interrupt+0x2e/0x34
 =======================
Code: 53 89 c6 89 d3 f0 0f ba 2a 00 19 c0 31 d2 85 c0 75 73 8d 43 04 31 d2 39 43 04 0f 95 c2 b8 6c f9 42 c0 e8 b1 e4 0d 00 85 c0 74 04 <0f> 0b eb fe b8 01 00 00 00 e8 73 bd fe ff e8 da db 0d 00 89 c2 
EIP: [<c0132ddb>] queue_work+0x2f/0x8f SS:ESP 0068:d097be1c

l *0xc0132ddb
0xc0132ddb is in queue_work (kernel/workqueue.c:156).
151     int fastcall queue_work(struct workqueue_struct *wq, struct work_struct *work)
152     {
153             int ret = 0;
154
155             if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) {
156                     BUG_ON(!list_empty(&work->entry));
157                     __queue_work(wq_per_cpu(wq, get_cpu()), work);
158                     put_cpu();
159                     ret = 1;
160             }

http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/broken-out-2007-03-05-02-22/mm-config

serial console log
http://www.stardust.webpages.pl/files/tbf/bitis-gabonica/broken-out-2007-03-05-02-22/mm_snaps2.txt

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-05 14:49 ` mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded Michal Piotrowski
@ 2007-03-07 11:36   ` Michal Piotrowski
  2007-03-07 18:47     ` Andrew Morton
  0 siblings, 1 reply; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-07 11:36 UTC (permalink / raw)
  To: Randy Cushman
  Cc: Takashi Iwai, Jaroslav Kysela, alsa-devel, Andrew Morton,
	linux-kernel, Linus Torvalds

Michal Piotrowski napisał(a):
> Hi,
> 
> akpm@linux-foundation.org napisał(a):
>> The mm snapshot broken-out-2007-03-05-02-22.tar.gz has been uploaded to
>>
>>    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/broken-out-2007-03-05-02-22.tar.gz
>>
>> It contains the following patches against 2.6.21-rc2:
>>
> 
> Outstanding issue - my 3d surround doesn't work since 2.6.20.
> 
> I'll bisect this commits
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=724339d76d9407cd1a8ad32a9c1fdf64840cc51b
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6026179519896e7d35b2564e7544487d1c8948e7
> 
> 00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
>         Subsystem: ASUSTeK Computer Inc. P4P800 Mainboard
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
>         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
>         Latency: 0
>         Interrupt: pin B routed to IRQ 17
>         Region 0: I/O ports at d000 [size=256]
>         Region 1: I/O ports at d400 [size=64]
>         Region 2: Memory at f5fff800 (32-bit, non-prefetchable) [size=512]
>         Region 3: Memory at f5fff400 (32-bit, non-prefetchable) [size=256]
>         Capabilities: [50] Power Management version 2
>                 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
>                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> 
> Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).
> 
> CONFIG_SND=m
> CONFIG_SND_TIMER=m
> CONFIG_SND_PCM=m
> CONFIG_SND_RAWMIDI=m
> CONFIG_SND_SEQUENCER=m
> CONFIG_SND_SEQ_DUMMY=m
> CONFIG_SND_OSSEMUL=y
> CONFIG_SND_MIXER_OSS=m
> CONFIG_SND_PCM_OSS=m
> CONFIG_SND_PCM_OSS_PLUGINS=y
> CONFIG_SND_SEQUENCER_OSS=y
> CONFIG_SND_RTCTIMER=m
> CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
> # CONFIG_SND_DYNAMIC_MINORS is not set
> CONFIG_SND_SUPPORT_OLD_API=y
> CONFIG_SND_VERBOSE_PROCFS=y
> # CONFIG_SND_VERBOSE_PRINTK is not set
> # CONFIG_SND_DEBUG is not set
> 
> CONFIG_SND_AC97_CODEC=m
> CONFIG_SND_DUMMY=m
> CONFIG_SND_VIRMIDI=m
> 
> CONFIG_SND_INTEL8X0=m

As I said above, center and rear speakers doesn't work with this patch.

$ git-bisect good
831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
Author: Randy Cushman <rcushman_linux@earthlink.net>
Date:   Tue Dec 19 18:42:16 2006 +0100

    [ALSA] ac97 - fix microphone and line_in selection logic

    This patch fixes the Microphone and LINE_IN select logic for
    Analog Devices surround codecs with shared jacks.  The existing
    code can never utilize the shared jacks for Microphone and LINE_IN
    due to the reversed jack selection logic.  The patched code
    correctly selects the shared jack for input if the 'Channel Mode'
    selector does not specify that the jack is to be used for output.
    Specifically, in '2ch' mode the Center/LFE jack is used for
    microphone input and the Surround jack is used for LINE_IN,
    in '4ch' mode the Center/LFE jack is used for microphone input
    and the Surround jack is used for output, and in '6ch' mode
    both jacks are used for output.

    Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jaroslav Kysela <perex@suse.cz>

:040000 040000 7146a2c5350578fe1b05586c64df99889fa423fe 10e98a9b4819b34ce2abb2c36adbf269d39b9e4c M      sound

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 11:36   ` Michal Piotrowski
@ 2007-03-07 18:47     ` Andrew Morton
       [not found]       ` <6bffcb0e0703071141j42309702w793e4a76b1b23bfa@mail.gmail.com>
  0 siblings, 1 reply; 22+ messages in thread
From: Andrew Morton @ 2007-03-07 18:47 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Randy Cushman, Takashi Iwai, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On Wed, 07 Mar 2007 12:36:36 +0100 Michal Piotrowski <michal.k.k.piotrowski@gmail.com> wrote:

> Michal Piotrowski napisał(a):
> > Hi,
> > 
> > akpm@linux-foundation.org napisał(a):
> >> The mm snapshot broken-out-2007-03-05-02-22.tar.gz has been uploaded to
> >>
> >>    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/broken-out-2007-03-05-02-22.tar.gz
> >>
> >> It contains the following patches against 2.6.21-rc2:
> >>
> > 
> > Outstanding issue - my 3d surround doesn't work since 2.6.20.
> > 
> > I'll bisect this commits
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=724339d76d9407cd1a8ad32a9c1fdf64840cc51b
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6026179519896e7d35b2564e7544487d1c8948e7
> > 
> > 00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
> >         Subsystem: ASUSTeK Computer Inc. P4P800 Mainboard
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
> >         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
> >         Latency: 0
> >         Interrupt: pin B routed to IRQ 17
> >         Region 0: I/O ports at d000 [size=256]
> >         Region 1: I/O ports at d400 [size=64]
> >         Region 2: Memory at f5fff800 (32-bit, non-prefetchable) [size=512]
> >         Region 3: Memory at f5fff400 (32-bit, non-prefetchable) [size=256]
> >         Capabilities: [50] Power Management version 2
> >                 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> >                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> > 
> > Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).
> > 
> > CONFIG_SND=m
> > CONFIG_SND_TIMER=m
> > CONFIG_SND_PCM=m
> > CONFIG_SND_RAWMIDI=m
> > CONFIG_SND_SEQUENCER=m
> > CONFIG_SND_SEQ_DUMMY=m
> > CONFIG_SND_OSSEMUL=y
> > CONFIG_SND_MIXER_OSS=m
> > CONFIG_SND_PCM_OSS=m
> > CONFIG_SND_PCM_OSS_PLUGINS=y
> > CONFIG_SND_SEQUENCER_OSS=y
> > CONFIG_SND_RTCTIMER=m
> > CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
> > # CONFIG_SND_DYNAMIC_MINORS is not set
> > CONFIG_SND_SUPPORT_OLD_API=y
> > CONFIG_SND_VERBOSE_PROCFS=y
> > # CONFIG_SND_VERBOSE_PRINTK is not set
> > # CONFIG_SND_DEBUG is not set
> > 
> > CONFIG_SND_AC97_CODEC=m
> > CONFIG_SND_DUMMY=m
> > CONFIG_SND_VIRMIDI=m
> > 
> > CONFIG_SND_INTEL8X0=m
> 
> As I said above, center and rear speakers doesn't work with this patch.
> 
> $ git-bisect good
> 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> Author: Randy Cushman <rcushman_linux@earthlink.net>
> Date:   Tue Dec 19 18:42:16 2006 +0100
> 
>     [ALSA] ac97 - fix microphone and line_in selection logic
> 
>     This patch fixes the Microphone and LINE_IN select logic for
>     Analog Devices surround codecs with shared jacks.  The existing
>     code can never utilize the shared jacks for Microphone and LINE_IN
>     due to the reversed jack selection logic.  The patched code
>     correctly selects the shared jack for input if the 'Channel Mode'
>     selector does not specify that the jack is to be used for output.
>     Specifically, in '2ch' mode the Center/LFE jack is used for
>     microphone input and the Surround jack is used for LINE_IN,
>     in '4ch' mode the Center/LFE jack is used for microphone input
>     and the Surround jack is used for output, and in '6ch' mode
>     both jacks are used for output.
> 
>     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
>     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> 

Is 2.6.21-rc3 similarly broken?

This patch reverts cleanly if needed. 

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
       [not found]       ` <6bffcb0e0703071141j42309702w793e4a76b1b23bfa@mail.gmail.com>
@ 2007-03-07 19:50         ` Andrew Morton
  2007-03-07 20:39           ` Takashi Iwai
  2007-03-07 22:16           ` Michal Piotrowski
  0 siblings, 2 replies; 22+ messages in thread
From: Andrew Morton @ 2007-03-07 19:50 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Randy Cushman, Takashi Iwai, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:

> > > 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> > > commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > > Author: Randy Cushman <rcushman_linux@earthlink.net>
> > > Date:   Tue Dec 19 18:42:16 2006 +0100
> > >
> > >     [ALSA] ac97 - fix microphone and line_in selection logic
> > >
> > >     This patch fixes the Microphone and LINE_IN select logic for
> > >     Analog Devices surround codecs with shared jacks.  The existing
> > >     code can never utilize the shared jacks for Microphone and LINE_IN
> > >     due to the reversed jack selection logic.  The patched code
> > >     correctly selects the shared jack for input if the 'Channel Mode'
> > >     selector does not specify that the jack is to be used for output.
> > >     Specifically, in '2ch' mode the Center/LFE jack is used for
> > >     microphone input and the Surround jack is used for LINE_IN,
> > >     in '4ch' mode the Center/LFE jack is used for microphone input
> > >     and the Surround jack is used for output, and in '6ch' mode
> > >     both jacks are used for output.
> > >
> > >     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> > >     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > >     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> > >
> >
> > Is 2.6.21-rc3 similarly broken?
> 
> Yes.
> 

OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?

If so, I'll queue it up for application in a week or two if there is no
progress on this.




From: Andrew Morton <akpm@linux-foundation.org>

Revert 831466f4ad2b5fe23dff77edbe6a7c244435e973: "Michal Piotrowski"
<michal.k.k.piotrowski@gmail.com> reports that it broke his 3d surround.

Cc:"Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Cc: Randy Cushman <rcushman_linux@earthlink.net>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 sound/pci/ac97/ac97_patch.c |   66 +++++++++++++---------------------
 1 file changed, 26 insertions(+), 40 deletions(-)

diff -puN sound/pci/ac97/ac97_patch.c~revert-ac97-fix-microphone-and-line_in-selection-logic sound/pci/ac97/ac97_patch.c
--- a/sound/pci/ac97/ac97_patch.c~revert-ac97-fix-microphone-and-line_in-selection-logic
+++ a/sound/pci/ac97/ac97_patch.c
@@ -178,28 +178,14 @@ static inline int is_clfe_on(struct snd_
 	return ac97->channel_mode >= 2;
 }
 
-/* system has shared jacks with surround out enabled */
-static inline int is_shared_surrout(struct snd_ac97 *ac97)
-{
-	return !ac97->indep_surround && is_surround_on(ac97);
-}
-
-/* system has shared jacks with center/lfe out enabled */
-static inline int is_shared_clfeout(struct snd_ac97 *ac97)
-{
-	return !ac97->indep_surround && is_clfe_on(ac97);
-}
-
-/* system has shared jacks with line in enabled */
 static inline int is_shared_linein(struct snd_ac97 *ac97)
 {
-	return !ac97->indep_surround && !is_surround_on(ac97);
+	return ! ac97->indep_surround && is_surround_on(ac97);
 }
 
-/* system has shared jacks with mic in enabled */
 static inline int is_shared_micin(struct snd_ac97 *ac97)
 {
-	return !ac97->indep_surround && !is_clfe_on(ac97);
+	return ! ac97->indep_surround && is_clfe_on(ac97);
 }
 
 
@@ -2473,12 +2459,12 @@ static void alc650_update_jacks(struct s
 {
 	int shared;
 	
-	/* shared Line-In / Surround Out */
-	shared = is_shared_surrout(ac97);
+	/* shared Line-In */
+	shared = is_shared_linein(ac97);
 	snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 9,
 			     shared ? (1 << 9) : 0);
-	/* update shared Mic In / Center/LFE Out */
-	shared = is_shared_clfeout(ac97);
+	/* update shared Mic */
+	shared = is_shared_micin(ac97);
 	/* disable/enable vref */
 	snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
 			     shared ? (1 << 12) : 0);
@@ -2608,12 +2594,12 @@ static void alc655_update_jacks(struct s
 {
 	int shared;
 	
-	/* shared Line-In / Surround Out */
-	shared = is_shared_surrout(ac97);
+	/* shared Line-In */
+	shared = is_shared_linein(ac97);
 	ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 9,
 			      shared ? (1 << 9) : 0, 0);
-	/* update shared Mic In / Center/LFE Out */
-	shared = is_shared_clfeout(ac97);
+	/* update shared mic */
+	shared = is_shared_micin(ac97);
 	/* misc control; vrefout disable */
 	snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
 			     shared ? (1 << 12) : 0);
@@ -2757,16 +2743,16 @@ static void alc850_update_jacks(struct s
 {
 	int shared;
 	
-	/* shared Line-In / Surround Out */
-	shared = is_shared_surrout(ac97);
+	/* shared Line-In */
+	shared = is_shared_linein(ac97);
 	/* SURR 1kOhm (bit4), Amp (bit5) */
 	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<4)|(1<<5),
 			     shared ? (1<<5) : (1<<4));
 	/* LINE-IN = 0, SURROUND = 2 */
 	snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 12,
 			     shared ? (2<<12) : (0<<12));
-	/* update shared Mic In / Center/LFE Out */
-	shared = is_shared_clfeout(ac97);
+	/* update shared mic */
+	shared = is_shared_micin(ac97);
 	/* Vref disable (bit12), 1kOhm (bit13) */
 	snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
 			     shared ? (1<<12) : (1<<13));
@@ -2839,9 +2825,9 @@ static int patch_alc850(struct snd_ac97 
  */
 static void cm9738_update_jacks(struct snd_ac97 *ac97)
 {
-	/* shared Line-In / Surround Out */
+	/* shared Line-In */
 	snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10,
-			     is_shared_surrout(ac97) ? (1 << 10) : 0);
+			     is_shared_linein(ac97) ? (1 << 10) : 0);
 }
 
 static const struct snd_kcontrol_new snd_ac97_cm9738_controls[] = {
@@ -2923,12 +2909,12 @@ static const struct snd_kcontrol_new snd
 
 static void cm9739_update_jacks(struct snd_ac97 *ac97)
 {
-	/* shared Line-In / Surround Out */
+	/* shared Line-In */
 	snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10,
-			     is_shared_surrout(ac97) ? (1 << 10) : 0);
-	/* shared Mic In / Center/LFE Out **/
+			     is_shared_linein(ac97) ? (1 << 10) : 0);
+	/* shared Mic */
 	snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 0x3000,
-			     is_shared_clfeout(ac97) ? 0x1000 : 0x2000);
+			     is_shared_micin(ac97) ? 0x1000 : 0x2000);
 }
 
 static const struct snd_kcontrol_new snd_ac97_cm9739_controls[] = {
@@ -3040,8 +3026,8 @@ static void cm9761_update_jacks(struct s
 
 	val |= surr_on[ac97->spec.dev_flags][is_surround_on(ac97)];
 	val |= clfe_on[ac97->spec.dev_flags][is_clfe_on(ac97)];
-	val |= surr_shared[ac97->spec.dev_flags][is_shared_surrout(ac97)];
-	val |= clfe_shared[ac97->spec.dev_flags][is_shared_clfeout(ac97)];
+	val |= surr_shared[ac97->spec.dev_flags][is_shared_linein(ac97)];
+	val |= clfe_shared[ac97->spec.dev_flags][is_shared_micin(ac97)];
 
 	snd_ac97_update_bits(ac97, AC97_CM9761_MULTI_CHAN, 0x3c88, val);
 }
@@ -3289,12 +3275,12 @@ static int patch_vt1617a(struct snd_ac97
  */
 static void it2646_update_jacks(struct snd_ac97 *ac97)
 {
-	/* shared Line-In / Surround Out */
+	/* shared Line-In */
 	snd_ac97_update_bits(ac97, 0x76, 1 << 9,
-			     is_shared_surrout(ac97) ? (1<<9) : 0);
-	/* shared Mic / Center/LFE Out */
+			     is_shared_linein(ac97) ? (1<<9) : 0);
+	/* shared Mic */
 	snd_ac97_update_bits(ac97, 0x76, 1 << 10,
-			     is_shared_clfeout(ac97) ? (1<<10) : 0);
+			     is_shared_micin(ac97) ? (1<<10) : 0);
 }
 
 static const struct snd_kcontrol_new snd_ac97_controls_it2646[] = {
_


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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 19:50         ` Andrew Morton
@ 2007-03-07 20:39           ` Takashi Iwai
  2007-03-07 22:22             ` Michal Piotrowski
  2007-03-07 22:16           ` Michal Piotrowski
  1 sibling, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-07 20:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Piotrowski, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Wed, 7 Mar 2007 11:50:24 -0800,
Andrew Morton wrote:
> 
> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
> 
> > > > 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> > > > commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > > > Author: Randy Cushman <rcushman_linux@earthlink.net>
> > > > Date:   Tue Dec 19 18:42:16 2006 +0100
> > > >
> > > >     [ALSA] ac97 - fix microphone and line_in selection logic
> > > >
> > > >     This patch fixes the Microphone and LINE_IN select logic for
> > > >     Analog Devices surround codecs with shared jacks.  The existing
> > > >     code can never utilize the shared jacks for Microphone and LINE_IN
> > > >     due to the reversed jack selection logic.  The patched code
> > > >     correctly selects the shared jack for input if the 'Channel Mode'
> > > >     selector does not specify that the jack is to be used for output.
> > > >     Specifically, in '2ch' mode the Center/LFE jack is used for
> > > >     microphone input and the Surround jack is used for LINE_IN,
> > > >     in '4ch' mode the Center/LFE jack is used for microphone input
> > > >     and the Surround jack is used for output, and in '6ch' mode
> > > >     both jacks are used for output.
> > > >
> > > >     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> > > >     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > >     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> > > >
> > >
> > > Is 2.6.21-rc3 similarly broken?
> > 
> > Yes.
> > 
> 
> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?
> 
> If so, I'll queue it up for application in a week or two if there is no
> progress on this.

[sorry for the late interrupt - I'm just back from a vacation]

Could you postpone reverting for a while?
I guess this possible regression is limited only to a certain type of
ac97 codec chip.  The patch applied there was a fix for many codec
chips.

Which codec chip are you using specifically?  Please check
/proc/asound/card0/codec97#0/* file(s).
Also, run "alsactl -f somefile store" and attach the generated file to
see whether any mixer status inconsistency exists.


Thanks,

Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 19:50         ` Andrew Morton
  2007-03-07 20:39           ` Takashi Iwai
@ 2007-03-07 22:16           ` Michal Piotrowski
  1 sibling, 0 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-07 22:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Randy Cushman, Takashi Iwai, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On 07/03/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
>
> > > > 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> > > > commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > > > Author: Randy Cushman <rcushman_linux@earthlink.net>
> > > > Date:   Tue Dec 19 18:42:16 2006 +0100
> > > >
> > > >     [ALSA] ac97 - fix microphone and line_in selection logic
> > > >
> > > >     This patch fixes the Microphone and LINE_IN select logic for
> > > >     Analog Devices surround codecs with shared jacks.  The existing
> > > >     code can never utilize the shared jacks for Microphone and LINE_IN
> > > >     due to the reversed jack selection logic.  The patched code
> > > >     correctly selects the shared jack for input if the 'Channel Mode'
> > > >     selector does not specify that the jack is to be used for output.
> > > >     Specifically, in '2ch' mode the Center/LFE jack is used for
> > > >     microphone input and the Surround jack is used for LINE_IN,
> > > >     in '4ch' mode the Center/LFE jack is used for microphone input
> > > >     and the Surround jack is used for output, and in '6ch' mode
> > > >     both jacks are used for output.
> > > >
> > > >     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> > > >     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > >     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> > > >
> > >
> > > Is 2.6.21-rc3 similarly broken?
> >
> > Yes.
> >
>
> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?

Yes, I can confirm that.

>
> If so, I'll queue it up for application in a week or two if there is no
> progress on this.
>

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 20:39           ` Takashi Iwai
@ 2007-03-07 22:22             ` Michal Piotrowski
  2007-03-07 22:44               ` Takashi Iwai
  0 siblings, 1 reply; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-07 22:22 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Andrew Morton, Michal Piotrowski, Randy Cushman, Jaroslav Kysela,
	alsa-devel, linux-kernel, Linus Torvalds, Adrian Bunk

Hi Takashi,

Takashi Iwai napisał(a):
> At Wed, 7 Mar 2007 11:50:24 -0800,
> Andrew Morton wrote:
>> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
>>
>>>>> 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
>>>>> commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
>>>>> Author: Randy Cushman <rcushman_linux@earthlink.net>
>>>>> Date:   Tue Dec 19 18:42:16 2006 +0100
>>>>>
>>>>>     [ALSA] ac97 - fix microphone and line_in selection logic
>>>>>
>>>>>     This patch fixes the Microphone and LINE_IN select logic for
>>>>>     Analog Devices surround codecs with shared jacks.  The existing
>>>>>     code can never utilize the shared jacks for Microphone and LINE_IN
>>>>>     due to the reversed jack selection logic.  The patched code
>>>>>     correctly selects the shared jack for input if the 'Channel Mode'
>>>>>     selector does not specify that the jack is to be used for output.
>>>>>     Specifically, in '2ch' mode the Center/LFE jack is used for
>>>>>     microphone input and the Surround jack is used for LINE_IN,
>>>>>     in '4ch' mode the Center/LFE jack is used for microphone input
>>>>>     and the Surround jack is used for output, and in '6ch' mode
>>>>>     both jacks are used for output.
>>>>>
>>>>>     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
>>>>>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>>>>     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
>>>>>
>>>> Is 2.6.21-rc3 similarly broken?
>>> Yes.
>>>
>> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?
>>
>> If so, I'll queue it up for application in a week or two if there is no
>> progress on this.
> 
> [sorry for the late interrupt - I'm just back from a vacation]
> 
> Could you postpone reverting for a while?
> I guess this possible regression is limited only to a certain type of
> ac97 codec chip.  The patch applied there was a fix for many codec
> chips.
> 
> Which codec chip are you using specifically?  Please check
> /proc/asound/card0/codec97#0/* file(s).

0-0/0: Analog Devices AD1985

PCI Subsys Vendor: 0x1043
PCI Subsys Device: 0x80f3

Revision         : 0x03
Compat. Class    : 0x00
Subsys. Vendor ID: 0xffff
Subsys. ID       : 0xffff

Capabilities     : -headphone out-
DAC resolution   : 20-bit
ADC resolution   : 16-bit
3D enhancement   : No 3D Stereo Enhancement

Current setup
Mic gain         : +20dB [+20dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Double rate slots: 10/11
Extended ID      : codec=0 rev=0 AMAP LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status  : SPCV LDAC SDAC CDAC SPDIF=10/11 VRA
PCM front DAC    : 48000Hz
PCM Surr DAC     : 48000Hz
PCM LFE DAC      : 48000Hz
PCM ADC          : 48000Hz
SPDIF Control    : Consumer PCM Category=0x2 Generation=1 Rate=48kHz

                    Gain     Inverted  Buffer delay  Location
Master Out       :   0.0 dBV    -      16/fs         Rear I/O Panel
AUX Out          :   0.0 dBV    -      16/fs         Rear I/O Panel
Center/LFE Out   :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 1            :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 2            :   0.0 dBV    -      16/fs         Rear I/O Panel
Line In          :   0.0 dBV    -      16/fs         Rear I/O Panel



AD18XX configuration
Unchained        : 0x1000,0x0000,0x0000
Chained          : 0x0000,0x0000,0x0000


> Also, run "alsactl -f somefile store" and attach the generated file to
> see whether any mixer status inconsistency exists.

state.ICH5 {
	control.1 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Master Surround Playback Switch'
		value.0 true
		value.1 true
	}
	control.2 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'Master Surround Playback Volume'
		value.0 28
		value.1 28
	}
	control.3 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Center Playback Switch'
		value true
	}
	control.4 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Center Playback Volume'
		value 28
	}
	control.5 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'LFE Playback Switch'
		value false
	}
	control.6 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'LFE Playback Volume'
		value 0
	}
	control.7 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Surround Playback Switch'
		value.0 true
		value.1 true
	}
	control.8 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'Surround Playback Volume'
		value.0 28
		value.1 28
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Master Playback Switch'
		value.0 true
		value.1 true
	}
	control.10 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'Master Playback Volume'
		value.0 28
		value.1 28
	}
	control.11 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Master Mono Playback Switch'
		value true
	}
	control.12 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Master Mono Playback Volume'
		value 28
	}
	control.13 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'PC Speaker Playback Switch'
		value false
	}
	control.14 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 15'
		iface MIXER
		name 'PC Speaker Playback Volume'
		value 0
	}
	control.15 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Phone Playback Switch'
		value true
	}
	control.16 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Phone Playback Volume'
		value 29
	}
	control.17 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mic Playback Switch'
		value true
	}
	control.18 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 31'
		iface MIXER
		name 'Mic Playback Volume'
		value 29
	}
	control.19 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Mic Boost (+20dB)'
		value true
	}
	control.20 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Line Playback Switch'
		value.0 false
		value.1 false
	}
	control.21 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'Line Playback Volume'
		value.0 0
		value.1 0
	}
	control.22 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'CD Playback Switch'
		value.0 true
		value.1 true
	}
	control.23 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'CD Playback Volume'
		value.0 28
		value.1 28
	}
	control.24 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Aux Playback Switch'
		value.0 true
		value.1 true
	}
	control.25 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'Aux Playback Volume'
		value.0 30
		value.1 30
	}
	control.26 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'PCM Playback Switch'
		value.0 true
		value.1 true
	}
	control.27 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 31'
		iface MIXER
		name 'PCM Playback Volume'
		value.0 28
		value.1 28
	}
	control.28 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 2
		comment.item.0 Mic
		comment.item.1 CD
		comment.item.2 Video
		comment.item.3 Aux
		comment.item.4 Line
		comment.item.5 Mix
		comment.item.6 'Mix Mono'
		comment.item.7 Phone
		iface MIXER
		name 'Capture Source'
		value.0 CD
		value.1 CD
	}
	control.29 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 2
		iface MIXER
		name 'Capture Switch'
		value.0 true
		value.1 true
	}
	control.30 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 2
		comment.range '0 - 15'
		iface MIXER
		name 'Capture Volume'
		value.0 0
		value.1 0
	}
	control.31 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mix
		comment.item.1 Mic
		iface MIXER
		name 'Mono Output Select'
		value Mix
	}
	control.32 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Mic1
		comment.item.1 Mic2
		iface MIXER
		name 'Mic Select'
		value Mic1
	}
	control.33 {
		comment.access read
		comment.type IEC958
		comment.count 1
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.34 {
		comment.access read
		comment.type IEC958
		comment.count 1
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value cf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
	}
	control.35 {
		comment.access 'read write'
		comment.type IEC958
		comment.count 1
		iface MIXER
		name 'IEC958 Playback Default'
		value '0082000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.36 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'IEC958 Playback Switch'
		value false
	}
	control.37 {
		comment.access 'read write'
		comment.type INTEGER
		comment.count 1
		comment.range '0 - 3'
		iface MIXER
		name 'IEC958 Playback AC97-SPSA'
		value 3
	}
	control.38 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 AC-Link
		comment.item.1 'A/D Converter'
		iface MIXER
		name 'IEC958 Playback Source'
		value AC-Link
	}
	control.39 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Stereo Mic'
		value false
	}
	control.40 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Exchange Center/LFE'
		value false
	}
	control.41 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Exchange Front/Surround'
		value false
	}
	control.42 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'High Pass Filter Enable'
		value true
	}
	control.43 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Spread Front to Surround and Center/LFE'
		value true
	}
	control.44 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Off
		comment.item.1 '6 -> 4'
		comment.item.2 '6 -> 2'
		iface MIXER
		name Downmix
		value Off
	}
	control.45 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 High-Z
		comment.item.1 '3.7 V'
		comment.item.2 '2.25 V'
		comment.item.3 '0 V'
		iface MIXER
		name V_REFOUT
		value High-Z
	}
	control.46 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 Shared
		comment.item.1 Independent
		iface MIXER
		name 'Surround Jack Mode'
		value Shared
	}
	control.47 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		comment.item.0 '2ch'
		comment.item.1 '4ch'
		comment.item.2 '6ch'
		iface MIXER
		name 'Channel Mode'
		value '6ch'
	}
	control.48 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Headphone Jack Sense'
		value false
	}
	control.49 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'Line Jack Sense'
		value false
	}
	control.50 {
		comment.access 'read write'
		comment.type BOOLEAN
		comment.count 1
		iface MIXER
		name 'External Amplifier'
		value true
	}
}


> 
> 
> Thanks,
> 
> Takashi
> 

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 22:22             ` Michal Piotrowski
@ 2007-03-07 22:44               ` Takashi Iwai
  2007-03-08 15:42                 ` Michal Piotrowski
  0 siblings, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-07 22:44 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Wed, 07 Mar 2007 23:22:36 +0100,
Michal Piotrowski wrote:
> 
> Hi Takashi,
> 
> Takashi Iwai napisał(a):
> > At Wed, 7 Mar 2007 11:50:24 -0800,
> > Andrew Morton wrote:
> >> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
> >>
> >>>>> 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> >>>>> commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> >>>>> Author: Randy Cushman <rcushman_linux@earthlink.net>
> >>>>> Date:   Tue Dec 19 18:42:16 2006 +0100
> >>>>>
> >>>>>     [ALSA] ac97 - fix microphone and line_in selection logic
> >>>>>
> >>>>>     This patch fixes the Microphone and LINE_IN select logic for
> >>>>>     Analog Devices surround codecs with shared jacks.  The existing
> >>>>>     code can never utilize the shared jacks for Microphone and LINE_IN
> >>>>>     due to the reversed jack selection logic.  The patched code
> >>>>>     correctly selects the shared jack for input if the 'Channel Mode'
> >>>>>     selector does not specify that the jack is to be used for output.
> >>>>>     Specifically, in '2ch' mode the Center/LFE jack is used for
> >>>>>     microphone input and the Surround jack is used for LINE_IN,
> >>>>>     in '4ch' mode the Center/LFE jack is used for microphone input
> >>>>>     and the Surround jack is used for output, and in '6ch' mode
> >>>>>     both jacks are used for output.
> >>>>>
> >>>>>     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> >>>>>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> >>>>>     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> >>>>>
> >>>> Is 2.6.21-rc3 similarly broken?
> >>> Yes.
> >>>
> >> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?
> >>
> >> If so, I'll queue it up for application in a week or two if there is no
> >> progress on this.
> > 
> > [sorry for the late interrupt - I'm just back from a vacation]
> > 
> > Could you postpone reverting for a while?
> > I guess this possible regression is limited only to a certain type of
> > ac97 codec chip.  The patch applied there was a fix for many codec
> > chips.
> > 
> > Which codec chip are you using specifically?  Please check
> > /proc/asound/card0/codec97#0/* file(s).
> 
> 0-0/0: Analog Devices AD1985

OK, that's good to know.

> 	control.43 {
> 		comment.access 'read write'
> 		comment.type BOOLEAN
> 		comment.count 1
> 		iface MIXER
> 		name 'Spread Front to Surround and Center/LFE'
> 		value true
> 	}

So, you're playing two-channel samples and get no output from surround
and CLFE?  Or, does it happen if you play a real 5.1 channel file?
(for example, try speaker-test -c6)

Also, it'd be helpful if you compare
/proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
patch.  This reveals which register bits differ actually.


thanks,

Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-07 22:44               ` Takashi Iwai
@ 2007-03-08 15:42                 ` Michal Piotrowski
  2007-03-08 15:55                   ` Takashi Iwai
                                     ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-08 15:42 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Michal Piotrowski, Andrew Morton, Randy Cushman, Jaroslav Kysela,
	alsa-devel, linux-kernel, Linus Torvalds, Adrian Bunk

Takashi Iwai napisał(a):
> At Wed, 07 Mar 2007 23:22:36 +0100,
> Michal Piotrowski wrote:
>> Hi Takashi,
>>
>> Takashi Iwai napisał(a):
>>> At Wed, 7 Mar 2007 11:50:24 -0800,
>>> Andrew Morton wrote:
>>>> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
>>>>
>>>>>>> 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
>>>>>>> commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
>>>>>>> Author: Randy Cushman <rcushman_linux@earthlink.net>
>>>>>>> Date:   Tue Dec 19 18:42:16 2006 +0100
>>>>>>>
>>>>>>>     [ALSA] ac97 - fix microphone and line_in selection logic
>>>>>>>
>>>>>>>     This patch fixes the Microphone and LINE_IN select logic for
>>>>>>>     Analog Devices surround codecs with shared jacks.  The existing
>>>>>>>     code can never utilize the shared jacks for Microphone and LINE_IN
>>>>>>>     due to the reversed jack selection logic.  The patched code
>>>>>>>     correctly selects the shared jack for input if the 'Channel Mode'
>>>>>>>     selector does not specify that the jack is to be used for output.
>>>>>>>     Specifically, in '2ch' mode the Center/LFE jack is used for
>>>>>>>     microphone input and the Surround jack is used for LINE_IN,
>>>>>>>     in '4ch' mode the Center/LFE jack is used for microphone input
>>>>>>>     and the Surround jack is used for output, and in '6ch' mode
>>>>>>>     both jacks are used for output.
>>>>>>>
>>>>>>>     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
>>>>>>>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>>>>>>     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
>>>>>>>
>>>>>> Is 2.6.21-rc3 similarly broken?
>>>>> Yes.
>>>>>
>>>> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?
>>>>
>>>> If so, I'll queue it up for application in a week or two if there is no
>>>> progress on this.
>>> [sorry for the late interrupt - I'm just back from a vacation]
>>>
>>> Could you postpone reverting for a while?
>>> I guess this possible regression is limited only to a certain type of
>>> ac97 codec chip.  The patch applied there was a fix for many codec
>>> chips.
>>>
>>> Which codec chip are you using specifically?  Please check
>>> /proc/asound/card0/codec97#0/* file(s).
>> 0-0/0: Analog Devices AD1985
> 
> OK, that's good to know.
> 
>> 	control.43 {
>> 		comment.access 'read write'
>> 		comment.type BOOLEAN
>> 		comment.count 1
>> 		iface MIXER
>> 		name 'Spread Front to Surround and Center/LFE'
>> 		value true
>> 	}
> 
> So, you're playing two-channel samples and get no output from surround
> and CLFE?

Yes.

> Or, does it happen if you play a real 5.1 channel file?
> (for example, try speaker-test -c6)

It doesn't work for me on both kernels.

> 
> Also, it'd be helpful if you compare
> /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> patch.  This reveals which register bits differ actually.

a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973

diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
--- a2.txt      2007-03-08 16:36:47.000000000 +0100
+++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
@@ -56,8 +56,8 @@
 0:6e = 0000
 0:70 = 0000
 0:72 = 0004
-0:74 = 1001
-0:76 = 64a4
+0:74 = 1201
+0:76 = 7ca4
 0:78 = 000c
 0:7a = 0000
 0:7c = 4144


2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973

speaker-test -c6

speaker-test 1.0.13

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE

0, 1 works
4, 3, 2, 5 doesn't work

/proc/asound/card0/codec97#0/ac97#0-0

0-0/0: Analog Devices AD1985

PCI Subsys Vendor: 0x1043
PCI Subsys Device: 0x80f3

Revision         : 0x03
Compat. Class    : 0x00
Subsys. Vendor ID: 0xffff
Subsys. ID       : 0xffff

Capabilities     : -headphone out-
DAC resolution   : 20-bit
ADC resolution   : 16-bit
3D enhancement   : No 3D Stereo Enhancement

Current setup
Mic gain         : +20dB [+20dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Double rate slots: 10/11
Extended ID      : codec=0 rev=0 AMAP LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status  : SPCV LDAC SDAC CDAC SPDIF=10/11 VRA
PCM front DAC    : 48000Hz
PCM Surr DAC     : 48000Hz
PCM LFE DAC      : 48000Hz
PCM ADC          : 48000Hz
SPDIF Control    : Consumer PCM Category=0x2 Generation=1 Rate=48kHz

                    Gain     Inverted  Buffer delay  Location
Master Out       :   0.0 dBV    -      16/fs         Rear I/O Panel
AUX Out          :   0.0 dBV    -      16/fs         Rear I/O Panel
Center/LFE Out   :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 1            :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 2            :   0.0 dBV    -      16/fs         Rear I/O Panel
Line In          :   0.0 dBV    -      16/fs         Rear I/O Panel



AD18XX configuration
Unchained        : 0x1000,0x0000,0x0000
Chained          : 0x0000,0x0000,0x0000


/proc/asound/card0/codec97#0/ac97#0-0+regs

0:00 = 0090
0:02 = 0303
0:04 = 0303
0:06 = 0003
0:08 = 0000
0:0a = 801e
0:0c = 0002
0:0e = 0042
0:10 = 9f9f
0:12 = 0303
0:14 = 0000
0:16 = 0101
0:18 = 0303
0:1a = 0101
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 03c7
0:2a = 05f1
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 9f03
0:38 = 0303
0:3a = 2824
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 8080
0:62 = 0000
0:64 = 0000
0:66 = 0000
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0000
0:70 = 0000
0:72 = 0004
0:74 = 1001
0:76 = 64a4
0:78 = 000c
0:7a = 0000
0:7c = 4144
0:7e = 5375

2.6.21-rc3

speaker-test -c6

speaker-test 1.0.13

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE

0, 1 works
4, 3, 2, 5 doesn't work

/proc/asound/card0/codec97#0/ac97#0-0

0-0/0: Analog Devices AD1985

PCI Subsys Vendor: 0x1043
PCI Subsys Device: 0x80f3

Revision         : 0x03
Compat. Class    : 0x00
Subsys. Vendor ID: 0xffff
Subsys. ID       : 0xffff

Capabilities     : -headphone out-
DAC resolution   : 20-bit
ADC resolution   : 16-bit
3D enhancement   : No 3D Stereo Enhancement

Current setup
Mic gain         : +20dB [+20dB]
POP path         : pre 3D
Sim. stereo      : off
3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
ADC/DAC loopback : off
Double rate slots: 10/11
Extended ID      : codec=0 rev=0 AMAP LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status  : SPCV LDAC SDAC CDAC SPDIF=10/11 VRA
PCM front DAC    : 48000Hz
PCM Surr DAC     : 48000Hz
PCM LFE DAC      : 48000Hz
PCM ADC          : 48000Hz
SPDIF Control    : Consumer PCM Category=0x2 Generation=1 Rate=48kHz

                    Gain     Inverted  Buffer delay  Location
Master Out       :   0.0 dBV    -      16/fs         Rear I/O Panel
AUX Out          :   0.0 dBV    -      16/fs         Rear I/O Panel
Center/LFE Out   :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 1            :   0.0 dBV    -      16/fs         Rear I/O Panel
Mic 2            :   0.0 dBV    -      16/fs         Rear I/O Panel
Line In          :   0.0 dBV    -      16/fs         Rear I/O Panel



AD18XX configuration
Unchained        : 0x1000,0x0000,0x0000
Chained          : 0x0000,0x0000,0x0000


/proc/asound/card0/codec97#0/ac97#0-0+regs

0:00 = 0090
0:02 = 0303
0:04 = 0303
0:06 = 0003
0:08 = 0000
0:0a = 801e
0:0c = 0002
0:0e = 0042
0:10 = 9f9f
0:12 = 0303
0:14 = 0000
0:16 = 0101
0:18 = 0303
0:1a = 0101
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 03c7
0:2a = 05f1
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 9f03
0:38 = 0303
0:3a = 2824
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 8080
0:62 = 0000
0:64 = 0000
0:66 = 0000
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0000
0:70 = 0000
0:72 = 0004
0:74 = 1201
0:76 = 7ca4
0:78 = 000c
0:7a = 0000
0:7c = 4144
0:7e = 5375


> 
> 
> thanks,
> 
> Takashi
> 

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 15:42                 ` Michal Piotrowski
@ 2007-03-08 15:55                   ` Takashi Iwai
       [not found]                     ` <6bffcb0e0703080826l1e5eb42fv68ed27d79ad74663@mail.gmail.com>
  2007-03-08 15:58                   ` Takashi Iwai
  2007-03-08 16:15                   ` Takashi Iwai
  2 siblings, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 15:55 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 08 Mar 2007 16:42:26 +0100,
Michal Piotrowski wrote:
> 
> Takashi Iwai napisał(a):
> > At Wed, 07 Mar 2007 23:22:36 +0100,
> > Michal Piotrowski wrote:
> >> Hi Takashi,
> >>
> >> Takashi Iwai napisał(a):
> >>> At Wed, 7 Mar 2007 11:50:24 -0800,
> >>> Andrew Morton wrote:
> >>>> On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
> >>>>
> >>>>>>> 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> >>>>>>> commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> >>>>>>> Author: Randy Cushman <rcushman_linux@earthlink.net>
> >>>>>>> Date:   Tue Dec 19 18:42:16 2006 +0100
> >>>>>>>
> >>>>>>>     [ALSA] ac97 - fix microphone and line_in selection logic
> >>>>>>>
> >>>>>>>     This patch fixes the Microphone and LINE_IN select logic for
> >>>>>>>     Analog Devices surround codecs with shared jacks.  The existing
> >>>>>>>     code can never utilize the shared jacks for Microphone and LINE_IN
> >>>>>>>     due to the reversed jack selection logic.  The patched code
> >>>>>>>     correctly selects the shared jack for input if the 'Channel Mode'
> >>>>>>>     selector does not specify that the jack is to be used for output.
> >>>>>>>     Specifically, in '2ch' mode the Center/LFE jack is used for
> >>>>>>>     microphone input and the Surround jack is used for LINE_IN,
> >>>>>>>     in '4ch' mode the Center/LFE jack is used for microphone input
> >>>>>>>     and the Surround jack is used for output, and in '6ch' mode
> >>>>>>>     both jacks are used for output.
> >>>>>>>
> >>>>>>>     Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> >>>>>>>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> >>>>>>>     Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> >>>>>>>
> >>>>>> Is 2.6.21-rc3 similarly broken?
> >>>>> Yes.
> >>>>>
> >>>> OK.  Can you please confirm that applying the below fixes 2.6.21-rc3?
> >>>>
> >>>> If so, I'll queue it up for application in a week or two if there is no
> >>>> progress on this.
> >>> [sorry for the late interrupt - I'm just back from a vacation]
> >>>
> >>> Could you postpone reverting for a while?
> >>> I guess this possible regression is limited only to a certain type of
> >>> ac97 codec chip.  The patch applied there was a fix for many codec
> >>> chips.
> >>>
> >>> Which codec chip are you using specifically?  Please check
> >>> /proc/asound/card0/codec97#0/* file(s).
> >> 0-0/0: Analog Devices AD1985
> > 
> > OK, that's good to know.
> > 
> >> 	control.43 {
> >> 		comment.access 'read write'
> >> 		comment.type BOOLEAN
> >> 		comment.count 1
> >> 		iface MIXER
> >> 		name 'Spread Front to Surround and Center/LFE'
> >> 		value true
> >> 	}
> > 
> > So, you're playing two-channel samples and get no output from surround
> > and CLFE?
> 
> Yes.
> 
> > Or, does it happen if you play a real 5.1 channel file?
> > (for example, try speaker-test -c6)
> 
> It doesn't work for me on both kernels.

Pass -Dplug:surround51 to speaker-test in addition.


Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 15:42                 ` Michal Piotrowski
  2007-03-08 15:55                   ` Takashi Iwai
@ 2007-03-08 15:58                   ` Takashi Iwai
  2007-03-08 16:23                     ` Michal Piotrowski
  2007-03-08 16:15                   ` Takashi Iwai
  2 siblings, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 15:58 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 08 Mar 2007 16:42:26 +0100,
Michal Piotrowski wrote:
> 
> > Also, it'd be helpful if you compare
> > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > patch.  This reveals which register bits differ actually.
> 
> a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973

Just to make sure: it means that a2.txt is a working one and the
anoter is non-working, right?


Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 15:42                 ` Michal Piotrowski
  2007-03-08 15:55                   ` Takashi Iwai
  2007-03-08 15:58                   ` Takashi Iwai
@ 2007-03-08 16:15                   ` Takashi Iwai
  2007-03-08 16:52                     ` Michal Piotrowski
  2 siblings, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 16:15 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 08 Mar 2007 16:42:26 +0100,
Michal Piotrowski wrote:
> 
> > Also, it'd be helpful if you compare
> > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > patch.  This reveals which register bits differ actually.
> 
> a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
> 
> diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
> --- a2.txt      2007-03-08 16:36:47.000000000 +0100
> +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
> @@ -56,8 +56,8 @@
>  0:6e = 0000
>  0:70 = 0000
>  0:72 = 0004
> -0:74 = 1001
> -0:76 = 64a4
> +0:74 = 1201
> +0:76 = 7ca4
>  0:78 = 000c
>  0:7a = 0000
>  0:7c = 4144

OK, some wrong bits there.  Could you try the patch below?


Takashi

diff -r 6888d4cd251d sound/pci/ac97/ac97_patch.c
--- a/sound/pci/ac97/ac97_patch.c	Thu Mar 08 12:53:55 2007 +0100
+++ b/sound/pci/ac97/ac97_patch.c	Thu Mar 08 17:10:52 2007 +0100
@@ -1950,9 +1950,9 @@ static void ad1888_update_jacks(struct s
 static void ad1888_update_jacks(struct snd_ac97 *ac97)
 {
 	unsigned short val = 0;
-	if (! is_shared_linein(ac97))
+	if (is_shared_linein(ac97))
 		val |= (1 << 12);
-	if (! is_shared_micin(ac97))
+	if (is_shared_micin(ac97))
 		val |= (1 << 11);
 	/* shared Line-In */
 	snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val);

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 15:58                   ` Takashi Iwai
@ 2007-03-08 16:23                     ` Michal Piotrowski
  0 siblings, 0 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-08 16:23 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> At Thu, 08 Mar 2007 16:42:26 +0100,
> Michal Piotrowski wrote:
> >
> > > Also, it'd be helpful if you compare
> > > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > > patch.  This reveals which register bits differ actually.
> >
> > a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
>
> Just to make sure: it means that a2.txt is a working one and the
> anoter is non-working, right?

Right.

>
>
> Takashi
>

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
       [not found]                     ` <6bffcb0e0703080826l1e5eb42fv68ed27d79ad74663@mail.gmail.com>
@ 2007-03-08 16:28                       ` Takashi Iwai
  0 siblings, 0 replies; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 16:28 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 8 Mar 2007 17:26:48 +0100,
Michal Piotrowski wrote:
> 
> On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> > At Thu, 08 Mar 2007 16:42:26 +0100,
> > Michal Piotrowski wrote:
> > >
> > > Takashi Iwai napisał(a):
> > > > Or, does it happen if you play a real 5.1 channel file?
> > > > (for example, try speaker-test -c6)
> > >
> > > It doesn't work for me on both kernels.
> >
> > Pass -Dplug:surround51 to speaker-test in addition.
> 
> It still doesn't work (at least on clean 2.6.21-rc3).

That's expected.  But it should work with the fixed kernel.
Let me know if it still doesn't work with the patched kernel.


thanks,

Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 16:15                   ` Takashi Iwai
@ 2007-03-08 16:52                     ` Michal Piotrowski
  2007-03-08 16:54                       ` Takashi Iwai
  0 siblings, 1 reply; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-08 16:52 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> At Thu, 08 Mar 2007 16:42:26 +0100,
> Michal Piotrowski wrote:
> >
> > > Also, it'd be helpful if you compare
> > > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > > patch.  This reveals which register bits differ actually.
> >
> > a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
> >
> > diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
> > --- a2.txt      2007-03-08 16:36:47.000000000 +0100
> > +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
> > @@ -56,8 +56,8 @@
> >  0:6e = 0000
> >  0:70 = 0000
> >  0:72 = 0004
> > -0:74 = 1001
> > -0:76 = 64a4
> > +0:74 = 1201
> > +0:76 = 7ca4
> >  0:78 = 000c
> >  0:7a = 0000
> >  0:7c = 4144
>
> OK, some wrong bits there.  Could you try the patch below?

Problem fixed. Thanks!

(speaker-test -c6 -Dplug:surround51 is still broken)

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 16:52                     ` Michal Piotrowski
@ 2007-03-08 16:54                       ` Takashi Iwai
  2007-03-08 17:05                         ` Michal Piotrowski
  2007-03-08 17:05                         ` Randy Cushman
  0 siblings, 2 replies; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 16:54 UTC (permalink / raw)
  To: Michal Piotrowski
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 8 Mar 2007 17:52:43 +0100,
Michal Piotrowski wrote:
> 
> On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> > At Thu, 08 Mar 2007 16:42:26 +0100,
> > Michal Piotrowski wrote:
> > >
> > > > Also, it'd be helpful if you compare
> > > > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > > > patch.  This reveals which register bits differ actually.
> > >
> > > a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > >
> > > diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
> > > --- a2.txt      2007-03-08 16:36:47.000000000 +0100
> > > +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
> > > @@ -56,8 +56,8 @@
> > >  0:6e = 0000
> > >  0:70 = 0000
> > >  0:72 = 0004
> > > -0:74 = 1001
> > > -0:76 = 64a4
> > > +0:74 = 1201
> > > +0:76 = 7ca4
> > >  0:78 = 000c
> > >  0:7a = 0000
> > >  0:7c = 4144
> >
> > OK, some wrong bits there.  Could you try the patch below?
> 
> Problem fixed. Thanks!
> 
> (speaker-test -c6 -Dplug:surround51 is still broken)

Hm, how about turning off "Spread Front To..." control and run
speaker-test?


Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 16:54                       ` Takashi Iwai
@ 2007-03-08 17:05                         ` Michal Piotrowski
  2007-03-08 17:05                         ` Randy Cushman
  1 sibling, 0 replies; 22+ messages in thread
From: Michal Piotrowski @ 2007-03-08 17:05 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Andrew Morton, Randy Cushman, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> At Thu, 8 Mar 2007 17:52:43 +0100,
> Michal Piotrowski wrote:
> >
> > On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> > > At Thu, 08 Mar 2007 16:42:26 +0100,
> > > Michal Piotrowski wrote:
> > > >
> > > > > Also, it'd be helpful if you compare
> > > > > /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> > > > > patch.  This reveals which register bits differ actually.
> > > >
> > > > a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > > >
> > > > diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
> > > > --- a2.txt      2007-03-08 16:36:47.000000000 +0100
> > > > +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
> > > > @@ -56,8 +56,8 @@
> > > >  0:6e = 0000
> > > >  0:70 = 0000
> > > >  0:72 = 0004
> > > > -0:74 = 1001
> > > > -0:76 = 64a4
> > > > +0:74 = 1201
> > > > +0:76 = 7ca4
> > > >  0:78 = 000c
> > > >  0:7a = 0000
> > > >  0:7c = 4144
> > >
> > > OK, some wrong bits there.  Could you try the patch below?
> >
> > Problem fixed. Thanks!
> >
> > (speaker-test -c6 -Dplug:surround51 is still broken)
>
> Hm, how about turning off "Spread Front To..." control and run
> speaker-test?

Now I've got:
rear left as center
rear right as LFE

:)

>
>
> Takashi
>

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 16:54                       ` Takashi Iwai
  2007-03-08 17:05                         ` Michal Piotrowski
@ 2007-03-08 17:05                         ` Randy Cushman
  2007-03-08 18:51                           ` Takashi Iwai
  1 sibling, 1 reply; 22+ messages in thread
From: Randy Cushman @ 2007-03-08 17:05 UTC (permalink / raw)
  To: Takashi Iwai, Michal Piotrowski
  Cc: Andrew Morton, Jaroslav Kysela, alsa-devel, linux-kernel,
	Linus Torvalds, Adrian Bunk

Takashi Iwai wrote:
> At Thu, 8 Mar 2007 17:52:43 +0100,
> Michal Piotrowski wrote:
>   
>> On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
>>     
>>> At Thu, 08 Mar 2007 16:42:26 +0100,
>>> Michal Piotrowski wrote:
>>>       
>>>>> Also, it'd be helpful if you compare
>>>>> /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
>>>>> patch.  This reveals which register bits differ actually.
>>>>>           
>>>> a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
>>>>
>>>> diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
>>>> --- a2.txt      2007-03-08 16:36:47.000000000 +0100
>>>> +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
>>>> @@ -56,8 +56,8 @@
>>>>  0:6e = 0000
>>>>  0:70 = 0000
>>>>  0:72 = 0004
>>>> -0:74 = 1001
>>>> -0:76 = 64a4
>>>> +0:74 = 1201
>>>> +0:76 = 7ca4
>>>>  0:78 = 000c
>>>>  0:7a = 0000
>>>>  0:7c = 4144
>>>>         
>>> OK, some wrong bits there.  Could you try the patch below?
>>>       
>> Problem fixed. Thanks!
>>
>> (speaker-test -c6 -Dplug:surround51 is still broken)
>>     
>
> Hm, how about turning off "Spread Front To..." control and run
> speaker-test?
>
>
> Takashi
>
>
>   
Michal and Takashi,

I've been researching your issue this morning.  I just noticed that your 
exchange had ensued.

I configured my AD1986-based system as closely as I could to match your 
AD1985 mixer settings.  In doing so, I experienced results similar to 
what I'm assuming you described:  Only front channel sound came out of 
the surround and c/lfe jacks.

Here is what I had to change to get the appropriate multichannel sound:

1) The command "speaker-test -c6" does not work on my system.  I have to 
use "speaker-test -Dsurround51 -c6"  (Perhaps this is related to running 
an old version of speaker-test.)

2) I disabled "Spread Front to Surround and Center/LFE"

The explanation for 2) is this:  There can be only one source for each 
of the Surround and Center/LFE jacks active at one time.  When "Spread 
Front to Surround and Center/LFE" is disabled, the surround channels go 
to the the jacks; when this control is enabled, ONLY the front channels 
go to the surround and c/lfe jacks.

Considering the register values Michal provided and Takashi's patch:

The logic of the code is as follows:  (Slightly simplifying,) functions 
is_shared_linein() and is_shared_micin() return TRUE if the mixer is 
configured for shared jacks AND NOT for 6 channel mode.  In this case it 
is appropriate to
set these bits (LODIS and CLDIS).

Please double-check your mixer settings.  I added a byte to a structure, 
so the mixer settings can get messed up switching between alsa-kernel 
versions.

I don't understand why the other bit (OMS, 0x74 bit D9) is set.  This 
may have been an oversight on my part.

I am modifying alsa-kernel to run as an AD1985 on my system, to try to 
check these bits.

Randy Cushman



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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 17:05                         ` Randy Cushman
@ 2007-03-08 18:51                           ` Takashi Iwai
  2007-03-08 19:28                             ` Randy Cushman
  0 siblings, 1 reply; 22+ messages in thread
From: Takashi Iwai @ 2007-03-08 18:51 UTC (permalink / raw)
  To: Randy Cushman
  Cc: Michal Piotrowski, Andrew Morton, Jaroslav Kysela, alsa-devel,
	linux-kernel, Linus Torvalds, Adrian Bunk

At Thu, 08 Mar 2007 12:05:49 -0500,
Randy Cushman wrote:
> 
> Takashi Iwai wrote:
> > At Thu, 8 Mar 2007 17:52:43 +0100,
> > Michal Piotrowski wrote:
> >   
> >> On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
> >>     
> >>> At Thu, 08 Mar 2007 16:42:26 +0100,
> >>> Michal Piotrowski wrote:
> >>>       
> >>>>> Also, it'd be helpful if you compare
> >>>>> /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
> >>>>> patch.  This reveals which register bits differ actually.
> >>>>>           
> >>>> a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
> >>>>
> >>>> diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
> >>>> --- a2.txt      2007-03-08 16:36:47.000000000 +0100
> >>>> +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
> >>>> @@ -56,8 +56,8 @@
> >>>>  0:6e = 0000
> >>>>  0:70 = 0000
> >>>>  0:72 = 0004
> >>>> -0:74 = 1001
> >>>> -0:76 = 64a4
> >>>> +0:74 = 1201
> >>>> +0:76 = 7ca4
> >>>>  0:78 = 000c
> >>>>  0:7a = 0000
> >>>>  0:7c = 4144
> >>>>         
> >>> OK, some wrong bits there.  Could you try the patch below?
> >>>       
> >> Problem fixed. Thanks!
> >>
> >> (speaker-test -c6 -Dplug:surround51 is still broken)
> >>     
> >
> > Hm, how about turning off "Spread Front To..." control and run
> > speaker-test?
> >
> >
> > Takashi
> >
> >
> >   
> Michal and Takashi,
> 
> I've been researching your issue this morning.  I just noticed that your 
> exchange had ensued.
> 
> I configured my AD1986-based system as closely as I could to match your 
> AD1985 mixer settings.  In doing so, I experienced results similar to 
> what I'm assuming you described:  Only front channel sound came out of 
> the surround and c/lfe jacks.
> 
> Here is what I had to change to get the appropriate multichannel sound:
> 
> 1) The command "speaker-test -c6" does not work on my system.  I have to 
> use "speaker-test -Dsurround51 -c6"  (Perhaps this is related to running 
> an old version of speaker-test.)
> 
> 2) I disabled "Spread Front to Surround and Center/LFE"
> 
> The explanation for 2) is this:  There can be only one source for each 
> of the Surround and Center/LFE jacks active at one time.  When "Spread 
> Front to Surround and Center/LFE" is disabled, the surround channels go 
> to the the jacks; when this control is enabled, ONLY the front channels 
> go to the surround and c/lfe jacks.
> 
> Considering the register values Michal provided and Takashi's patch:
> 
> The logic of the code is as follows:  (Slightly simplifying,) functions 
> is_shared_linein() and is_shared_micin() return TRUE if the mixer is 
> configured for shared jacks AND NOT for 6 channel mode.  In this case it 
> is appropriate to
> set these bits (LODIS and CLDIS).

Yep.  So, can you confirm that my fix is OK?
Then I'll queue it up to ALSA tree.


thanks,

Takashi

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

* Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
  2007-03-08 18:51                           ` Takashi Iwai
@ 2007-03-08 19:28                             ` Randy Cushman
  0 siblings, 0 replies; 22+ messages in thread
From: Randy Cushman @ 2007-03-08 19:28 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Michal Piotrowski, Jaroslav Kysela, alsa-devel, linux-kernel,
	Adrian Bunk

Takashi Iwai wrote:
> At Thu, 08 Mar 2007 12:05:49 -0500,
> Randy Cushman wrote:
>   
>> Takashi Iwai wrote:
>>     
>>> At Thu, 8 Mar 2007 17:52:43 +0100,
>>> Michal Piotrowski wrote:
>>>   
>>>       
>>>> On 08/03/07, Takashi Iwai <tiwai@suse.de> wrote:
>>>>     
>>>>         
>>>>> At Thu, 08 Mar 2007 16:42:26 +0100,
>>>>> Michal Piotrowski wrote:
>>>>>       
>>>>>           
>>>>>>> Also, it'd be helpful if you compare
>>>>>>> /proc/asound/card0/codec97#0/ac97#0-0+regs file before and after the
>>>>>>> patch.  This reveals which register bits differ actually.
>>>>>>>           
>>>>>>>               
>>>>>> a2.txt is form 2.6.21-rc3 witchout 831466f4ad2b5fe23dff77edbe6a7c244435e973
>>>>>>
>>>>>> diff -uprN a2.txt /proc/asound/card0/codec97#0/ac97#0-0+regs
>>>>>> --- a2.txt      2007-03-08 16:36:47.000000000 +0100
>>>>>> +++ /proc/asound/card0/codec97#0/ac97#0-0+regs  2007-03-08 16:36:49.447083597 +0100
>>>>>> @@ -56,8 +56,8 @@
>>>>>>  0:6e = 0000
>>>>>>  0:70 = 0000
>>>>>>  0:72 = 0004
>>>>>> -0:74 = 1001
>>>>>> -0:76 = 64a4
>>>>>> +0:74 = 1201
>>>>>> +0:76 = 7ca4
>>>>>>  0:78 = 000c
>>>>>>  0:7a = 0000
>>>>>>  0:7c = 4144
>>>>>>         
>>>>>>             
>>>>> OK, some wrong bits there.  Could you try the patch below?
>>>>>       
>>>>>           
>>>> Problem fixed. Thanks!
>>>>
>>>> (speaker-test -c6 -Dplug:surround51 is still broken)
>>>>     
>>>>         
>>> Hm, how about turning off "Spread Front To..." control and run
>>> speaker-test?
>>>
>>>
>>> Takashi
>>>
>>>
>>>   
>>>       
>> Michal and Takashi,
>>
>> I've been researching your issue this morning.  I just noticed that your 
>> exchange had ensued.
>>
>> I configured my AD1986-based system as closely as I could to match your 
>> AD1985 mixer settings.  In doing so, I experienced results similar to 
>> what I'm assuming you described:  Only front channel sound came out of 
>> the surround and c/lfe jacks.
>>
>> Here is what I had to change to get the appropriate multichannel sound:
>>
>> 1) The command "speaker-test -c6" does not work on my system.  I have to 
>> use "speaker-test -Dsurround51 -c6"  (Perhaps this is related to running 
>> an old version of speaker-test.)
>>
>> 2) I disabled "Spread Front to Surround and Center/LFE"
>>
>> The explanation for 2) is this:  There can be only one source for each 
>> of the Surround and Center/LFE jacks active at one time.  When "Spread 
>> Front to Surround and Center/LFE" is disabled, the surround channels go 
>> to the the jacks; when this control is enabled, ONLY the front channels 
>> go to the surround and c/lfe jacks.
>>
>> Considering the register values Michal provided and Takashi's patch:
>>
>> The logic of the code is as follows:  (Slightly simplifying,) functions 
>> is_shared_linein() and is_shared_micin() return TRUE if the mixer is 
>> configured for shared jacks AND NOT for 6 channel mode.  In this case it 
>> is appropriate to
>> set these bits (LODIS and CLDIS).
>>     
>
> Yep.  So, can you confirm that my fix is OK?
> Then I'll queue it up to ALSA tree.
>
>
> thanks,
>
> Takashi
>
>
>   
Takashi,

I need to think this through before I can confirm.  Something doesn't 
seem right.

Let me figure out why I wrote ad1986_update_jacks() to be so different 
from ad1888_update_jacks().

I'll keep you posted.

Randy Cushman



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

end of thread, other threads:[~2007-03-08 19:35 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200703051024.l25AOIF3015951@shell0.pdx.osdl.net>
2007-03-05 14:49 ` mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded Michal Piotrowski
2007-03-07 11:36   ` Michal Piotrowski
2007-03-07 18:47     ` Andrew Morton
     [not found]       ` <6bffcb0e0703071141j42309702w793e4a76b1b23bfa@mail.gmail.com>
2007-03-07 19:50         ` Andrew Morton
2007-03-07 20:39           ` Takashi Iwai
2007-03-07 22:22             ` Michal Piotrowski
2007-03-07 22:44               ` Takashi Iwai
2007-03-08 15:42                 ` Michal Piotrowski
2007-03-08 15:55                   ` Takashi Iwai
     [not found]                     ` <6bffcb0e0703080826l1e5eb42fv68ed27d79ad74663@mail.gmail.com>
2007-03-08 16:28                       ` Takashi Iwai
2007-03-08 15:58                   ` Takashi Iwai
2007-03-08 16:23                     ` Michal Piotrowski
2007-03-08 16:15                   ` Takashi Iwai
2007-03-08 16:52                     ` Michal Piotrowski
2007-03-08 16:54                       ` Takashi Iwai
2007-03-08 17:05                         ` Michal Piotrowski
2007-03-08 17:05                         ` Randy Cushman
2007-03-08 18:51                           ` Takashi Iwai
2007-03-08 19:28                             ` Randy Cushman
2007-03-07 22:16           ` Michal Piotrowski
2007-03-05 15:53 ` Michal Piotrowski
2007-03-05 18:02 ` Michal Piotrowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).