On 7/13/06, Benjamin Herrenschmidt <[email protected]> wrote:
> On Thu, 2006-07-13 at 13:09 -0700, john stultz wrote:
> > Using the current 2.6.18-rc1-git, I'm finding no sound card being
> > detected on my mac mini.
> >
> > I looked through the config and saw the new AOA option w/ the Toonie
> > chip under it, and I enabled it. However, I still get no sound card
> > detected. I tried enabling the "layout-id fabric" option, but I got a
> > panic on boot (I can try to get a photo later if necessary).
>
> Is this really a current git or an -rc1 snapshot ? The crashes on boot
> should have been fixed ... unless there is another problem on the mac
> mini. Can you try having them as modules instead ?
I know you mentioned there was a fix for this somewhere, but as
motivation to get it flowing to mainline, here's what I get w/ the
current -rc3-git and the sound bits compiled as modules:
snd-aoa-fabric-layout: found bus with layout 58
snd-aoa-fabric-layout: Using direct GPIOs
Unable to handle kernel paging request for data at address 0x00000014
Faulting instruction address: 0xc000f00c
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT
Modules linked in: snd_aoa_fabric_layout snd_aoa_i2sbus snd_aoa_soundbus
NIP: C000F00C LR: C000F09C CTR: C0017C20
REGS: c20f9bf0 TRAP: 0300 Not tainted (2.6.18-rc3john)
MSR: 00009032 <EE,ME,IR,DR> CR: 22008488 XER: 00000000
DAR: 00000014, DSISR: 40000000
TASK = c24fecf0[5745] 'modprobe' THREAD: c20f8000
GPR00: C000F09C C20F9CA0 C24FECF0 00000000 C04A6638 C20F9CD8 0000003F 0000003D
GPR08: C0E74800 00000001 8088003D C20F8000 22008488 1001E354 00000000 00000000
GPR16: 00000000 00000000 00000124 00000000 C004C9B8 F2259839 C0610000 C0610000
GPR24: C0610000 C0610000 C0610000 00000000 C20F9CD8 C04A6638 C20F8000 00000000
NIP [C000F00C] of_find_property+0x30/0xb0
LR [C000F09C] get_property+0x10/0x34
Call Trace:
[C20F9CA0] [C0017788] mpic_host_map+0x74/0x7c (unreliable)
[C20F9CC0] [C000F09C] get_property+0x10/0x34
[C20F9CD0] [C000BBC8] of_irq_map_one+0x70/0x150
[C20F9D00] [C00069B8] irq_of_parse_and_map+0x14/0x40
[C20F9D30] [C03976E4] get_irq+0x1c/0x34
[C20F9D50] [C03980D0] ftr_gpio_init+0x15c/0x240
[C20F9D80] [F2268E44] aoa_fabric_layout_probe+0x1dc/0x930 [snd_aoa_fabric_layout
]
[C20F9DB0] [F20E50BC] soundbus_probe+0x44/0x84 [snd_aoa_soundbus]
[C20F9DD0] [C02849A0] driver_probe_device+0x60/0x118
[C20F9DF0] [C0284C04] __driver_attach+0xe8/0x118
[C20F9E10] [C0283B68] bus_for_each_dev+0x54/0x90
[C20F9E40] [C0284808] driver_attach+0x24/0x34
[C20F9E50] [C0283F94] bus_add_driver+0x88/0x164
[C20F9E70] [C028517C] driver_register+0x70/0xb8
[C20F9E80] [F20E5530] soundbus_register_driver+0x28/0x38 [snd_aoa_soundbus]
[C20F9E90] [F20EF018] aoa_fabric_layout_init+0x18/0x48 [snd_aoa_fabric_layout]
[C20F9EA0] [C004D6CC] sys_init_module+0xf4/0x153c
[C20F9F40] [C0011478] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xff7325c
LR = 0x10003b50
Instruction dump:
7c0802a6 9421ffe0 7d800026 bf810010 543e0024 7c9d2378 7cbc2b78 90010024
9181000c 813e000c 39290001 913e000c <83e30014> 2f9f0000 419e0028 2e050000
<6>note: modprobe[5745] exited with preempt_count 1
BUG: sleeping function called from invalid context at kernel/rwsem.c:20
in_atomic():1, irqs_disabled():0
Call Trace:
[C20F9AF0] [C00099D8] show_stack+0x50/0x190 (unreliable)
[C20F9B20] [C00257F8] __might_sleep+0xcc/0xe8
[C20F9B30] [C00483BC] down_read+0x24/0x5c
[C20F9B50] [C00507B0] acct_collect+0x44/0x1ac
[C20F9B70] [C002D90C] do_exit+0xfc/0x8cc
[C20F9BB0] [C000FA70] kernel_bad_stack+0x0/0x4c
[C20F9BD0] [C0015094] bad_page_fault+0xbc/0xd4
[C20F9BE0] [C0011914] handle_page_fault+0x7c/0x80
--- Exception: 300 at of_find_property+0x30/0xb0
LR = get_property+0x10/0x34
[C20F9CA0] [C0017788] mpic_host_map+0x74/0x7c (unreliable)
[C20F9CC0] [C000F09C] get_property+0x10/0x34
[C20F9CD0] [C000BBC8] of_irq_map_one+0x70/0x150
[C20F9D00] [C00069B8] irq_of_parse_and_map+0x14/0x40
[C20F9D30] [C03976E4] get_irq+0x1c/0x34
[C20F9D50] [C03980D0] ftr_gpio_init+0x15c/0x240
[C20F9D80] [F2268E44] aoa_fabric_layout_probe+0x1dc/0x930 [snd_aoa_fabric_layout
]
[C20F9DB0] [F20E50BC] soundbus_probe+0x44/0x84 [snd_aoa_soundbus]
[C20F9DD0] [C02849A0] driver_probe_device+0x60/0x118
[C20F9DF0] [C0284C04] __driver_attach+0xe8/0x118
[C20F9E10] [C0283B68] bus_for_each_dev+0x54/0x90
[C20F9E40] [C0284808] driver_attach+0x24/0x34
[C20F9E50] [C0283F94] bus_add_driver+0x88/0x164
[C20F9E70] [C028517C] driver_register+0x70/0xb8
[C20F9E80] [F20E5530] soundbus_register_driver+0x28/0x38 [snd_aoa_soundbus]
[C20F9E90] [F20EF018] aoa_fabric_layout_init+0x18/0x48 [snd_aoa_fabric_layout]
[C20F9EA0] [C004D6CC] sys_init_module+0xf4/0x153c
[C20F9F40] [C0011478] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xff7325c
LR = 0x10003b50
thanks
-john
john stultz wrote:
>> Is this really a current git or an -rc1 snapshot ? The crashes on boot
>> should have been fixed ... unless there is another problem on the mac
>> mini. Can you try having them as modules instead ?
>
> I know you mentioned there was a fix for this somewhere, but as
> motivation to get it flowing to mainline, here's what I get w/ the
> current -rc3-git and the sound bits compiled as modules:
The fixes are sitting in the alsa mercurial repository waiting to go
upstream...
Not My Fault (TM) ;)
johannes
On Tue, 2006-08-01 at 11:19 +0200, Johannes Berg wrote:
> john stultz wrote:
> >> Is this really a current git or an -rc1 snapshot ? The crashes on boot
> >> should have been fixed ... unless there is another problem on the mac
> >> mini. Can you try having them as modules instead ?
> >
> > I know you mentioned there was a fix for this somewhere, but as
> > motivation to get it flowing to mainline, here's what I get w/ the
> > current -rc3-git and the sound bits compiled as modules:
>
> The fixes are sitting in the alsa mercurial repository waiting to go
> upstream...
>
> Not My Fault (TM) ;)
Just wanted to report that it seems w/ 2.6.18-rc6 the fix has made it
in, and my system now reports that there is a SoundByLayout alsa device.
However... ;)
It seems the new device doesn't have any volume control. I know the old
toonie driver used some form of softvol support, but "it just worked",
where as now I have no control over my system's audio volume.
While not the most terrible of regressions, its a bit irritating (waking
to loud mail notifications, specifically :). Is this something that I
have to wait for an alsa userland update to fix, or is the new kernel
driver just not fully functional yet?
thanks
-john
> However... ;)
>
> It seems the new device doesn't have any volume control. I know the old
> toonie driver used some form of softvol support, but "it just worked",
> where as now I have no control over my system's audio volume.
It's a userland problem :) Your alsa config needs to enable the softvol
plugin for it.
> While not the most terrible of regressions, its a bit irritating (waking
> to loud mail notifications, specifically :). Is this something that I
> have to wait for an alsa userland update to fix, or is the new kernel
> driver just not fully functional yet?
Part of the problem is that you can't anymore identify the type of codec
based on the card name thus Alsa old mecanism of having a specific
toonie config file that includes softvol doesn't work any more. The
trick was bad in the first place though because you can have multiple
different codecs anyway, so it didn't scale. (The old driver couldn't
deal with it, but the new one can, though we haven't yet implemented
support for any of the topaz digital codecs).
I remember a discussion with the Alsa folks where it was question to
have Alsa userland automatically instanciate softvol if there is no
volume provided by the driver, which is a better approach.
Takashi, was this ever implemented ? John, what is your Alsa userland
version ?
Ben.
On Wed, 2006-09-06 at 10:50 +1000, Benjamin Herrenschmidt wrote:
> > However... ;)
> >
> > It seems the new device doesn't have any volume control. I know the old
> > toonie driver used some form of softvol support, but "it just worked",
> > where as now I have no control over my system's audio volume.
>
> It's a userland problem :) Your alsa config needs to enable the softvol
> plugin for it.
Yea. I figured. :( I've played around a bit w/ the .asoundrc file to
re-enable softvol (A similar hack was needed originally after the toonie
driver went in), but so far I've been unsuccessful.
> > While not the most terrible of regressions, its a bit irritating (waking
> > to loud mail notifications, specifically :). Is this something that I
> > have to wait for an alsa userland update to fix, or is the new kernel
> > driver just not fully functional yet?
>
> Part of the problem is that you can't anymore identify the type of codec
> based on the card name thus Alsa old mecanism of having a specific
> toonie config file that includes softvol doesn't work any more. The
> trick was bad in the first place though because you can have multiple
> different codecs anyway, so it didn't scale. (The old driver couldn't
> deal with it, but the new one can, though we haven't yet implemented
> support for any of the topaz digital codecs).
>
> I remember a discussion with the Alsa folks where it was question to
> have Alsa userland automatically instanciate softvol if there is no
> volume provided by the driver, which is a better approach.
>
> Takashi, was this ever implemented ? John, what is your Alsa userland
> version ?
1.0.10-4ubuntu4
thanks
-john
On Wed, 2006-09-06 at 10:50 +1000, Benjamin Herrenschmidt wrote:
> I remember a discussion with the Alsa folks where it was question to
> have Alsa userland automatically instanciate softvol if there is no
> volume provided by the driver, which is a better approach.
It does this, beginning with 1.0.12.
johannes
At Tue, 05 Sep 2006 18:08:44 -0700,
john stultz wrote:
>
> On Wed, 2006-09-06 at 10:50 +1000, Benjamin Herrenschmidt wrote:
> > > However... ;)
> > >
> > > It seems the new device doesn't have any volume control. I know the old
> > > toonie driver used some form of softvol support, but "it just worked",
> > > where as now I have no control over my system's audio volume.
> >
> > It's a userland problem :) Your alsa config needs to enable the softvol
> > plugin for it.
>
> Yea. I figured. :( I've played around a bit w/ the .asoundrc file to
> re-enable softvol (A similar hack was needed originally after the toonie
> driver went in), but so far I've been unsuccessful.
I guess adding the following to /usr/share/alsa/cards/aliases.conf
(or equivalent path depending on your distro) should suffice:
AppleOnbdAudio cards.PMacToonie
> > > While not the most terrible of regressions, its a bit irritating (waking
> > > to loud mail notifications, specifically :). Is this something that I
> > > have to wait for an alsa userland update to fix, or is the new kernel
> > > driver just not fully functional yet?
> >
> > Part of the problem is that you can't anymore identify the type of codec
> > based on the card name thus Alsa old mecanism of having a specific
> > toonie config file that includes softvol doesn't work any more. The
> > trick was bad in the first place though because you can have multiple
> > different codecs anyway, so it didn't scale. (The old driver couldn't
> > deal with it, but the new one can, though we haven't yet implemented
> > support for any of the topaz digital codecs).
> >
> > I remember a discussion with the Alsa folks where it was question to
> > have Alsa userland automatically instanciate softvol if there is no
> > volume provided by the driver, which is a better approach.
> >
> > Takashi, was this ever implemented ? John, what is your Alsa userland
> > version ?
>
> 1.0.10-4ubuntu4
Could you try alsa-lib 1.0.12? Then you'll have more bonus, not only
the fixes for this softvol problem ;)
Takashi
On Wed, 2006-09-06 at 14:13 +0200, Takashi Iwai wrote:
> At Tue, 05 Sep 2006 18:08:44 -0700,
> john stultz wrote:
> >
> > On Wed, 2006-09-06 at 10:50 +1000, Benjamin Herrenschmidt wrote:
> > > > However... ;)
> > > >
> > > > It seems the new device doesn't have any volume control. I know the old
> > > > toonie driver used some form of softvol support, but "it just worked",
> > > > where as now I have no control over my system's audio volume.
> > >
> > > It's a userland problem :) Your alsa config needs to enable the softvol
> > > plugin for it.
> >
> > Yea. I figured. :( I've played around a bit w/ the .asoundrc file to
> > re-enable softvol (A similar hack was needed originally after the toonie
> > driver went in), but so far I've been unsuccessful.
>
> I guess adding the following to /usr/share/alsa/cards/aliases.conf
> (or equivalent path depending on your distro) should suffice:
>
> AppleOnbdAudio cards.PMacToonie
Thanks! I'll give that a whirl.
> > > > While not the most terrible of regressions, its a bit irritating (waking
> > > > to loud mail notifications, specifically :). Is this something that I
> > > > have to wait for an alsa userland update to fix, or is the new kernel
> > > > driver just not fully functional yet?
> > >
> > > Part of the problem is that you can't anymore identify the type of codec
> > > based on the card name thus Alsa old mecanism of having a specific
> > > toonie config file that includes softvol doesn't work any more. The
> > > trick was bad in the first place though because you can have multiple
> > > different codecs anyway, so it didn't scale. (The old driver couldn't
> > > deal with it, but the new one can, though we haven't yet implemented
> > > support for any of the topaz digital codecs).
> > >
> > > I remember a discussion with the Alsa folks where it was question to
> > > have Alsa userland automatically instanciate softvol if there is no
> > > volume provided by the driver, which is a better approach.
> > >
> > > Takashi, was this ever implemented ? John, what is your Alsa userland
> > > version ?
> >
> > 1.0.10-4ubuntu4
>
> Could you try alsa-lib 1.0.12? Then you'll have more bonus, not only
> the fixes for this softvol problem ;)
Unfortunately, as good as "more bonus" sounds, that will probably have
to wait until edgy comes out. :)
I appreciate the help and clarifications!
-john