ZeRaler
Posts: 10
Joined: Mon Nov 05, 2012 11:02 am

Alsa + USB Bluetooth Dongle = Oops

Wed Jan 22, 2014 11:12 am

Hi,

I am facing a problem when I plug my bluetooth USB dongle, as soon as I try to play sound, my kernel oopsing.

Config :
RaspberryPi version B
Memory split : 16Mo GPU
Raspbian updated distrib (without lots of packages(X11, ...))
Lastest rpi-update available kenel : 3.10.27+
1A power supply
USB powered hub
2 tries with different bluetooth USB dongles :
  • ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
  • ID 0f4d:1000 Microtune, Inc. Bluetooth Dongle
Bluetooth dongles work well, I can even play a sound through them(with pulseaudio).

I cant figure out what to investigate.
Following is serial console output. Bluetooth USB device is pluged at 81s and aplay is used at 129s
All sound card usages(aplay, amixer, pactl, ...) seem to have same behaviour.

Code: Select all

...
[   81.537873] usb 1-1.3.3: new full-speed USB device number 8 using dwc_otg
[   81.645946] usb 1-1.3.3: New USB device found, idVendor=1131, idProduct=1001
[   81.645981] usb 1-1.3.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   81.964699] usbcore: registered new interface driver btusb
[  129.679924] Bad mode in (null) handler detected
[  129.689444] Internal error: Oops - bad mode: 0 [#1] PREEMPT ARM

Entering kdb (current=0xd9c118c0, pid 2312) Oops: (null)
due to oops @ 0xc02ea46c

dCPU: 0 PID: 2312 Comm: alsa-sink Not tainted 3.10.26+ #628
dtask: d9c118c0 ti: d9c1a000 task.ti: d9c1a000
PC is at fiq_sof_handle+0xa0/0x110
LR is at 0xb6c4fa5c
pc : [<c02ea46c>]    lr : [<b6c4fa5c>]    psr: 800001d1
sp : d9c1bfb0  ip : b6319430  fp : 00000001
r10: 00000004  r9 : 00000000  r8 : 00575350
r7 : 000045e6  r6 : c0675760  r5 : c05c4e04  r4 : 00000000
r3 : 00000a14  r2 : 000009f3  r1 : f301080e  r0 : 0dd605e7
Flags: Nzcv  IRQs off  FIQs off  Mode FIQ_32  ISA ARM  Segment user
Control: 00c5387d  Table: 1c7e4008  DAC: 00000015
dCPU: 0 PID: 2312 Comm: alsa-sink Not tainted 3.10.26+ #628
[<c0013a18>] (unwind_backtrace+0x0/0xf0) from [<c0010d7c>] (show_stack+0x10/0x14)
[<c0010d7c>] (show_stack+0x10/0x14) from [<c0076aec>] (kdb_dumpregs+0x28/0x50)
[<c0076aec>] (kdb_dumpregs+0x28/0x50) from [<c0078d5c>] (kdb_main_loop+0x3c0/0x6c0)
[<c0078d5c>] (kdb_main_loop+0x3c0/0x6c0) from [<c007b45c>] (kdb_stub+0x154/0x380)
[<c007b45c>] (kdb_stub+0x154/0x380) from [<c0072644>] (kgdb_handle_exception+0x32c/0x6c0)
[<c0072644>] (kgdb_handle_exception+0x32c/0x6c0) from [<c0013198>] (kgdb_notify+0x24/0x40)
[<c0013198>] (kgdb_notify+0x24/0x40) from [<c04042a8>] (notifier_call_chain+0x44/0x84)
[<c04042a8>] (notifier_call_chain+0x44/0x84) from [<c0404320>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c0404320>] (__atomic_notifier_call_chain+0x38/0x4c) from [<c040434c>] (atomic_notifier_call_chain+0x18/0x20)
[<c040434c>] (atomic_notifier_call_chain+0x18/0x20) from [<c040438c>] (notify_die+0x38/0x44)
[<c040438c>] (notify_die+0x38/0x44) from [<c0010e44>] (die+0xc4/0x3a8)
[<c0010e44>] (die+0xc4/0x3a8) from [<c0011444>] (bad_mode+0x3c/0x5c)
[<c0011444>] (bad_mode+0x3c/0x5c) from [<b6c4fa5c>] (0xb6c4fa5c)

kdb> 
Can you give me a way to solve/investigate?

Thanks.

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Alsa + USB Bluetooth Dongle = Oops

Fri Jan 24, 2014 6:11 pm

I had the same issue. Have built and installed a 3.6 kernel and it seems to be working. It will do for my needs until something better comes along.

ZeRaler
Posts: 10
Joined: Mon Nov 05, 2012 11:02 am

Re: Alsa + USB Bluetooth Dongle = Oops

Sun Jan 26, 2014 5:12 pm

Yep, you're right. I recompiled kernel 3.6 by myself and it does not have this issue.
Maybe we can make a diff to see where the problem come from.

ZeRaler
Posts: 10
Joined: Mon Nov 05, 2012 11:02 am

Re: Alsa + USB Bluetooth Dongle = Oops

Mon Jan 27, 2014 5:37 pm

Tiny update,
I restart from the last 3.10.27 and just enabling AUDIO_DEBUG_ENABLE & AUDIO_VERBOSE_DEBUG_ENABLE in sound/arm/bcm2835.h prevents the issue to occur.

prak
Posts: 1
Joined: Sun Feb 02, 2014 10:13 am

Re: Alsa + USB Bluetooth Dongle = Oops

Sun Feb 02, 2014 10:55 am

I have the same problem. How do I enable AUDIO_DEBUG_ENABLE & AUDIO_VERBOSE_DEBUG_ENABLE. I see the text in the file, do I remove the hash ?

oops output:

Code: Select all

pactl load-module module-loopback source=bluez_source.9C_3A_AF_3F_90_BC sink=alss
Entering kdb (current=0xd9ae8c60, pid 2322) Oops: (null)0 adjust_time=0
due to oops @ 0xc02ee158
~
dCPU: 0 PID: 2322 Comm: alsa-sink Not tainted 3.10.28+ #1
dtask: d9ae8c60 ti: d9bbc000 task.ti: d9bbc000
PC is at fiq_sof_handle+0xa0/0x110
LR is at 0xb6c78a5c
pc : [<c02ee158>]    lr : [<b6c78a5c>]    psr: 800001d1
sp : d9bbdfb0  ip : b64b9430  fp : 00000001
r10: 00000005  r9 : 00000000  r8 : 01298a30
r7 : c067aa20  r6 : 0000015d  r5 : c05cacd0  r4 : 00000003
r3 : 0000016b  r2 : 0000014a  r1 : f301080e  r0 : 0189015d
Flags: Nzcv  IRQs off  FIQs off  Mode FIQ_32  ISA ARM  Segment user
Control: 00c5387d  Table: 16c3c008  DAC: 00000015
dCPU: 0 PID: 2322 Comm: alsa-sink Not tainted 3.10.28+ #1
[<c0013970>] (unwind_backtrace+0x0/0xf0) from [<c0010d04>] (show_stack+0x10/0x14)
[<c0010d04>] (show_stack+0x10/0x14) from [<c0076644>] (kdb_dumpregs+0x28/0x50)
[<c0076644>] (kdb_dumpregs+0x28/0x50) from [<c0078f3c>] (kdb_main_loop+0x378/0x72c)
[<c0078f3c>] (kdb_main_loop+0x378/0x72c) from [<c007b88c>] (kdb_stub+0x2d0/0x3d0)
[<c007b88c>] (kdb_stub+0x2d0/0x3d0) from [<c0072850>] (kgdb_handle_exception+0x2f0/0x6ac)
[<c0072850>] (kgdb_handle_exception+0x2f0/0x6ac) from [<c00130e0>] (kgdb_notify+0x28/0x44)
[<c00130e0>] (kgdb_notify+0x28/0x44) from [<c0408d2c>] (notifier_call_chain+0x44/0x84)
[<c0408d2c>] (notifier_call_chain+0x44/0x84) from [<c0408da4>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c0408da4>] (__atomic_notifier_call_chain+0x38/0x4c) from [<c0408dd0>] (atomic_notifier_call_chain+0x18/0x20)
[<c0408dd0>] (atomic_notifier_call_chain+0x18/0x20) from [<c0408e10>] (notify_die+0x38/0x44)
[<c0408e10>] (notify_die+0x38/0x44) from [<c0010dd0>] (die+0xc8/0x3b8)
[<c0010dd0>] (die+0xc8/0x3b8) from [<c00113c0>] (bad_mode+0x3c/0x5c)
[<c00113c0>] (bad_mode+0x3c/0x5c) from [<b6c78a5c>] (0xb6c78a5c)

ZeRaler
Posts: 10
Joined: Mon Nov 05, 2012 11:02 am

Re: Alsa + USB Bluetooth Dongle = Oops

Sun Feb 02, 2014 4:50 pm

Enabling AUDIO_DEBUG_ENABLE & AUDIO_VERBOSE_DEBUG_ENABLE is not a solution, it generates lots of kernel message.
It may help to understand a race condition around snd bcm2835 module.

If you want to try this as solution, you have to uncomment the 2 defines(remove /* & */ around ) in the sound/arm/bcm2835.h file and recompile your kernel.

franmmd
Posts: 2
Joined: Thu Feb 06, 2014 10:40 am

Re: Alsa + USB Bluetooth Dongle = Oops

Thu Feb 06, 2014 10:45 am

Hi!

I have the same problem. There is an easy way to solve it.

Any clue??

Thanks in advance.

ZeRaler
Posts: 10
Joined: Mon Nov 05, 2012 11:02 am

Re: Alsa + USB Bluetooth Dongle = Oops

Sat Feb 08, 2014 12:54 pm

Hi,

no more clue for now. We have to take some time to investigate & check issues already addressed in issues tracker : https://github.com/raspberrypi/linux/issues

Maybe post this issue in a better place can help too.

Return to “Troubleshooting”