[v2] tm6000+audio

Message ID 20100920160715.7594ee2e@glory.local (mailing list archive)
State Superseded, archived
Headers

Commit Message

Dmitri Belimov Sept. 20, 2010, 8:07 p.m. UTC
  Hi 

I rework my last patch for audio and now audio works well. This patch can be submited to GIT tree
Quality of audio now is good for SECAM-DK. For other standard I set some value from datasheet need some tests.

1. Fix pcm buffer overflow
2. Rework pcm buffer fill method
3. Swap bytes in audio stream
4. Change some registers value for TM6010
5. Change pcm buffer size


Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>


With my best regards, Dmitry.
  

Comments

Mauro Carvalho Chehab Sept. 21, 2010, 8:37 p.m. UTC | #1
Em 20-09-2010 17:07, Dmitri Belimov escreveu:
> Hi 
> 
> I rework my last patch for audio and now audio works well. This patch can be submited to GIT tree
> Quality of audio now is good for SECAM-DK. For other standard I set some value from datasheet need some tests.
> 
> 1. Fix pcm buffer overflow
> 2. Rework pcm buffer fill method
> 3. Swap bytes in audio stream
> 4. Change some registers value for TM6010
> 5. Change pcm buffer size
> --- a/drivers/staging/tm6000/tm6000-stds.c
> +++ b/drivers/staging/tm6000/tm6000-stds.c
> @@ -96,6 +96,7 @@ static struct tm6000_std_tv_settings tv_stds[] = {
>  
>  			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
>  			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
> +			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x21}, /* FIXME */

This didn't seem to work for PAL-M. Probably, the right value for it is 0x22, to
follow NTSC/M, since both uses the same audio standard.

On some tests, I was able to receive some audio there, at the proper rate, with a
tm6010-based device. It died when I tried to change the channel, so I didn't rear
yet the real audio, but I suspect it will work on my next tests.

Yet, is being hard to test, as the driver has a some spinlock logic broken.
I'm enclosing the logs.

I was able to test only when using a monitor on the same machine. All trials of
using vnc and X11 export ended by not receiving any audio and hanging the machine.

I suspect that we need to fix the spinlock issue, in order to better test it.

Cheers,
Mauro.

[  564.483502] [drm] nouveau 0000:0f:00.0: Allocating FIFO number 1
[  564.492341] [drm] nouveau 0000:0f:00.0: nouveau_channel_alloc: initialised F1
[  579.380503] BUG: spinlock wrong CPU on CPU#0, pulseaudio/4760
[  579.386244]  lock: ffff880119bde7e8, .magic: dead4ead, .owner: pulseaudio/471
[  579.394738] Pid: 4760, comm: pulseaudio Tainted: G         C  2.6.35+ #4
[  579.401415] Call Trace:
[  579.403856]  [<ffffffff8224f539>] spin_bug+0x9c/0xa3
[  579.408803]  [<ffffffff8224f625>] do_raw_spin_unlock+0xe5/0xfc
[  579.414617]  [<ffffffff824b2092>] _raw_spin_unlock+0x2b/0x30
[  579.420256]  [<ffffffffa04453e4>] snd_tm6000_card_trigger+0xb9/0xc7 [tm6000_]
[  579.427719]  [<ffffffffa0163a4e>] snd_pcm_do_start+0x2c/0x2e [snd_pcm]
[  579.434228]  [<ffffffffa0163975>] snd_pcm_action_single+0x33/0x6a [snd_pcm]
[  579.441166]  [<ffffffff824b1ad0>] ? _raw_spin_lock+0x39/0x40
[  579.446808]  [<ffffffffa016551a>] ? snd_pcm_action_lock_irq+0x7d/0xb1 [snd_p]
[  579.454092]  [<ffffffffa0165528>] snd_pcm_action_lock_irq+0x8b/0xb1 [snd_pcm]
[  579.461205]  [<ffffffffa0167edd>] snd_pcm_common_ioctl1+0x3ec/0xb08 [snd_pcm]
[  579.468316]  [<ffffffff821ff5da>] ? inode_has_perm+0xab/0xcf
[  579.473958]  [<ffffffffa0168801>] snd_pcm_capture_ioctl1+0x208/0x225 [snd_pc]
[  579.481160]  [<ffffffff8207bea5>] ? __lock_acquire+0x201/0x424
[  579.486974]  [<ffffffffa016884d>] snd_pcm_capture_ioctl+0x2f/0x33 [snd_pcm]
[  579.493910]  [<ffffffff8212e408>] vfs_ioctl+0x32/0xa6
[  579.498945]  [<ffffffff8212ed57>] do_vfs_ioctl+0x497/0x4d0
[  579.504414]  [<ffffffff8212edec>] sys_ioctl+0x5c/0x9c
[  579.509450]  [<ffffffff82009df2>] system_call_fastpath+0x16/0x1b

Message from syslogd@nehalem at Sep 21 20:06:31 ...
 kernel:[  579.380503] BUG: spinlock wrong CPU on CPU#0, pulseaudio/4760

Message from syslogd@nehalem at Sep 21 20:06:31 ...
 kernel:[  579.386244]  lock: ffff880119bde7e8, .magic: dead4ead, .owner: pulse1
