* Soundcard problems on Cobalt Qube 2
@ 2006-05-21 18:13 Michael Schwingen
2006-05-22 15:27 ` Atsushi Nemoto
0 siblings, 1 reply; 3+ messages in thread
From: Michael Schwingen @ 2006-05-21 18:13 UTC (permalink / raw)
To: linux-mips
Hi,
I am new here - if there is a more appropriate place for this question,
please redirect me there.
I got a Qube 2 which I want to use as a living-room audio device, using a
Terratec sound card with ICE1712 chipset - that card works fine in my
Linux-x86 box and provides good sound quality.
I installed Debian testing and compiled a kernel.org 2.6.16.14 kernel.
Everything works fine until I start playing sound - at that point, I get
crash #1 below.
Just for comparison, I tried two different soundcards - a Yamaha
YMF744-based card, which at least plays 8-bit WAV files using aplay, but
causes crash #2 when playing mp3 files using mocp. A ES1938-based card does
not respond to alsamixer, and showed crash #3 when playing mp3 files using
mocp. An Intel EEPRO100 ethernet card works just fine.
I am only really interested in getting the ICE1712 card working, but the
other two crashes seemed quite similar, so there may be a common or similar
problem in the drivers. I have a bit of kernel driver experience, but have
not used DMA or interrupts until now, and have no experience on MIPS.
Do you have any idea what goes wrong, or lacking that, where I might start
looking?
cu
Michael
Crash #1 - snd_ice1712:
Unhandled kernel unaligned access[#1]:
Cpu 0
$ 0 : 00000000 b0006c00 00004000 ffbf63fd
$ 4 : 81460a40 00012000 83aad400 811b3580
$ 8 : b0006c01 1000001e 00000028 00000028
$12 : 00000028 007fffff ff800000 7fff0000
$16 : 82b93e20 00000000 822ba3e8 00000000
$20 : 831352b0 2b0fae80 000003e8 8292de8c
$24 : 0000ffff 2ab910f0
$28 : 82b92000 82b93de8 83423680 800d93f4
Hi : 00000000
Lo : 00000000
epc : c00922dc snd_pcm_mmap_data_nopage+0xa0/0x10c [snd_pcm] Not tainted
ra : 800d93f4 __handle_mm_fault+0x310/0xb14
Status: b0006c03 KERNEL EXL IE
Cause : 00808010
BadVA : ffbf6401
PrId : 000028a0
Modules linked in: snd_ice1712 snd_ice17xx_ak4xxx snd_ak4xxx_adda snd_cs8427 snd
_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_ac97_
bus snd_i2c snd_mpu401_uart snd_rawmidi snd_seq_device snd
Process aplay (pid: 1380, threadinfo=82b92000, task=8377ccc8)
Stack : 00465ce0 7f961a88 c0067400 00465ed0 80000000 800d93f4 00000000 00000000
00465ed0 83be6f00 200054a0 c0069158 00000000 00000000 00000002 00000400
2b0fa000 00000000 00000000 00000000 00000000 821403b4 8292de8c 834236b4
8377ccc8 82b93f30 83423680 2b0fae80 00030000 00000000 00001800 8008bcb0
811b3580 8227c360 00465ce0 7f961a88 00000400 000000aa 00000003 c0095fc4
...
Call Trace:
[<c0067400>] snd_timer_start+0x78/0xf8 [snd_timer]
[<800d93f4>] __handle_mm_fault+0x310/0xb14
[<c0069158>] snd_timer_user_ioctl+0x3a8/0x11e0 [snd_timer]
[<8008bcb0>] do_page_fault+0x270/0x3d0
[<c0095fc4>] snd_pcm_playback_ioctl1+0x68/0x6b8 [snd_pcm]
[<800b0018>] run_timer_softirq+0x2c/0x248
[<80102b4c>] do_ioctl+0x2c/0x80
[<80102b4c>] do_ioctl+0x2c/0x80
[<8008619c>] sys_ipc+0x74/0x2e8
[<8008c340>] tlb_do_page_fault_0+0x100/0x108
[<8008a4e0>] stack_done+0x20/0x3c
Code: 54400002 8c83000c 00801821 <c0620004> 24420001 e0620004 1040fffc 0000
0000 1200ffda
---------------------------------------------------------------------------
Crash #2 - snd_ymfpci:
Data bus error, epc == 2ab66928, ra == 2ab677bc
Bad pte = 2310079f, process = ???, vm_flags = 800fb, vaddr = 2aadc000
Call Trace:
[<800d77d0>] vm_normal_page+0x98/0xa8
[<800d7be4>] unmap_vmas+0x218/0x674
[<800d7c7c>] unmap_vmas+0x2b0/0x674
[<800db270>] exit_mmap+0x70/0x10c
[<800a2424>] mmput+0x54/0xdc
[<800a241c>] mmput+0x4c/0xdc
[<800a7484>] do_exit+0x154/0x890
[<800a7bfc>] do_group_exit+0x3c/0xb8
[<800b3e14>] get_signal_to_deliver+0x2a4/0x514
[<800b3378>] __group_send_sig_info+0x94/0xd8
[<800b330c>] __group_send_sig_info+0x28/0xd8
[<800b43a4>] group_send_sig_info+0x14c/0x17c
[<800840d4>] do_signal+0x74/0x300
[<800b45e4>] sys_kill+0x6c/0x190
[<c0085774>] snd_ymfpci_interrupt+0xec/0x200 [snd_ymfpci]
[<800b0018>] run_timer_softirq+0x2c/0x248
[<800c67f4>] handle_IRQ_event+0x7c/0xf0
[<800c698c>] __do_IRQ+0x124/0x148
[<800817f0>] work_notifysig+0xc/0x14
[<800817ac>] work_resched+0x8/0x40
-------------------------------------------------------------------
Crash #3 - snd_es1938:
snd_es1938_write_cmd timeout (0x02c0/0x0280)
snd_es1938_write_cmd timeout (0x02b4/0x0280)
snd_es1938_write_cmd timeout (0x02c0/0x0280)
snd_es1938_write_cmd timeout (0x02a8/0x0280)
snd_es1938_write_cmd timeout (0x02c0/0x0280)
snd_es1938_write_cmd timeout (0x02b4/0x0280)
snd_es1938_write_cmd timeout (0x02c0/0x0280)
snd_es1938_write_cmd timeout (0x02a8/0x0280)
Data bus error, epc == 2ab66928, ra == 2ab677bc
Bad pte = 230b079f, process = ???, vm_flags = 800fb, vaddr = 2aadc000
Call Trace:
[<800d77d0>] vm_normal_page+0x98/0xa8
[<800d775c>] vm_normal_page+0x24/0xa8
[<800d7be4>] unmap_vmas+0x218/0x674
[<800d7c7c>] unmap_vmas+0x2b0/0x674
[<80238954>] schedule+0x608/0x8c8
[<800db270>] exit_mmap+0x70/0x10c
[<800a2424>] mmput+0x54/0xdc
[<800a241c>] mmput+0x4c/0xdc
[<800a7484>] do_exit+0x154/0x890
[<800b2a18>] __dequeue_signal+0x1cc/0x26c
[<800d9b48>] __handle_mm_fault+0xa64/0xb14
[<800a7bfc>] do_group_exit+0x3c/0xb8
[<800b3e14>] get_signal_to_deliver+0x2a4/0x514
[<800b3378>] __group_send_sig_info+0x94/0xd8
[<800b330c>] __group_send_sig_info+0x28/0xd8
[<800840d4>] do_signal+0x74/0x300
[<800b45e4>] sys_kill+0x6c/0x190
[<802387d8>] schedule+0x48c/0x8c8
[<800aadb4>] __do_softirq+0x8c/0x150
[<8008458c>] _sys_rt_sigsuspend+0x114/0x13c
[<800817f0>] work_notifysig+0xc/0x14
[<800817ac>] work_resched+0x8/0x40
--
Some people have no repect of age unless it is bottled.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Soundcard problems on Cobalt Qube 2
2006-05-21 18:13 Soundcard problems on Cobalt Qube 2 Michael Schwingen
@ 2006-05-22 15:27 ` Atsushi Nemoto
2006-05-22 20:32 ` Michael Schwingen
0 siblings, 1 reply; 3+ messages in thread
From: Atsushi Nemoto @ 2006-05-22 15:27 UTC (permalink / raw)
To: rincewind; +Cc: linux-mips
On Sun, 21 May 2006 20:13:24 +0200, rincewind@discworld.dascon.de (Michael Schwingen) wrote:
> I installed Debian testing and compiled a kernel.org 2.6.16.14 kernel.
> Everything works fine until I start playing sound - at that point, I get
> crash #1 below.
>
> Just for comparison, I tried two different soundcards - a Yamaha
> YMF744-based card, which at least plays 8-bit WAV files using aplay, but
> causes crash #2 when playing mp3 files using mocp. A ES1938-based card does
> not respond to alsamixer, and showed crash #3 when playing mp3 files using
> mocp. An Intel EEPRO100 ethernet card works just fine.
>
> I am only really interested in getting the ICE1712 card working, but the
> other two crashes seemed quite similar, so there may be a common or similar
> problem in the drivers. I have a bit of kernel driver experience, but have
> not used DMA or interrupts until now, and have no experience on MIPS.
>
> Do you have any idea what goes wrong, or lacking that, where I might start
> looking?
I know one problem in ALSA on mips, but not sure it is relevant to
your crash.
http://www.linux-mips.org/archives/linux-mips/2006-01/msg00327.html
And here is an updated (still ugly) patch against current git.
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 0860c5a..8f9fd64 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3110,6 +3110,10 @@ static struct page *snd_pcm_mmap_data_no
return NOPAGE_OOM;
} else {
vaddr = runtime->dma_area + offset;
+#if defined(__mips__) && defined(CONFIG_DMA_NONCOHERENT)
+ /* dma_area is nocache addr */
+ vaddr = CAC_ADDR(vaddr);
+#endif
page = virt_to_page(vaddr);
}
get_page(page);
@@ -3131,6 +3135,10 @@ static struct vm_operations_struct snd_p
static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *area)
{
+#if defined(__mips__) && defined(CONFIG_DMA_NONCOHERENT)
+ /* use uncached access for dma_area */
+ area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
+#endif
area->vm_ops = &snd_pcm_vm_ops_data;
area->vm_private_data = substream;
area->vm_flags |= VM_RESERVED;
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c
index 74745da..c4828d7 100644
--- a/sound/core/sgbuf.c
+++ b/sound/core/sgbuf.c
@@ -95,7 +95,12 @@ void *snd_malloc_sgbuf_pages(struct devi
}
sgbuf->table[i].buf = tmpb.area;
sgbuf->table[i].addr = tmpb.addr;
+#if defined(__mips__) && defined(CONFIG_DMA_NONCOHERENT)
+ /* snd_dma_malloc_pages returns nocache addr */
+ sgbuf->page_table[i] = virt_to_page(CAC_ADDR(tmpb.area));
+#else
sgbuf->page_table[i] = virt_to_page(tmpb.area);
+#endif
sgbuf->pages++;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Soundcard problems on Cobalt Qube 2
2006-05-22 15:27 ` Atsushi Nemoto
@ 2006-05-22 20:32 ` Michael Schwingen
0 siblings, 0 replies; 3+ messages in thread
From: Michael Schwingen @ 2006-05-22 20:32 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Tue, May 23, 2006 at 12:27:28AM +0900, Atsushi Nemoto wrote:
>
> I know one problem in ALSA on mips, but not sure it is relevant to
> your crash.
>
> http://www.linux-mips.org/archives/linux-mips/2006-01/msg00327.html
>
> And here is an updated (still ugly) patch against current git.
Wow!
Ugly maybe, but it fixes the crashes - YMF744 works fine now (the card sound
a bit distorted, but that may well be the hardware - that's why I wanted the
ICE1712 card). I have not tried the ESS card, because that got non-crashing
lockups before.
ICE1712 does not crash, but reports underruns and the aplay process hangs -
I will see if I can track this down a bit more.
cu
Michael
--
Some people have no repect of age unless it is bottled.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-22 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-21 18:13 Soundcard problems on Cobalt Qube 2 Michael Schwingen
2006-05-22 15:27 ` Atsushi Nemoto
2006-05-22 20:32 ` Michael Schwingen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox