Jump to content

kernel panic when playing video with spdif audio output


Go to solution Solved by damien78,

Recommended Posts

Posted

Hi,

 

I have tested this issue :

 

https://github.com/linux-sunxi/linux-sunxi/issues/244

 

apparently it is not resolved.

 

kernel panic log :

 

[18109.785618] ------------[ cut here ]------------
[18109.790613] kernel BUG at arch/arm/mach-sun7i/dma/dma_core.c:32!
[18109.795412] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[18109.797259] Modules linked in: disp_ump mali_drm drm mali ump cpufreq_userspace ap6210 sunxi_ir hidp rfcomm hci_uart bluetooth sg [last unloaded: scsi_wait_scan]
[18109.813725] CPU: 0 Tainted: G W (3.4.112-sun7i #2)
[18109.816542] PC is at __dma_start+0x7c/0x80
[18109.819171] LR is at dma_ctrl+0x90/0x1dc
[18109.828043] pc : [] lr : [] psr: 60010093
[18109.828053] sp : ed643e40 ip : 00000001 fp : 001196a0
[18109.831982] r10: eea2e200 r9 : ed642000 r8 : 80010093
[18109.837210] r7 : 00000000 r6 : c0a9dd48 r5 : c0a9dd54 r4 : c0a9dcfc
[18109.842439] r3 : c0a9dd54 r2 : 00000000 r1 : 00000000 r0 : c0a9dcfc
[18109.848365] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
[18109.852817] Control: 10c5387d Table: 6d73406a DAC: 00000015

[18109.854494] PC: 0xc002ca6c:
[18109.854950] ca6c e12fff1e e1a03000 e92d4070 e5b35058 e1550003 0a000019 e1a04000 e1a00005
[18109.861952] ca8c eb0f6651 e515100c e1a00004 e245600c ebffff9b e5151008 e1a00004 ebffff9c
[18109.868952] caac e5151004 e1a00004 ebffff9d e5941044 e1a00004 ebffffcb e594102c e1a00004
[18109.875950] cacc ebffffa3 e1a00004 ebfffefa e3a03001 e5846054 e3a00000 e5843040 e8bd8070
[18109.882949] caec e7f001f2 e92d41f0 e2807058 e1a05000 e5900058 e1570000 08bd81f0 e30d6cf8
[18109.889949] cb0c e34c60a9 e240400c eb0f662f e5960000 e1a01004 eb02d69c e5950058 e1500007
[18109.896947] cb2c 1afffff7 e8bd81f0 e92d4010 e1a04000 e5901054 e3510000 0a000005 e30d3cf8
[18109.903948] cb4c e34c30a9 e5930000 eb02d68f e3a03000 e5843054 e1a00004 e8bd4010 eaffffe0

[18109.912167] LR: 0xc002d170:
[18109.912623] d170 e1a00006 e1a07002 eb1bd980 e1a08000 e3550008 979ff105 ea00004a c002d1dc
[18109.919623] d190 c002d20c c002d218 c002d228 c002d240 c002d268 c002d290 c002d2a0 c002d1b0
[18109.926623] d1b0 e3570000 0a000050 e5971000 e1a00004 ebfffd5f e1a01008 e1a00006 eb1bd811
[18109.933623] d1d0 e3a05000 e1a00005 e8bd81f0 e5943040 e3530000 1a00003e e1a00004 ebfffe1f
[18109.940623] d1f0 e1a01008 e1a05000 e1a00006 eb1bd805 e3550000 0afffff2 ea00002e e1a00004
[18109.947623] d210 ebfffe55 eaffffea e1a00004 ebfffde4 e5870000 eaffffe6 e3570000 0a000036
[18109.954623] d230 e5971000 e1a00004 ebfffd51 eaffffe0 e3570000 0a00002f e5943040 e3530000
[18109.961623] d250 1a000033 e5973000 e5843030 e5973004 e5843034 eaffffd6 e3570000 0a000024

[18109.969843] SP: 0xed643dc0:
[18109.970298] 3dc0 ed643de0 ec578c40 00000003 ed643e50 ed643f08 ed643e00 00000000 00aab5b8
[18109.977299] 3de0 c002caf0 60010093 c000eb54 00000000 e7100000 c000e8ac c0a9dcfc 00000000
[18109.984297] 3e00 00000000 c0a9dd54 c0a9dcfc c0a9dd54 c0a9dd48 00000000 80010093 ed642000
[18109.991296] 3e20 eea2e200 001196a0 00000001 ed643e40 c002d1f0 c002caec 60010093 ffffffff
[18109.998295] 3e40 c0a9dcfc 00000000 c0a9dd48 c002d1f0 00000010 ef006d00 eea07680 ee8c5600
[18110.005293] 3e60 c000eda4 c05e6828 eea2e200 00000004 eea07680 c05e1574 eea2e2d0 c0a7c3fc
[18110.012292] 3e80 eea2e200 00000000 c000eda4 c05d0224 eea2e2d0 00000000 eea2e200 eebc3240
[18110.019290] 3ea0 c000eda4 c05d1978 00000007 c00ee5e0 00000000 00000000 00b2b54e 00000ff9

[18110.027509] R0: 0xc0a9dc7c:
[18110.027964] dc7c 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.034961] dc9c 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.041957] dcbc 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.048953] dcdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ef0b8000
[18110.055950] dcfc 00000001 00000000 49445053 756f2046 00000074 00000000 00000000 00000000
[18110.062947] dd1c 00000000 00000000 f1c02100 02a28296 00000000 00000000 c05e667c c0a7dd80
[18110.069945] dd3c 00000000 00000002 00000000 00000001 00000000 00000000 c0a9dd54 c0a9dd54
[18110.076943] dd5c 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000