[  745.147642] fuse init (API version 7.14)
[ 1170.332614] tm6000: open called (dev=video0)
[ 1171.028670] xc2028 3-0061: Loading firmware for type=BASE (1), id 0000000000.
[ 1233.289714] xc2028 3-0061: Loading firmware for type=(0), id 000000000000b70.
[ 1234.345782] SCODE (20000000), id 000000000000b700:
[ 1234.350586] xc2028 3-0061: Loading SCODE for type=MONO SCODE HAS_IF_4320 (60.
[ 1235.495700] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.541628] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.581902] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.616388] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.645121] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.668112] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.685352] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.697594] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.720580] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.766553] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.806788] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.841268] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.870005] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.892991] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.910230] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.922474] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.945465] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1235.991441] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.031667] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.066150] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.094887] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.117873] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.135114] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.147360] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.170348] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.216317] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.256553] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.291035] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.319770] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.342759] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.359997] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.372241] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.395229] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.441205] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.481440] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.515919] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.544653] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.567640] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.584882] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1236.597125] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.446681] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.492645] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.532873] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.567354] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.596092] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.619080] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.636320] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1285.648563] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1303.164298] tm6000: open called (dev=video0)
[ 1304.615684] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.661654] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.701882] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.736367] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.765099] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.788092] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.805329] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.817573] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.840563] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.886536] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.926769] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.961248] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1304.989985] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.012975] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.030214] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.042457] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.065445] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.111416] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.151665] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.186136] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.214867] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.237855] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.255095] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.267340] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.290327] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.336302] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.376533] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.411013] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.439752] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.462738] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.479980] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.492225] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.515210] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.561185] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.601414] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.635900] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.664634] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.687619] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.704861] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1305.717060] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.486680] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.532653] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.572882] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.607364] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.636097] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.659086] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.676330] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1331.688573] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1411.292381] tm6000: open called (dev=video0)
[ 1412.737342] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.783309] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.823540] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.858026] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.886757] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.909747] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.926990] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.939232] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1412.962223] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.008193] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.048425] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.082905] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.111643] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.134631] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.151871] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.164117] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.187106] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.233076] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.273308] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.307789] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.336525] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.359512] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.376756] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.388994] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.411996] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.457960] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.498190] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.532673] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.561407] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.584398] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.601640] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.613879] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.636868] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.682841] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.723071] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.757556] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.786290] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.809280] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.826522] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1413.838763] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.321344] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.367319] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.407549] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.442032] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.470766] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.493756] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.510991] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1422.523212] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1438.182687] tm6000: open called (dev=video0)
[ 1439.632325] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.678299] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.718525] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.753010] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.781744] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.804734] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.821975] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.834216] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.857207] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.903176] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.943408] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1439.977903] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.006626] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.029613] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.046856] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.059102] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.082089] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.128064] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.168249] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.202776] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.231510] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.254499] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.271740] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.283982] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.306977] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.352945] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.393173] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.427655] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.456395] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.479380] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.496622] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.508867] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.531854] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.577830] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.618057] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.652539] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.681274] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.704261] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.721506] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1440.733748] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1444.940556] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1444.986533] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.026762] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.061244] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.089983] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.112965] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.130208] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1445.142450] tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
[ 1461.052139] tm6000: Remove (TM6000 Audio Extension) extension
[ 1461.058516] usbcore: deregistering interface driver tm6000
[ 1461.064064] tm6000: disconnecting tm6000 #0
[ 1461.096303] xc2028 3-0061: destroying instance
[ 1472.642877] tm6000: module is from the staging directory, the quality is unk.
[ 1472.659238] tm6000 v4l2 driver version 0.0.2 loaded
[ 1472.665293] tm6000: alt 0, interface 0, class 255
[ 1472.670050] tm6000: alt 0, interface 0, class 255
[ 1472.674794] tm6000: Bulk IN endpoint: 0x82 (max size=512 bytes)
[ 1472.680758] tm6000: alt 0, interface 0, class 255
[ 1472.685499] tm6000: alt 1, interface 0, class 255
[ 1472.690244] tm6000: ISOC IN endpoint: 0x81 (max size=3072 bytes)
[ 1472.696284] tm6000: alt 1, interface 0, class 255
[ 1472.701030] tm6000: alt 1, interface 0, class 255
[ 1472.705730] tm6000: INT IN endpoint: 0x83 (max size=4 bytes)
[ 1472.705732] tm6000: alt 2, interface 0, class 255
[ 1472.705735] tm6000: alt 2, interface 0, class 255
[ 1472.705737] tm6000: alt 2, interface 0, class 255
[ 1472.705740] tm6000: alt 3, interface 0, class 255
[ 1472.705742] tm6000: alt 3, interface 0, class 255
[ 1472.705745] tm6000: alt 3, interface 0, class 255
[ 1472.705747] tm6000: New video device @ 480 Mbps (2040:6600, ifnum 0)
[ 1472.705750] tm6000: Found Hauppauge WinTV HVR-900H / WinTV USB2-Stick
[ 1473.512254] Board version = 0x67980bf4
[ 1473.875381] board=0x67980bf4
[ 1473.988648] tm6000 #0: i2c eeprom 00: 01 59 54 45 12 01 00 02 00 00 00 40 40f
[ 1474.151886] tm6000 #0: i2c eeprom 10: 69 00 10 20 40 01 02 03 48 00 79 00 62.
[ 1474.315115] tm6000 #0: i2c eeprom 20: ff 00 64 ff ff ff ff ff ff ff ff ff ff.
[ 1474.478357] tm6000 #0: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1474.644936] tm6000 #0: i2c eeprom 40: 10 03 48 00 56 00 52 00 39 00 30 00 30.
[ 1474.808167] tm6000 #0: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1474.971419] tm6000 #0: i2c eeprom 60: 30 ff ff ff 0f ff ff ff ff ff 0a 03 32.
[ 1475.134646] tm6000 #0: i2c eeprom 70: 3f 00 ff ff ff ff ff ff ff ff ff ff ff.
[ 1475.301228] tm6000 #0: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1475.464488] tm6000 #0: i2c eeprom 90: 36 ff ff ff 16 03 34 00 30 00 33 00 31.
[ 1475.627698] tm6000 #0: i2c eeprom a0: 33 00 32 00 37 00 34 00 35 00 00 00 00.
[ 1475.794267] tm6000 #0: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1475.960844] tm6000 #0: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1476.130747] tm6000 #0: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1476.300647] tm6000 #0: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1476.463871] tm6000 #0: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff.
[ 1476.619190]   ................
[ 1476.635986] tuner 3-0061: chip found @ 0xc2 (tm6000 #0)
[ 1476.641378] xc2028 3-0061: creating new instance
[ 1476.645986] xc2028 3-0061: type set to XCeive xc2028/xc3028 tuner
[ 1476.652067] Setting firmware parameters for xc2028
[ 1476.677341] xc2028 3-0061: Loading 81 firmware images from xc3028L-v36.fw, t6
[ 1476.923625] xc2028 3-0061: Loading firmware for type=BASE (1), id 0000000000.
[ 1539.194671] xc2028 3-0061: Loading firmware for type=(0), id 000000000000b70.
[ 1540.250706] SCODE (20000000), id 000000000000b700:
[ 1540.255635] xc2028 3-0061: Loading SCODE for type=MONO SCODE HAS_IF_4320 (60.
[ 1541.353840] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0)
[ 1541.361753] tm6000: open called (dev=video0)
[ 1541.361769] usbcore: registered new interface driver tm6000
[ 1541.363332] tm6000_alsa: module is from the staging directory, the quality i.
[ 1541.381356] tm6000 #0: Initialized (TM6000 Audio Extension) extension
[ 1541.550945] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 1541.557907] IP: [<ffffffff82244d2c>] plist_add+0x6a/0xa2
[ 1541.563214] PGD 5da7067 PUD d1e40067 PMD 0 
[ 1541.567419] Oops: 0000 [#1] SMP 
[ 1541.570658] last sysfs file: /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-5/st
[ 1541.579149] CPU 0 
[ 1541.580980] Modules linked in: tm6000_alsa(C) tm6000(C) fuse tuner_xc2028 tu]
[ 1541.665005] 
[ 1541.666492] Pid: 5832, comm: pulseaudio Tainted: G  R      C  2.6.35+ #4 0AEn
[ 1541.675416] RIP: 0010:[<ffffffff82244d2c>]  [<ffffffff82244d2c>] plist_add+02
[ 1541.683143] RSP: 0018:ffff880005fbfca8  EFLAGS: 00010006
[ 1541.688435] RAX: 0000000000000000 RBX: fffffffffffffff8 RCX: 0000000000000000
[ 1541.695543] RDX: ffff8801198f2448 RSI: 0000000000000000 RDI: ffffffff82c77330
[ 1541.702650] RBP: ffff880005fbfcc8 R08: 0000000000000001 R09: 0000000000000001
[ 1541.709757] R10: 0000000000000000 R11: ffffffff82a761a8 R12: ffff8801198f1040
[ 1541.716864] R13: ffff8801198f1058 R14: ffffffff82a76010 R15: 0000000077359400
[ 1541.723973] FS:  00007f1b1c31c740(0000) GS:ffff880002e00000(0000) knlGS:00000
[ 1541.732031] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1541.737754] CR2: 0000000000000000 CR3: 0000000003865000 CR4: 00000000000006f0
[ 1541.744862] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1541.751968] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1541.759078] Process pulseaudio (pid: 5832, threadinfo ffff880005fbe000, task)
[ 1541.767656] Stack:
[ 1541.769659]  ffffffff82a76010 ffff8801198f1040 00000000ffffffff 0000000000000
[ 1541.776891] <0> ffff880005fbfd18 ffffffff820702a0 0000000000000282 ffffffff80
[ 1541.784579] <0> ffff880005fbfd28 ffff8801198f1040 ffff8800bd035000 ffff880110
[ 1541.792449] Call Trace:
[ 1541.794890]  [<ffffffff820702a0>] update_target+0xb5/0x110
[ 1541.800358]  [<ffffffff82070583>] pm_qos_add_request+0x6b/0x6d
[ 1541.806177]  [<ffffffffa0167595>] snd_pcm_hw_params+0x2e2/0x318 [snd_pcm]
[ 1541.812947]  [<ffffffffa0167d3e>] snd_pcm_common_ioctl1+0x24d/0xb08 [snd_pcm]
[ 1541.820057]  [<ffffffff821ff5da>] ? inode_has_perm+0xab/0xcf
[ 1541.825701]  [<ffffffffa0168801>] snd_pcm_capture_ioctl1+0x208/0x225 [snd_pc]
[ 1541.832901]  [<ffffffffa016884d>] snd_pcm_capture_ioctl+0x2f/0x33 [snd_pcm]
[ 1541.839838]  [<ffffffff8212e408>] vfs_ioctl+0x32/0xa6
[ 1541.844872]  [<ffffffff8212ed57>] do_vfs_ioctl+0x497/0x4d0
[ 1541.850338]  [<ffffffff8212edec>] sys_ioctl+0x5c/0x9c
[ 1541.855374]  [<ffffffff82009df2>] system_call_fastpath+0x16/0x1b
[ 1541.861356] Code: b8 a3 e0 ff 89 de 31 d2 48 c7 c7 30 73 c7 82 e8 4b d7 e7 f 
[ 1541.880975] RIP  [<ffffffff82244d2c>] plist_add+0x6a/0xa2
[ 1541.886365]  RSP <ffff880005fbfca8>
[ 1541.889838] CR2: 0000000000000000
[ 1541.893142] ---[ end trace 0971618c8b6b8c61 ]---

Message from syslogd@nehalem[ 1631.848176] BUG: spinlock lockup on CPU#0, swapp0
[ 1631.850318] BUG: spinlock lockup on CPU#1, swapper/0, ffffffff82a76190
[ 1631.850321] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1631.850323] Call Trace:
[ 1631.850330]  [<ffffffff8224f7bd>] do_raw_spin_lock+0x181/0x1b1
[ 1631.850334]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850338]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850341]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850344]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850348]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850352]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850357]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850360]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1631.850362] sending NMI to all CPUs:
[ 1631.850367] NMI backtrace for cpu 0
[ 1631.850369] CPU 0 
[ 1631.850370] Modules linked in: tm6000_alsa(C) tm6000(C) fuse tuner_xc2028 tu]
[ 1631.850422] 
[ 1631.850425] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4 0AE4h/HP n
[ 1631.850427] RIP: 0010:[<ffffffff82311725>]  [<ffffffff82311725>] io_serial_ia
[ 1631.850433] RSP: 0018:ffffffff82a01b28  EFLAGS: 00000002
[ 1631.850434] RAX: ffffffff82a01b00 RBX: ffffffff83973ea0 RCX: 0000000000000000
[ 1631.850436] RDX: 00000000000003fd RSI: 00000000000003fd RDI: ffffffff83973ea0
[ 1631.850438] RBP: ffffffff82a01b28 R08: 0000000000000001 R09: 0000000000000000
[ 1631.850440] R10: 0000000000000000 R11: ffffffff83973eb8 R12: 000000000000270f
[ 1631.850442] R13: 0000000000000020 R14: 0000000000000000 R15: ffffffff82311da5
[ 1631.850444] FS:  0000000000000000(0000) GS:ffff880002e00000(0000) knlGS:00000
[ 1631.850446] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1631.850448] CR2: 0000000000000000 CR3: 0000000118db8000 CR4: 00000000000006f0
[ 1631.850450] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1631.850452] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1631.850454] Process swapper (pid: 0, threadinfo ffffffff82a00000, task fffff)
[ 1631.850455] Stack:
[ 1631.850457]  ffffffff82a01b58 ffffffff82311d3c ffffffff83973ea0 000000000000b
[ 1631.850459] <0> 000000000000004a ffffffff82ea9c39 ffffffff82a01b78 ffffffff81
[ 1631.850462] <0> ffffffff82ea9c1d ffffffff83973ea0 ffffffff82a01bb8 ffffffff84
[ 1631.850466] Call Trace:
[ 1631.850469]  [<ffffffff82311d3c>] wait_for_xmitr+0x27/0x90
[ 1631.850473]  [<ffffffff82311dc1>] serial8250_console_putchar+0x1c/0x2c
[ 1631.850476]  [<ffffffff8230e104>] uart_console_write+0x45/0x5b
[ 1631.850479]  [<ffffffff82312435>] serial8250_console_write+0xc7/0x121
[ 1631.850482]  [<ffffffff8204f297>] __call_console_drivers+0x6c/0x7e
[ 1631.850485]  [<ffffffff8204f307>] _call_console_drivers+0x5e/0x62
[ 1631.850488]  [<ffffffff8204f762>] release_console_sem+0x147/0x1ec
[ 1631.850490]  [<ffffffff8204fe72>] vprintk+0x3ff/0x452
[ 1631.850494]  [<ffffffff824af2a9>] printk+0x41/0x43
[ 1631.850498]  [<ffffffff8224f7b8>] do_raw_spin_lock+0x17c/0x1b1
[ 1631.850501]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850504]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850507]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850509]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850513]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850516]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850520]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850523]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1631.850526]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1631.850529]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1631.850533]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1631.850536]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1631.850538] Code: 88 11 83 fe 01 77 0b be 01 00 00 00 48 89 c7 ff 50 40 58 5 
[ 1631.850565] Call Trace:
[ 1631.850568]  [<ffffffff82311d3c>] wait_for_xmitr+0x27/0x90
[ 1631.850571]  [<ffffffff82311dc1>] serial8250_console_putchar+0x1c/0x2c
[ 1631.850573]  [<ffffffff8230e104>] uart_console_write+0x45/0x5b
[ 1631.850576]  [<ffffffff82312435>] serial8250_console_write+0xc7/0x121
[ 1631.850579]  [<ffffffff8204f297>] __call_console_drivers+0x6c/0x7e
[ 1631.850581]  [<ffffffff8204f307>] _call_console_drivers+0x5e/0x62
[ 1631.850584]  [<ffffffff8204f762>] release_console_sem+0x147/0x1ec
[ 1631.850587]  [<ffffffff8204fe72>] vprintk+0x3ff/0x452
[ 1631.850590]  [<ffffffff824af2a9>] printk+0x41/0x43
[ 1631.850593]  [<ffffffff8224f7b8>] do_raw_spin_lock+0x17c/0x1b1
[ 1631.850595]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850598]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850601]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850603]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850606]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850609]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850612]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850614]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1631.850617]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1631.850619]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1631.850622]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1631.850625]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1631.850628] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1631.850629] Call Trace:
[ 1631.850630]  <NMI>  [<ffffffff820118ca>] ? show_regs+0x2b/0x2f
[ 1631.850636]  [<ffffffff824b3b41>] nmi_watchdog_tick+0xc2/0x1a5
[ 1631.850639]  [<ffffffff824b2fa4>] do_nmi+0xd8/0x2b7
[ 1631.850642]  [<ffffffff82311da5>] ? serial8250_console_putchar+0x0/0x2c
[ 1631.850644]  [<ffffffff824b29d0>] nmi+0x20/0x30
[ 1631.850647]  [<ffffffff82311da5>] ? serial8250_console_putchar+0x0/0x2c
[ 1631.850650]  [<ffffffff82311725>] ? io_serial_in+0x15/0x1a
[ 1631.850652]  <<EOE>>  [<ffffffff82311d3c>] wait_for_xmitr+0x27/0x90
[ 1631.850656]  [<ffffffff82311dc1>] serial8250_console_putchar+0x1c/0x2c
[ 1631.850659]  [<ffffffff8230e104>] uart_console_write+0x45/0x5b
[ 1631.850662]  [<ffffffff82312435>] serial8250_console_write+0xc7/0x121
[ 1631.850665]  [<ffffffff8204f297>] __call_console_drivers+0x6c/0x7e
[ 1631.850667]  [<ffffffff8204f307>] _call_console_drivers+0x5e/0x62
[ 1631.850670]  [<ffffffff8204f762>] release_console_sem+0x147/0x1ec
[ 1631.850673]  [<ffffffff8204fe72>] vprintk+0x3ff/0x452
[ 1631.850676]  [<ffffffff824af2a9>] printk+0x41/0x43
[ 1631.850679]  [<ffffffff8224f7b8>] do_raw_spin_lock+0x17c/0x1b1
[ 1631.850681]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850684]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850687]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850689]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850692]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850695]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850698]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850700]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1631.850703]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1631.850705]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1631.850708]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1631.850711]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1631.850713] NMI backtrace for cpu 1
[ 1631.850715] CPU 1 
[ 1631.850716] Modules linked in: tm6000_alsa(C) tm6000(C) fuse tuner_xc2028 tu]
[ 1631.850763] 
[ 1631.850765] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4 0AE4h/HP n
[ 1631.850767] RIP: 0010:[<ffffffff8224ab40>]  [<ffffffff8224ab40>] delay_tsc+02
[ 1631.850771] RSP: 0018:ffff88011b749d58  EFLAGS: 00000046
[ 1631.850773] RAX: 0000000000000024 RBX: 0000000036a12720 RCX: 0000000036a12744
[ 1631.850774] RDX: 00000000000003d1 RSI: 0000000000000010 RDI: 000000000026a757
[ 1631.850776] RBP: ffff88011b749d88 R08: 0000000000000000 R09: 0000000000000040
[ 1631.850778] R10: 0000000000000000 R11: ffffffff82a70ab8 R12: 0000000000000001
[ 1631.850780] R13: 000000000026a757 R14: 0000000036a12744 R15: 0000000000000000
[ 1631.850782] FS:  0000000000000000(0000) GS:ffff880002e20000(0000) knlGS:00000
[ 1631.850784] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1631.850786] CR2: 000000000221a000 CR3: 0000000116c78000 CR4: 00000000000006e0
[ 1631.850788] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1631.850790] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1631.850792] Process swapper (pid: 0, threadinfo ffff88011b748000, task ffff8)
[ 1631.850793] Stack:
[ 1631.850795]  ffff88011b749d68 0000000000000001 ffff88011b742620 0000000096fdc
[ 1631.850797] <0> ffff88011b742cb8 0000000096fd5e1c ffff88011b749d98 ffffffff81
[ 1631.850801] <0> ffff88011b749db8 ffffffff820247a0 ffffffff82a76190 ffffffff80
[ 1631.850804] Call Trace:
[ 1631.850807]  [<ffffffff8224aac1>] __const_udelay+0x40/0x42
[ 1631.850811]  [<ffffffff820247a0>] arch_trigger_all_cpu_backtrace+0x78/0x84
[ 1631.850814]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1631.850817]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850820]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850823]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850825]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850828]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850831]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850834]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850837]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1631.850838] Code: e8 e8 be 63 dc ff 66 90 48 63 d8 0f 1f 00 0f ae e8 e8 ae 6 
[ 1631.850865] Call Trace:
[ 1631.850868]  [<ffffffff8224aac1>] __const_udelay+0x40/0x42
[ 1631.850871]  [<ffffffff820247a0>] arch_trigger_all_cpu_backtrace+0x78/0x84
[ 1631.850873]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1631.850876]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850879]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850881]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850884]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850887]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850890]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850892]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850895]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1631.850898] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1631.850899] Call Trace:
[ 1631.850900]  <NMI>  [<ffffffff820118ca>] ? show_regs+0x2b/0x2f
[ 1631.850905]  [<ffffffff824b3b41>] nmi_watchdog_tick+0xc2/0x1a5
[ 1631.850908]  [<ffffffff824b2fa4>] do_nmi+0xd8/0x2b7
[ 1631.850910]  [<ffffffff824b29d0>] nmi+0x20/0x30
[ 1631.850913]  [<ffffffff8224ab40>] ? delay_tsc+0x52/0xa2
[ 1631.850914]  <<EOE>>  [<ffffffff8224aac1>] __const_udelay+0x40/0x42
[ 1631.850919]  [<ffffffff820247a0>] arch_trigger_all_cpu_backtrace+0x78/0x84
[ 1631.850922]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1631.850924]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1631.850927]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1631.850930]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1631.850932]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1631.850935]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1631.850938]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1631.850941]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1631.850943]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1633.056411] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1633.062565] Call Trace:
[ 1633.065001]  [<ffffffff8224f7bd>] do_raw_spin_lock+0x181/0x1b1
[ 1633.070810]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1633.076966]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1633.082604]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1633.088068]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1633.093360]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1633.100121]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1633.105930]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1633.110960]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1633.115991]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1633.121108]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1633.126573]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1633.132989]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1633.138970] sending NMI to all CPUs:
[ 1633.142532] NMI backtrace for cpu 0
[ 1633.146006] CPU 0 
[ 1633.147834] Modules linked in: tm6000_alsa(C) tm6000(C) fuse tuner_xc2028 tu]
[ 1633.231779] 
[ 1633.233263] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4 0AE4h/HP n
[ 1633.241667] RIP: 0010:[<ffffffff8224aaee>]  [<ffffffff8224aaee>] delay_tsc+02
[ 1633.249306] RSP: 0018:ffffffff82a01cd0  EFLAGS: 00000807
[ 1633.254595] RAX: 00000000d195a130 RBX: 0000000000000000 RCX: ffff880002e00000
[ 1633.261701] RDX: 000000000003dd6d RSI: 0000000000000001 RDI: 000000000003dd6e
[ 1633.268807] RBP: ffffffff82a01cd8 R08: 0000000000000000 R09: ffffffff82ccbad0
[ 1633.275912] R10: 0000000000000086 R11: ffffffff82a70ab8 R12: 0000000000001000
[ 1633.283019] R13: 0000000000000004 R14: 0000000000000001 R15: 0000000000000001
[ 1633.290125] FS:  0000000000000000(0000) GS:ffff880002e00000(0000) knlGS:00000
[ 1633.298184] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1633.303907] CR2: 0000000000000000 CR3: 0000000118db8000 CR4: 00000000000006f0
[ 1633.311012] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1633.318119] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1633.325226] Process swapper (pid: 0, threadinfo ffffffff82a00000, task fffff)
[ 1633.333284] Stack:
[ 1633.335286]  ffffffff8224aac1 ffffffff82a01cf8 ffffffff82024037 0000000000002
[ 1633.342513] <0> 0000000000000000 ffffffff82a01d28 ffffffff82024411 0000000002
[ 1633.350195] <0> 000000000000ea40 0000000000000002 ffffffff82ccbad0 ffffffff88
[ 1633.358061] Call Trace:
[ 1633.360496]  [<ffffffff8224aac1>] ? __const_udelay+0x40/0x42
[ 1633.366134]  [<ffffffff82024037>] native_safe_apic_wait_icr_idle+0x36/0x4b
[ 1633.372983]  [<ffffffff82024411>] __default_send_IPI_dest_field+0x45/0x84
[ 1633.379746]  [<ffffffff82024658>] default_send_IPI_mask_sequence_phys+0x51/0d
[ 1633.387025]  [<ffffffff82027e04>] physflat_send_IPI_all+0x17/0x19
[ 1633.393093]  [<ffffffff8202477e>] arch_trigger_all_cpu_backtrace+0x56/0x84
[ 1633.399942]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1633.405752]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1633.411908]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1633.417546]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1633.423008]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1633.428299]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1633.435060]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1633.440870]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1633.445901]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1633.450931]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1633.456048]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1633.461512]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1633.467927]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1633.473906] Code: 55 48 89 e5 0f 1f 44 00 00 48 69 ff c7 10 00 00 e8 a9 ff f 
[ 1633.493477] Call Trace:
[ 1633.495911]  [<ffffffff8224aac1>] ? __const_udelay+0x40/0x42
[ 1633.501547]  [<ffffffff82024037>] native_safe_apic_wait_icr_idle+0x36/0x4b
[ 1633.508394]  [<ffffffff82024411>] __default_send_IPI_dest_field+0x45/0x84
[ 1633.515156]  [<ffffffff82024658>] default_send_IPI_mask_sequence_phys+0x51/0d
[ 1633.522435]  [<ffffffff82027e04>] physflat_send_IPI_all+0x17/0x19
[ 1633.528506]  [<ffffffff8202477e>] arch_trigger_all_cpu_backtrace+0x56/0x84
[ 1633.535354]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1633.541163]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1633.547318]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1633.552954]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1633.558417]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1633.563708]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1633.570470]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1633.576279]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1633.581310]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1633.586340]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1633.591456]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1633.596921]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1633.603337]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1633.609318] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1633.615472] Call Trace:
[ 1633.617906]  <NMI>  [<ffffffff820118ca>] ? show_regs+0x2b/0x2f
[ 1633.623730]  [<ffffffff824b3b41>] nmi_watchdog_tick+0xc2/0x1a5
[ 1633.629540]  [<ffffffff824b2fa4>] do_nmi+0xd8/0x2b7
[ 1633.634398]  [<ffffffff824b29d0>] nmi+0x20/0x30
[ 1633.638910]  [<ffffffff8224aaee>] ? delay_tsc+0x0/0xa2
[ 1633.644026]  <<EOE>>  [<ffffffff8224aac1>] ? __const_udelay+0x40/0x42
[ 1633.650454]  [<ffffffff82024037>] native_safe_apic_wait_icr_idle+0x36/0x4b
[ 1633.657302]  [<ffffffff82024411>] __default_send_IPI_dest_field+0x45/0x84
[ 1633.664062]  [<ffffffff82024658>] default_send_IPI_mask_sequence_phys+0x51/0d
[ 1633.671342]  [<ffffffff82027e04>] physflat_send_IPI_all+0x17/0x19
[ 1633.677410]  [<ffffffff8202477e>] arch_trigger_all_cpu_backtrace+0x56/0x84
[ 1633.684257]  [<ffffffff8224f7c2>] do_raw_spin_lock+0x186/0x1b1
[ 1633.690066]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1633.696221]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1633.701856]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1633.707319]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1633.712610]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1633.719371]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1633.725180]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1633.730212]  [<ffffffff82498cfb>] rest_init+0xcf/0xd6
[ 1633.735243]  [<ffffffff82498c2c>] ? rest_init+0x0/0xd6
[ 1633.740359]  [<ffffffff82cece16>] start_kernel+0x429/0x434
[ 1633.745822]  [<ffffffff82cec2c8>] x86_64_start_reservations+0xb3/0xb7
[ 1633.752237]  [<ffffffff82cec3c4>] x86_64_start_kernel+0xf8/0x107
[ 1633.758318] NMI backtrace for cpu 1
[ 1633.761791] CPU 1 
[ 1633.763619] Modules linked in: tm6000_alsa(C) tm6000(C) fuse tuner_xc2028 tu]
[ 1633.847596] 
[ 1633.849078] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4 0AE4h/HP n
[ 1633.857482] RIP: 0010:[<ffffffff8224ab26>]  [<ffffffff8224ab26>] delay_tsc+02
[ 1633.865204] RSP: 0018:ffff88011b749d78  EFLAGS: 00000006
[ 1633.870494] RAX: 000003d256dcceb4 RBX: 0000000056dcceb4 RCX: 0000000056dcceb4
[ 1633.877601] RDX: 00000000000003d2 RSI: 0000000000000010 RDI: 0000000000000001
[ 1633.884708] RBP: ffff88011b749da8 R08: 0000000000000000 R09: 0000000000000040
[ 1633.891814] R10: 0000000000000000 R11: ffffffff82a70ab8 R12: 0000000000000001
[ 1633.898919] R13: 0000000000000001 R14: ffff88011b742cb8 R15: 0000000003336eed
[ 1633.906025] FS:  0000000000000000(0000) GS:ffff880002e20000(0000) knlGS:00000
[ 1633.914083] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1633.919805] CR2: 000000000221a000 CR3: 0000000116c78000 CR4: 00000000000006e0
[ 1633.926911] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1633.934017] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1633.941122] Process swapper (pid: 0, threadinfo ffff88011b748000, task ffff8)
[ 1633.949179] Stack:
[ 1633.951180]  ffff88011b742cb8 ffffffff82a76190 ffff88011b742620 0000000096fdc
[ 1633.958409] <0> ffff88011b742cb8 0000000003336eed ffff88011b749db8 ffffffff8f
[ 1633.966090] <0> ffff88011b749e08 ffffffff8224f783 0000000000000002 0000000000
[ 1633.973954] Call Trace:
[ 1633.976390]  [<ffffffff8224aa7f>] __delay+0xf/0x11
[ 1633.981160]  [<ffffffff8224f783>] do_raw_spin_lock+0x147/0x1b1
[ 1633.986970]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1633.993127]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1633.998763]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1634.004225]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1634.009516]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1634.016277]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1634.022086]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1634.027118]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1634.032840] Code: 48 83 ec 08 0f 1f 44 00 00 49 89 fd 65 44 8b 24 25 38 ea 0 
[ 1634.052328] Call Trace:
[ 1634.054764]  [<ffffffff8224aa7f>] __delay+0xf/0x11
[ 1634.059536]  [<ffffffff8224f783>] do_raw_spin_lock+0x147/0x1b1
[ 1634.065345]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1634.071501]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1634.077136]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1634.082600]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1634.087891]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1634.094651]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1634.100461]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1634.105490]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
[ 1634.111213] Pid: 0, comm: swapper Tainted: G  R   D  C  2.6.35+ #4
[ 1634.117366] Call Trace:
[ 1634.119801]  <NMI>  [<ffffffff820118ca>] ? show_regs+0x2b/0x2f
[ 1634.125623]  [<ffffffff824b3b41>] nmi_watchdog_tick+0xc2/0x1a5
[ 1634.131432]  [<ffffffff824b2fa4>] do_nmi+0xd8/0x2b7
[ 1634.136289]  [<ffffffff824b29d0>] nmi+0x20/0x30
[ 1634.140802]  [<ffffffff8224ab26>] ? delay_tsc+0x38/0xa2
[ 1634.146006]  <<EOE>>  [<ffffffff8224aa7f>] __delay+0xf/0x11
[ 1634.151569]  [<ffffffff8224f783>] do_raw_spin_lock+0x147/0x1b1
[ 1634.157380]  [<ffffffff824b1a8d>] _raw_spin_lock_irqsave+0x4c/0x56
[ 1634.163535]  [<ffffffff820705a4>] ? pm_qos_request+0x1f/0x6b
[ 1634.169172]  [<ffffffff820705a4>] pm_qos_request+0x1f/0x6b
[ 1634.174636]  [<ffffffff823c03a2>] menu_select+0x33/0x2dc
[ 1634.179927]  [<ffffffff824b5a07>] ? __atomic_notifier_call_chain+0x0/0x8b
[ 1634.186690]  [<ffffffff823bf553>] cpuidle_idle_call+0x5a/0x143
[ 1634.192499]  [<ffffffff82008cd4>] cpu_idle+0xc7/0x122
[ 1634.197530]  [<ffffffff824a94f4>] start_secondary+0x2ff/0x34a
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Mauro Carvalho Chehab Sept. 23, 2010, 5 a.m. UTC | #2
Em 23-09-2010 13:45, Dmitri Belimov escreveu:
> Hi
> 
>> Em 20-09-2010 17:07, Dmitri Belimov escreveu:
>>> Hi 
>>>
>>> I rework my last patch for audio and now audio works well. This
>>> patch can be submited to GIT tree Quality of audio now is good for
>>> SECAM-DK. For other standard I set some value from datasheet need
>>> some tests.
>>>
>>> 1. Fix pcm buffer overflow
>>> 2. Rework pcm buffer fill method
>>> 3. Swap bytes in audio stream
>>> 4. Change some registers value for TM6010
>>> 5. Change pcm buffer size
>>> --- a/drivers/staging/tm6000/tm6000-stds.c
>>> +++ b/drivers/staging/tm6000/tm6000-stds.c
>>> @@ -96,6 +96,7 @@ static struct tm6000_std_tv_settings tv_stds[] = {
>>>  
>>>  			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
>>>  			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
>>> +			{TM6010_REQ08_R05_A_STANDARD_MOD,
>>> 0x21}, /* FIXME */
>>
>> This didn't seem to work for PAL-M. Probably, the right value for it
>> is 0x22, to follow NTSC/M, since both uses the same audio standard.
>>
>> On some tests, I was able to receive some audio there, at the proper
>> rate, with a tm6010-based device. It died when I tried to change the
>> channel, so I didn't rear yet the real audio, but I suspect it will
>> work on my next tests.
>>
>> Yet, is being hard to test, as the driver has a some spinlock logic
>> broken. I'm enclosing the logs.
> 
> Yes. I have some as crash from mplayer and arecord.
> 
>> I was able to test only when using a monitor on the same machine. All
>> trials of using vnc and X11 export ended by not receiving any audio
>> and hanging the machine.
>>
>> I suspect that we need to fix the spinlock issue, in order to better
>> test it.
> 
> Who can fix it?

Well, any of us ;)

I did a BKL lock fix series of patches, and hverkuil is improving them.
They'll make easier to avoid problems inside tm6000. We just need to make
sure that we'll hold/release the proper locks at tm6000-alsa, after applying
it at the mainstream.

Cheers,
Mauro 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Dmitri Belimov Sept. 23, 2010, 4:45 p.m. UTC | #3
Hi

> Em 20-09-2010 17:07, Dmitri Belimov escreveu:
> > Hi 
> > 
> > I rework my last patch for audio and now audio works well. This
> > patch can be submited to GIT tree Quality of audio now is good for
> > SECAM-DK. For other standard I set some value from datasheet need
> > some tests.
> > 
> > 1. Fix pcm buffer overflow
> > 2. Rework pcm buffer fill method
> > 3. Swap bytes in audio stream
> > 4. Change some registers value for TM6010
> > 5. Change pcm buffer size
> > --- a/drivers/staging/tm6000/tm6000-stds.c
> > +++ b/drivers/staging/tm6000/tm6000-stds.c
> > @@ -96,6 +96,7 @@ static struct tm6000_std_tv_settings tv_stds[] = {
> >  
> >  			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
> >  			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
> > +			{TM6010_REQ08_R05_A_STANDARD_MOD,
> > 0x21}, /* FIXME */
> 
> This didn't seem to work for PAL-M. Probably, the right value for it
> is 0x22, to follow NTSC/M, since both uses the same audio standard.
> 
> On some tests, I was able to receive some audio there, at the proper
> rate, with a tm6010-based device. It died when I tried to change the
> channel, so I didn't rear yet the real audio, but I suspect it will
> work on my next tests.
> 
> Yet, is being hard to test, as the driver has a some spinlock logic
> broken. I'm enclosing the logs.

Yes. I have some as crash from mplayer and arecord.

> I was able to test only when using a monitor on the same machine. All
> trials of using vnc and X11 export ended by not receiving any audio
> and hanging the machine.
> 
> I suspect that we need to fix the spinlock issue, in order to better
> test it.

Who can fix it?

> Cheers,
> Mauro.
> 
> [  564.483502] [drm] nouveau 0000:0f:00.0: Allocating FIFO number 1

<snip>

My dumps:
arecord

[  249.943299] BUG: scheduling while atomic: arecord/3112/0x00000004
[  249.943302] Modules linked in: tm6000_alsa(C) xc5000 tuner tm6000(C) ir_lirc_codec lirc_dev v4l2_common videodev ir_sony_decoder v4l1_compat videobuf_vmalloc ir_jvc_decoder videobuf_core ir_rc6_decoder ir_rc5_decoder ir_nec_decoder ir_common ir_core ppdev lp ipv6 dm_snapshot dm_mirror dm_region_hash dm_log dm_mod sha1_generic arc4 ecb ppp_mppe ppp_generic slhc loop snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd parport_pc processor parport soundcore button psmouse snd_page_alloc intel_agp tpm_tis tpm i2c_i801 agpgart tpm_bios i2c_core rng_core serio_raw pcspkr evdev ext3 jbd mbcache sg sr_mod cdrom sd_mod ata_generic ata_piix libata ehci_hcd uhci_hcd scsi_mod ide_pci_generic r8169 mii usbcore ide_core nls_base thermal fan thermal_sys [last unloaded: scsi_wait_scan]
[  249.943373] Pid: 3112, comm: arecord Tainted: G         C  2.6.35-tm6000-01+ #1
[  249.943375] Call Trace:
[  249.943383]  [<c10289a8>] __schedule_bug+0x4d/0x52
[  249.943388]  [<c125ccac>] schedule+0x85/0x6df
[  249.943392]  [<c125ee10>] ? _raw_spin_lock_irqsave+0x19/0x33
[  249.943396]  [<c103df81>] ? lock_timer_base+0x24/0x43
[  249.943399]  [<c125d6cb>] schedule_timeout+0x1e4/0x204
[  249.943402]  [<c103e126>] ? process_timeout+0x0/0xf
[  249.943405]  [<c125ca7f>] wait_for_common+0x9d/0xf3
[  249.943408]  [<c102f9ed>] ? default_wake_function+0x0/0x12
[  249.943412]  [<c125cb5b>] wait_for_completion_timeout+0x12/0x14
[  249.943424]  [<f8091b0b>] usb_start_wait_urb+0x66/0xed [usbcore]
[  249.943433]  [<f8091dc5>] usb_control_msg+0x115/0x12e [usbcore]
[  249.943437]  [<f81872ff>] tm6000_read_write_usb+0x1be/0x267 [tm6000]
[  249.943440]  [<c1027bcd>] ? get_parent_ip+0xb/0x31
[  249.943444]  [<f8187472>] tm6000_get_reg+0x2a/0x3a [tm6000]
[  249.943447]  [<f81da343>] snd_tm6000_card_trigger+0x56/0xb2 [tm6000_alsa]
[  249.943453]  [<f869b8a1>] snd_pcm_do_start+0x21/0x28 [snd_pcm]
[  249.943458]  [<f869b7fa>] snd_pcm_action_single+0x2a/0x50 [snd_pcm]
[  249.943463]  [<f869cce4>] snd_pcm_action+0x6d/0x79 [snd_pcm]
[  249.943467]  [<f869cdd6>] snd_pcm_start+0x19/0x1b [snd_pcm]
[  249.943472]  [<f86a2895>] snd_pcm_lib_read1+0x7d/0x28b [snd_pcm]
[  249.943477]  [<f86a2b4f>] snd_pcm_lib_read+0x47/0x55 [snd_pcm]
[  249.943482]  [<f86a1105>] ? snd_pcm_lib_read_transfer+0x0/0x83 [snd_pcm]
[  249.943487]  [<f869f907>] snd_pcm_capture_ioctl1+0xa9/0x355 [snd_pcm]
[  249.943492]  [<f869fbde>] snd_pcm_capture_ioctl+0x2b/0x38 [snd_pcm]
[  249.943497]  [<f869fbb3>] ? snd_pcm_capture_ioctl+0x0/0x38 [snd_pcm]
[  249.943501]  [<c10cab95>] vfs_ioctl+0x27/0x8c
[  249.943504]  [<c10cb0dc>] do_vfs_ioctl+0x439/0x45e
[  249.943508]  [<c10bf6e4>] ? vfs_write+0x104/0x142
[  249.943511]  [<c10cb146>] sys_ioctl+0x45/0x5f
[  249.943515]  [<c100290c>] sysenter_do_call+0x12/0x22

mplayer

[15186.564022] BUG: scheduling while atomic: mplayer/3899/0x00000004
[15186.564026] Modules linked in: tm6000_alsa(C) xc5000 tuner tm6000(C) ir_lirc_codec lirc_dev v4l2_common videodev ir_sony_decoder v4l1_compat videobuf_vmalloc videobuf_core ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder ir_common ir_core nls_iso8859_1 nls_cp437 vfat fat usb_storage ppdev lp ipv6 dm_snapshot dm_mirror dm_region_hash dm_log dm_mod sha1_generic arc4 ecb ppp_mppe ppp_generic slhc loop snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd parport_pc parport psmouse soundcore processor button intel_agp tpm_tis serio_raw snd_page_alloc tpm i2c_i801 agpgart tpm_bios i2c_core rng_core pcspkr evdev ext3 jbd mbcache sg sd_mod sr_mod cdrom ata_generic ata_piix libata scsi_mod uhci_hcd ehci_hcd r8169 mii ide_pci_generic ide_core usbcore nls_base thermal fan thermal_sys [last unloaded: scsi_wait_scan]
[15186.564100] Pid: 3899, comm: mplayer Tainted: G         C  2.6.35-tm6000-01+ #1
[15186.564101] Call Trace:
[15186.564109]  [<c10289a8>] __schedule_bug+0x4d/0x52
[15186.564113]  [<c125ccac>] schedule+0x85/0x6df
[15186.564117]  [<c125ee10>] ? _raw_spin_lock_irqsave+0x19/0x33
[15186.564121]  [<c103df81>] ? lock_timer_base+0x24/0x43
[15186.564124]  [<c125d6cb>] schedule_timeout+0x1e4/0x204
[15186.564127]  [<c103e126>] ? process_timeout+0x0/0xf
[15186.564130]  [<c125ca7f>] wait_for_common+0x9d/0xf3
[15186.564133]  [<c102f9ed>] ? default_wake_function+0x0/0x12
[15186.564136]  [<c125cb5b>] wait_for_completion_timeout+0x12/0x14
[15186.564149]  [<f8091b0b>] usb_start_wait_urb+0x66/0xed [usbcore]
[15186.564158]  [<f8091dc5>] usb_control_msg+0x115/0x12e [usbcore]
[15186.564163]  [<f822d2ff>] tm6000_read_write_usb+0x1be/0x267 [tm6000]
[15186.564166]  [<c102cda7>] ? enqueue_task_fair+0x21/0x55
[15186.564170]  [<c10200cc>] ? free_memtype+0x61/0x148
[15186.564174]  [<f822d472>] tm6000_get_reg+0x2a/0x3a [tm6000]
[15186.564177]  [<f8267343>] snd_tm6000_card_trigger+0x56/0xb2 [tm6000_alsa]
[15186.564184]  [<f869d8a1>] snd_pcm_do_start+0x21/0x28 [snd_pcm]
[15186.564189]  [<f869d7fa>] snd_pcm_action_single+0x2a/0x50 [snd_pcm]
[15186.564193]  [<f869e5d0>] snd_pcm_action_lock_irq+0x79/0x98 [snd_pcm]
[15186.564199]  [<f86a0ddd>] snd_pcm_common_ioctl1+0x63a/0x10bb [snd_pcm]
[15186.564203]  [<c1148cf7>] ? number+0x153/0x231
[15186.564207]  [<c10a70ec>] ? __mod_zone_page_state+0x1d/0x58
[15186.564210]  [<c1148b60>] ? put_dec+0x25/0x69
[15186.564213]  [<c10cec5d>] ? __d_lookup+0xf7/0x113
[15186.564216]  [<c1148cf7>] ? number+0x153/0x231
[15186.564219]  [<c10cffff>] ? inode_init_once+0x39/0xfc
[15186.564222]  [<c102aadd>] ? cpuacct_charge+0x5e/0x76
[15186.564226]  [<c1096687>] ? perf_event_task_sched_out+0x1d/0x302
[15186.564233]  [<f86a1b5e>] snd_pcm_capture_ioctl1+0x300/0x355 [snd_pcm]
[15186.564238]  [<f86a1bde>] snd_pcm_capture_ioctl+0x2b/0x38 [snd_pcm]
[15186.564243]  [<f86a1bb3>] ? snd_pcm_capture_ioctl+0x0/0x38 [snd_pcm]
[15186.564246]  [<c10cab95>] vfs_ioctl+0x27/0x8c
[15186.564249]  [<c10cb0dc>] do_vfs_ioctl+0x439/0x45e
[15186.564253]  [<c1027bcd>] ? get_parent_ip+0xb/0x31
[15186.564255]  [<c1028aa2>] ? sub_preempt_count+0x88/0x95
[15186.564259]  [<c10bfe7b>] ? fget_light+0x8f/0xb6
[15186.564262]  [<c10cb146>] sys_ioctl+0x45/0x5f
[15186.564265]  [<c100290c>] sysenter_do_call+0x12/0x22

With my best regards, Dmitry.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Dmitri Belimov Sept. 27, 2010, 5:49 p.m. UTC | #4
Hi

> Em 23-09-2010 13:45, Dmitri Belimov escreveu:
> > Hi
> > 
> >> Em 20-09-2010 17:07, Dmitri Belimov escreveu:
> >>> Hi 
> >>>
> >>> I rework my last patch for audio and now audio works well. This
> >>> patch can be submited to GIT tree Quality of audio now is good for
> >>> SECAM-DK. For other standard I set some value from datasheet need
> >>> some tests.
> >>>
> >>> 1. Fix pcm buffer overflow
> >>> 2. Rework pcm buffer fill method
> >>> 3. Swap bytes in audio stream
> >>> 4. Change some registers value for TM6010
> >>> 5. Change pcm buffer size
> >>> --- a/drivers/staging/tm6000/tm6000-stds.c
> >>> +++ b/drivers/staging/tm6000/tm6000-stds.c
> >>> @@ -96,6 +96,7 @@ static struct tm6000_std_tv_settings tv_stds[]
> >>> = { 
> >>>  			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL,
> >>> 0xdc}, {TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
> >>> +			{TM6010_REQ08_R05_A_STANDARD_MOD,
> >>> 0x21}, /* FIXME */
> >>
> >> This didn't seem to work for PAL-M. Probably, the right value for
> >> it is 0x22, to follow NTSC/M, since both uses the same audio
> >> standard.
> >>
> >> On some tests, I was able to receive some audio there, at the
> >> proper rate, with a tm6010-based device. It died when I tried to
> >> change the channel, so I didn't rear yet the real audio, but I
> >> suspect it will work on my next tests.
> >>
> >> Yet, is being hard to test, as the driver has a some spinlock logic
> >> broken. I'm enclosing the logs.
> > 
> > Yes. I have some as crash from mplayer and arecord.
> > 
> >> I was able to test only when using a monitor on the same machine.
> >> All trials of using vnc and X11 export ended by not receiving any
> >> audio and hanging the machine.
> >>
> >> I suspect that we need to fix the spinlock issue, in order to
> >> better test it.
> > 
> > Who can fix it?
> 
> Well, any of us ;)
> 
> I did a BKL lock fix series of patches, and hverkuil is improving
> them. They'll make easier to avoid problems inside tm6000. We just
> need to make sure that we'll hold/release the proper locks at
> tm6000-alsa, after applying it at the mainstream.

I found that mplayer crashed when call usb_control_msg and kfree functions.

With my best regards, Dmitry.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c
index 087137d..a99101f 100644
--- a/drivers/staging/tm6000/tm6000-alsa.c
+++ b/drivers/staging/tm6000/tm6000-alsa.c
@@ -160,15 +160,15 @@  static struct snd_pcm_hardware snd_tm6000_digital_hw = {
 		SNDRV_PCM_INFO_MMAP_VALID,
 	.formats = SNDRV_PCM_FMTBIT_S16_LE,
 
-	.rates =		SNDRV_PCM_RATE_48000,
+	.rates =		SNDRV_PCM_RATE_CONTINUOUS,
 	.rate_min =		48000,
 	.rate_max =		48000,
 	.channels_min = 2,
 	.channels_max = 2,
-	.period_bytes_min = 62720,
-	.period_bytes_max = 62720,
+	.period_bytes_min = 64,
+	.period_bytes_max = 12544,
 	.periods_min = 1,
-	.periods_max = 1024,
+	.periods_max = 98,
 	.buffer_bytes_max = 62720 * 8,
 };
 
@@ -211,38 +211,64 @@  static int tm6000_fillbuf(struct tm6000_core *core, char *buf, int size)
 	struct snd_pcm_runtime *runtime;
 	int period_elapsed = 0;
 	unsigned int stride, buf_pos;
+	int length;
 
-	if (!size || !substream)
+	if (!size || !substream) {
+		dprintk(1, "substream was NULL\n");
 		return -EINVAL;
+	}
 
 	runtime = substream->runtime;
-	if (!runtime || !runtime->dma_area)
+	if (!runtime || !runtime->dma_area) {
+		dprintk(1, "runtime was NULL\n");
 		return -EINVAL;
+	}
 
 	buf_pos = chip->buf_pos;
 	stride = runtime->frame_bits >> 3;
 
+	if (stride == 0) {
+		dprintk(1, "stride is zero\n");
+		return -EINVAL;
+	}
+
+	length = size / stride;
+	if (length == 0) {
+		dprintk(1, "%s: length was zero\n", __func__);
+		return -EINVAL;
+	}
+
 	dprintk(1, "Copying %d bytes at %p[%d] - buf size=%d x %d\n", size,
 		runtime->dma_area, buf_pos,
 		(unsigned int)runtime->buffer_size, stride);
 
-	if (buf_pos + size >= runtime->buffer_size * stride) {
-		unsigned int cnt = runtime->buffer_size * stride - buf_pos;
-		memcpy(runtime->dma_area + buf_pos, buf, cnt);
-		memcpy(runtime->dma_area, buf + cnt, size - cnt);
+	if (buf_pos + length >= runtime->buffer_size) {
+		unsigned int cnt = runtime->buffer_size - buf_pos;
+		memcpy(runtime->dma_area + buf_pos * stride, buf, cnt * stride);
+		memcpy(runtime->dma_area, buf + cnt * stride,
+			length * stride - cnt * stride);
 	} else
-		memcpy(runtime->dma_area + buf_pos, buf, size);
+		memcpy(runtime->dma_area + buf_pos * stride, buf,
+			length * stride);
 
-	chip->buf_pos += size;
-	if (chip->buf_pos >= runtime->buffer_size * stride)
-		chip->buf_pos -= runtime->buffer_size * stride;
+#ifndef NO_PCM_LOCK
+       snd_pcm_stream_lock(substream);
+#endif
 
-	chip->period_pos += size;
+	chip->buf_pos += length;
+	if (chip->buf_pos >= runtime->buffer_size)
+		chip->buf_pos -= runtime->buffer_size;
+
+	chip->period_pos += length;
 	if (chip->period_pos >= runtime->period_size) {
 		chip->period_pos -= runtime->period_size;
 		period_elapsed = 1;
 	}
 
+#ifndef NO_PCM_LOCK
+       snd_pcm_stream_unlock(substream);
+#endif
+
 	if (period_elapsed)
 		snd_pcm_period_elapsed(substream);
 
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c
index cded411..57cb69e 100644
--- a/drivers/staging/tm6000/tm6000-core.c
+++ b/drivers/staging/tm6000/tm6000-core.c
@@ -256,7 +256,6 @@  int tm6000_init_analog_mode(struct tm6000_core *dev)
 		tm6000_set_reg(dev, TM6010_REQ08_R02_A_FIX_GAIN_CTRL, 0x04);
 		tm6000_set_reg(dev, TM6010_REQ08_R03_A_AUTO_GAIN_CTRL, 0x00);
 		tm6000_set_reg(dev, TM6010_REQ08_R04_A_SIF_AMP_CTRL, 0xa0);
-		tm6000_set_reg(dev, TM6010_REQ08_R05_A_STANDARD_MOD, 0x05);
 		tm6000_set_reg(dev, TM6010_REQ08_R06_A_SOUND_MOD, 0x06);
 		tm6000_set_reg(dev, TM6010_REQ08_R07_A_LEFT_VOL, 0x00);
 		tm6000_set_reg(dev, TM6010_REQ08_R08_A_RIGHT_VOL, 0x00);
diff --git a/drivers/staging/tm6000/tm6000-stds.c b/drivers/staging/tm6000/tm6000-stds.c
index 6bf4a73..f6aa753 100644
--- a/drivers/staging/tm6000/tm6000-stds.c
+++ b/drivers/staging/tm6000/tm6000-stds.c
@@ -96,6 +96,7 @@  static struct tm6000_std_tv_settings tv_stds[] = {
 
 			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
 			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
+			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x21}, /* FIXME */
 			{TM6010_REQ07_R3F_RESET, 0x00},
 			{0, 0, 0},
 		},
@@ -154,6 +155,7 @@  static struct tm6000_std_tv_settings tv_stds[] = {
 
 			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
 			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
+			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x21}, /* FIXME */
 			{TM6010_REQ07_R3F_RESET, 0x00},
 			{0, 0, 0},
 		},
@@ -212,6 +214,7 @@  static struct tm6000_std_tv_settings tv_stds[] = {
 
 			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdc},
 			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
+			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x76}, /* FIXME */
 			{TM6010_REQ07_R3F_RESET, 0x00},
 			{0, 0, 0},
 		},
@@ -269,6 +272,7 @@  static struct tm6000_std_tv_settings tv_stds[] = {
 			{TM6010_REQ07_R83_CHROMA_LOCK_CONFIG, 0xFF},
 
 			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
+			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x79},
 			{TM6010_REQ07_R3F_RESET, 0x00},
 			{0, 0, 0},
 		},
@@ -327,6 +331,7 @@  static struct tm6000_std_tv_settings tv_stds[] = {
 
 			{TM6010_REQ07_R04_LUMA_HAGC_CONTROL, 0xdd},
 			{TM6010_REQ07_R0D_CHROMA_KILL_LEVEL, 0x07},
+			{TM6010_REQ08_R05_A_STANDARD_MOD, 0x22}, /* FIXME */
 			{TM6010_REQ07_R3F_RESET, 0x00},
 			{0, 0, 0},
 		},
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index ce0a089..da26340 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -304,6 +304,14 @@  static int copy_streams(u8 *data, unsigned long len,
 					memcpy (&voutp[pos], ptr, cpysize);
 				break;
 			case TM6000_URB_MSG_AUDIO:
+				/* Need some code to copy audio buffer */
+				if (dev->fourcc == V4L2_PIX_FMT_YUYV) {
+					/* Swap word bytes */
+					int i;
+
+					for (i = 0; i < cpysize; i += 2)
+						swab16s((u16 *)(ptr + i));
+				}
 				tm6000_call_fillbuf(dev, TM6000_AUDIO, ptr, cpysize);
 				break;
 			case TM6000_URB_MSG_VBI:

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>