[18110.085159] R3: 0xc0a9dcd4:
[18110.085615] dcd4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.092611] dcf4 00000000 ef0b8000 00000001 00000000 49445053 756f2046 00000074 00000000
[18110.099609] dd14 00000000 00000000 00000000 00000000 f1c02100 02a28296 00000000 00000000
[18110.106607] dd34 c05e667c c0a7dd80 00000000 00000002 00000000 00000001 00000000 00000000
[18110.113604] dd54 c0a9dd54 c0a9dd54 00000000 00000001 00000000 00000000 00000000 00000000
[18110.120601] dd74 00000000 00000000 00000000 00000000 f1c02120 00000000 00000000 00000000
[18110.127598] dd94 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.134594] ddb4 00000000 00000000 00000000 00000002 00000000 00000000 00000000 00000000

[18110.142809] R4: 0xc0a9dc7c:
[18110.143265] dc7c 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.150262] dc9c 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.157258] dcbc 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.164254] dcdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ef0b8000
[18110.171251] dcfc 00000001 00000000 49445053 756f2046 00000074 00000000 00000000 00000000
[18110.178247] dd1c 00000000 00000000 f1c02100 02a28296 00000000 00000000 c05e667c c0a7dd80
[18110.185245] dd3c 00000000 00000002 00000000 00000001 00000000 00000000 c0a9dd54 c0a9dd54
[18110.192241] dd5c 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000

[18110.200456] R5: 0xc0a9dcd4:
[18110.200912] dcd4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.207908] dcf4 00000000 ef0b8000 00000001 00000000 49445053 756f2046 00000074 00000000
[18110.214904] dd14 00000000 00000000 00000000 00000000 f1c02100 02a28296 00000000 00000000
[18110.221902] dd34 c05e667c c0a7dd80 00000000 00000002 00000000 00000001 00000000 00000000
[18110.228900] dd54 c0a9dd54 c0a9dd54 00000000 00000001 00000000 00000000 00000000 00000000
[18110.235897] dd74 00000000 00000000 00000000 00000000 f1c02120 00000000 00000000 00000000
[18110.242894] dd94 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.249890] ddb4 00000000 00000000 00000000 00000002 00000000 00000000 00000000 00000000

[18110.258105] R6: 0xc0a9dcc8:
[18110.258561] dcc8 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.265559] dce8 00000000 00000000 00000000 00000000 ef0b8000 00000001 00000000 49445053
[18110.272556] dd08 756f2046 00000074 00000000 00000000 00000000 00000000 00000000 f1c02100
[18110.279554] dd28 02a28296 00000000 00000000 c05e667c c0a7dd80 00000000 00000002 00000000
[18110.286552] dd48 00000001 00000000 00000000 c0a9dd54 c0a9dd54 00000000 00000001 00000000
[18110.293550] dd68 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f1c02120
[18110.300546] dd88 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.307543] dda8 00000000 00000000 00000000 00000000 00000000 00000000 00000002 00000000

[18110.315759] R9: 0xed641f80:
[18110.316215] 1f80 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.323212] 1fa0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.330208] 1fc0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.337205] 1fe0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.344201] 2000 00000000 00000006 00000000 ea674a80 c0a32608 00000000 00000015 d1017940
[18110.351199] 2020 ea674a80 ef03ef40 00000000 ed642000 c0a16940 c0a2a658 ed643aac ed643a08
[18110.358198] 2040 c07220c8 00000000 00000000 00000000 00000000 00000000 01010000 00000000
[18110.365195] 2060 b3536700 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[18110.373498] R10: 0xeea2e180:
[18110.373954] e180 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.380951] e1a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.387948] e1c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.394944] e1e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[18110.401940] e200 eea2e000 eea2e0a8 ee8c5410 00000000 64627573 63697665 30232065 00000000
[18110.408939] e220 00000000 00000000 00000000 00000000 00000000 0000b71b eea2e238 eea2e238
[18110.415936] e240 c0a34a88 c0a34a88 00000001 00000300 eea2e250 eea2e250 c00704f8 00000000
[18110.422935] e260 00000000 00000000 ef012000 00000000 00000000 ffffffff ffffffff 00000000
[18110.434619] Process mplayer (pid: 20310, stack limit = 0xed6422f0)
[18110.437942] Stack: (0xed643e40 to 0xed644000)
[18110.445086] 3e40: c0a9dcfc 00000000 c0a9dd48 c002d1f0 00000010 ef006d00 eea07680 ee8c5600
[18110.452233] 3e60: c000eda4 c05e6828 eea2e200 00000004 eea07680 c05e1574 eea2e2d0 c0a7c3fc
[18110.459380] 3e80: eea2e200 00000000 c000eda4 c05d0224 eea2e2d0 00000000 eea2e200 eebc3240
[18110.466528] 3ea0: c000eda4 c05d1978 00000007 c00ee5e0 00000000 00000000 00b2b54e 00000ff9
[18110.473674] 3ec0: 00000000 00000000 00000000 00000001 ffffffff 00000000 ee9d6e80 eea2e200
[18110.480821] 3ee0: eebc3240 c000eda4 ed642000 00000000 001196a0 c05d1f98 00000000 00000000
[18110.487969] 3f00: 00000000 ed643f08 00000fff 00000000 ee9d6e80 eebc3240 eebc3240 c000eda4
[18110.495115] 3f20: ed642000 c00fe79c 00000000 00000000 00000001 ed597d88 ed642000 00000006
[18110.502262] 3f40: 00000000 ed9ae730 00000001 bed4c484 00000008 bed4c48c bed4c484 00000008
[18110.509409] 3f60: bed4c48c 0000000b 40044145 00000000 eebc3240 c000eda4 ed642000 00000000
[18110.516556] 3f80: 001196a0 c00fe9b8 00000000 00000001 009fc648 001aaf70 00000001 000373a1
[18110.523703] 3fa0: 00000036 c000ec20 001aaf70 00000001 0000000b 40044145 00000000 00aab450
[18110.530851] 3fc0: 001aaf70 00000001 000373a1 00000036 00118078 00dea590 009b88b0 001196a0
[18110.537998] 3fe0: b6d1b42c bed4c3cc b6cc0019 b5812206 00010030 0000000b 00000000 00000000
[18110.544822] [] (__dma_start+0x7c/0x80) from [] (dma_ctrl+0x90/0x1dc)
[18110.552158] [] (dma_ctrl+0x90/0x1dc) from [] (sunxi_pcm_trigger+0x84/0x88)
[18110.560012] [] (sunxi_pcm_trigger+0x84/0x88) from [] (soc_pcm_trigger+0x64/0xa8)
[18110.568211] [] (soc_pcm_trigger+0x64/0xa8) from [] (snd_pcm_action_single+0x38/0x80)
[18110.577103] [] (snd_pcm_action_single+0x38/0x80) from [] (snd_pcm_common_ioctl1+0x9e0/0xdc8)
[18110.586340] [] (snd_pcm_common_ioctl1+0x9e0/0xdc8) from [] (snd_pcm_playback_ioctl1+0x238/0x42c)
[18110.594801] [] (snd_pcm_playback_ioctl1+0x238/0x42c) from [] (do_vfs_ioctl+0x3ac/0x594)
[18110.601871] [] (do_vfs_ioctl+0x3ac/0x594) from [] (sys_ioctl+0x34/0x60)
[18110.609025] [] (sys_ioctl+0x34/0x60) from [] (ret_fast_syscall+0x0/0x30)
[18110.614094] Code: e5846054 e3a00000 e5843040 e8bd8070 (e7f001f2)
[18110.621392] ---[ end trace a03c715ec727d722 ]---
[18110.626023] note: mplayer[20310] exited with preempt_count 4
[18110.631221] BUG: scheduling while atomic: mplayer/20310/0x40000005
[18110.633143] Modules linked in: disp_ump mali_drm drm mali ump cpufreq_userspace ap6210 sunxi_ir hidp rfcomm hci_uart bluetooth sg [last unloaded: scsi_wait_scan]
[18110.652695] [] (unwind_backtrace+0x0/0x12c) from [] (__schedule+0x6d0/0x7c4)
[18110.660019] [] (__schedule+0x6d0/0x7c4) from [] (__cond_resched+0x14/0x24)
[18110.667459] [] (__cond_resched+0x14/0x24) from [] (_cond_resched+0x3c/0x44)
[18110.675140] [] (_cond_resched+0x3c/0x44) from [] (__get_user_pages+0xb0/0x410)
[18110.683343] [] (__get_user_pages+0xb0/0x410) from [] (get_user_pages_fast+0x60/0x78)
[18110.691279] [] (get_user_pages_fast+0x60/0x78) from [] (get_futex_key+0xb0/0x210)
[18110.698506] [] (get_futex_key+0xb0/0x210) from [] (futex_wake+0x30/0x120)
[18110.705405] [] (futex_wake+0x30/0x120) from [] (do_futex+0x120/0xa30)
[18110.712203] [] (do_futex+0x120/0xa30) from [] (sys_futex+0x78/0x15c)
[18110.718998] [] (sys_futex+0x78/0x15c) from [] (mm_release+0xc8/0xf4)
[18110.725640] [] (mm_release+0xc8/0xf4) from [] (exit_mm+0x18/0x130)
[18110.732179] [] (exit_mm+0x18/0x130) from [] (do_exit+0x124/0x7a4)
[18110.738451] [] (do_exit+0x124/0x7a4) from [] (die+0x298/0x2f8)
[18110.745263] [] (die+0x298/0x2f8) from [] (do_undefinstr+0x140/0x17c)
[18110.752934] [] (do_undefinstr+0x140/0x17c) from [] (__und_svc_finish+0x0/0x34)
[18110.756689] Exception stack(0xed643df8 to 0xed643e40)
[18110.763699] 3de0: c0a9dcfc 00000000
[18110.770672] 3e00: 00000000 c0a9dd54 c0a9dcfc c0a9dd54 c0a9dd48 00000000 80010093 ed642000
[18110.777577] 3e20: eea2e200 001196a0 00000001 ed643e40 c002d1f0 c002caec 60010093 ffffffff
[18110.785058] [] (__und_svc_finish+0x0/0x34) from [] (__dma_start+0x7c/0x80)
[18110.791929] [] (__dma_start+0x7c/0x80) from [] (dma_ctrl+0x90/0x1dc)
[18110.799542] [] (dma_ctrl+0x90/0x1dc) from [] (sunxi_pcm_trigger+0x84/0x88)
[18110.807539] [] (sunxi_pcm_trigger+0x84/0x88) from [] (soc_pcm_trigger+0x64/0xa8)
[18110.815863] [] (soc_pcm_trigger+0x64/0xa8) from [] (snd_pcm_action_single+0x38/0x80)
[18110.824872] [] (snd_pcm_action_single+0x38/0x80) from [] (snd_pcm_common_ioctl1+0x9e0/0xdc8)
[18110.834122] [] (snd_pcm_common_ioctl1+0x9e0/0xdc8) from [] (snd_pcm_playback_ioctl1+0x238/0x42c)
[18110.842595] [] (snd_pcm_playback_ioctl1+0x238/0x42c) from [] (do_vfs_ioctl+0x3ac/0x594)
[18110.849648] [] (do_vfs_ioctl+0x3ac/0x594) from [] (sys_ioctl+0x34/0x60)
[18110.856845] [] (sys_ioctl+0x34/0x60) from [] (ret_fast_syscall+0x0/0x30)
[18113.437397] [DISP] layer allocated at close: 0,102

 

Posted

Hi,

I solved this issue.
You must apply ( manually ) this part of patch in order to be able to pause during playback with sound over spdif.

@@ -247,13 +296,20 @@ static int sunxi_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
    case SNDRV_PCM_TRIGGER_START:
    case SNDRV_PCM_TRIGGER_RESUME:
    case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+         /* enqueue dma buffers */
+        sunxi_pcm_enqueue(substream);

        sunxi_dma_start(prtd->params);
+        ret =0;
        break;

    case SNDRV_PCM_TRIGGER_SUSPEND:
    case SNDRV_PCM_TRIGGER_STOP:
    case SNDRV_PCM_TRIGGER_PAUSE_PUSH:

        sunxi_dma_stop(prtd->params);
+        prtd->dma_loaded = 0;
+        ret = 0;
        break;

    default:
@@ -262,7 +318,7 @@ static int sunxi_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
    }

    spin_unlock(&prtd->lock);
-    return 0;
+    return ret;
}

I copied this from the HDMI driver that works fine.
first line : push data in dma buffer
second line : flush dma
the others lines are non functional.they simply allow to return errors.

  • Solution
Posted (edited)

I have build  and rapidly test on my cubietrucks it's ok.

 

I must debug sound format mismatch on spdif ( basically remove s32le and add iec958)

 

I add iec958 format, but it has not had any effect. I think it lacks a specific configuration file in alsa but it's too complicated.

Edited by damien78
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines