Cubietruck sound problem


Recommended Posts

Armbianmonitor:

Hi,

 

I'm working with mpd on armbian 20.02.0 with i2s device and found some problem: periodically sound is interrupted. I enable verbose logging in mpd and I get message:

May 20 04:36 : alsa_output: Underrun on ALSA device "hw:0,0"
May 20 04:36 : alsa_output: Underrun on ALSA device "hw:0,0"
May 20 04:37 : alsa_output: Underrun on ALSA device "hw:0,0"

This is not permanent and some time maybe work fine, but if it starts, messages go with an interval of 10-11 seconds until I restart mpd.

I rebuilt armbian with enabled ALSA debug options CONFIG_SND_PCM_XRUN_DEBUG, CONFIG_SND_VERBOSE_PROCFS, CONFIG_SND_DEBUG and try again.

This is result with my i2s card and echo 3 > /proc/asound/card0/pcm0p/xrun_debug

May 20 03:30:59 localhost kernel: [ 1099.726101] i2s_clock_board: i2s_clock_board_trigger
May 20 03:30:59 localhost kernel: [ 1099.726136] I2S Command State 0
May 20 03:30:59 localhost kernel: [ 1099.726200] asoc-simple-card sound_i2s: XRUN: pcmC1D0p:0
May 20 03:30:59 localhost kernel: [ 1099.726213] CPU: 0 PID: 1348 Comm: kworker/0:1 Tainted: G         C O      5.4.18-sunxi #20.02.0
May 20 03:30:59 localhost kernel: [ 1099.726216] Hardware name: Allwinner sun7i (A20) Family
May 20 03:30:59 localhost kernel: [ 1099.726239] Workqueue: events_freezable_power_ thermal_zone_device_check
May 20 03:30:59 localhost kernel: [ 1099.726268] [<c010da8d>] (unwind_backtrace) from [<c010a0ad>] (show_stack+0x11/0x14)
May 20 03:30:59 localhost kernel: [ 1099.726282] [<c010a0ad>] (show_stack) from [<c093704f>] (dump_stack+0x6f/0x7c)
May 20 03:30:59 localhost kernel: [ 1099.726344] [<c093704f>] (dump_stack) from [<bf856305>] (__snd_pcm_xrun+0x101/0x108 [snd_pcm])
May 20 03:30:59 localhost kernel: [ 1099.726384] [<bf856305>] (__snd_pcm_xrun [snd_pcm]) from [<bf8563b3>] (snd_pcm_update_state+0xa7/0xac [snd_pcm])
May 20 03:30:59 localhost kernel: [ 1099.726420] [<bf8563b3>] (snd_pcm_update_state [snd_pcm]) from [<bf856549>] (snd_pcm_update_hw_ptr0+0x191/0x5a4 [snd_pcm])
May 20 03:30:59 localhost kernel: [ 1099.726455] [<bf856549>] (snd_pcm_update_hw_ptr0 [snd_pcm]) from [<bf8569a7>] (snd_pcm_period_elapsed+0x4b/0x90 [snd_pcm])
May 20 03:30:59 localhost kernel: [ 1099.726483] [<bf8569a7>] (snd_pcm_period_elapsed [snd_pcm]) from [<bf84928f>] (dmaengine_pcm_dma_complete+0x3b/0x3c [snd_pcm_dmaengine])
May 20 03:30:59 localhost kernel: [ 1099.726500] [<bf84928f>] (dmaengine_pcm_dma_complete [snd_pcm_dmaengine]) from [<c05f9fdf>] (vchan_complete+0x133/0x140)
May 20 03:30:59 localhost kernel: [ 1099.726517] [<c05f9fdf>] (vchan_complete) from [<c0120413>] (tasklet_action_common.constprop.3+0x2f/0x80)
May 20 03:30:59 localhost kernel: [ 1099.726531] [<c0120413>] (tasklet_action_common.constprop.3) from [<c01022f7>] (__do_softirq+0xdf/0x288)
May 20 03:30:59 localhost kernel: [ 1099.726541] [<c01022f7>] (__do_softirq) from [<c0120333>] (irq_exit+0x7b/0x90)
May 20 03:30:59 localhost kernel: [ 1099.726555] [<c0120333>] (irq_exit) from [<c0160233>] (__handle_domain_irq+0x47/0x84)
May 20 03:30:59 localhost kernel: [ 1099.726570] [<c0160233>] (__handle_domain_irq) from [<c05ca5dd>] (gic_handle_irq+0x39/0x6c)
May 20 03:30:59 localhost kernel: [ 1099.726581] [<c05ca5dd>] (gic_handle_irq) from [<c0101ae5>] (__irq_svc+0x65/0x94)
May 20 03:30:59 localhost kernel: [ 1099.726586] Exception stack(0xedae7e30 to 0xedae7e78)
May 20 03:30:59 localhost kernel: [ 1099.726593] 7e20:                                     00000fe0 00000006 fac81000 c010d0f1
May 20 03:30:59 localhost kernel: [ 1099.726603] 7e40: c1054fa8 332c1eac 00005dbf 0000008d 00000045 ecf17b54 c0c51994 1ffffc70
May 20 03:30:59 localhost kernel: [ 1099.726611] 7e60: ee405a78 edae7e80 c010d105 c0935016 200f0033 ffffffff
May 20 03:30:59 localhost kernel: [ 1099.726626] [<c0101ae5>] (__irq_svc) from [<c0935016>] (__timer_delay+0x26/0x34)
May 20 03:30:59 localhost kernel: [ 1099.726644] [<c0935016>] (__timer_delay) from [<bfa2d3c5>] (sun4i_gpadc_read+0x10d/0x15c [sun4i_gpadc_iio])
May 20 03:30:59 localhost kernel: [ 1099.726677] [<bfa2d3c5>] (sun4i_gpadc_read [sun4i_gpadc_iio]) from [<bfa2d4f5>] (sun4i_gpadc_temp_read+0x29/0x70 [sun4i_gpadc_iio])
May 20 03:30:59 localhost kernel: [ 1099.726691] [<bfa2d4f5>] (sun4i_gpadc_temp_read [sun4i_gpadc_iio]) from [<bfa2d561>] (sun4i_gpadc_get_temp+0x25/0x54 [sun4i_gpadc_iio])
May 20 03:30:59 localhost kernel: [ 1099.726703] [<bfa2d561>] (sun4i_gpadc_get_temp [sun4i_gpadc_iio]) from [<c07a456f>] (thermal_zone_get_temp+0x33/0x44)
May 20 03:30:59 localhost kernel: [ 1099.726717] [<c07a456f>] (thermal_zone_get_temp) from [<c07a1e21>] (thermal_zone_device_update.part.4+0x21/0xe0)
May 20 03:30:59 localhost kernel: [ 1099.726730] [<c07a1e21>] (thermal_zone_device_update.part.4) from [<c012f6d9>] (process_one_work+0x179/0x3cc)
May 20 03:30:59 localhost kernel: [ 1099.726740] [<c012f6d9>] (process_one_work) from [<c012fa2f>] (worker_thread+0x103/0x410)
May 20 03:30:59 localhost kernel: [ 1099.726752] [<c012fa2f>] (worker_thread) from [<c01340a5>] (kthread+0x109/0x10c)
May 20 03:30:59 localhost kernel: [ 1099.726763] [<c01340a5>] (kthread) from [<c01010f9>] (ret_from_fork+0x11/0x38)
May 20 03:30:59 localhost kernel: [ 1099.726767] Exception stack(0xedae7fb0 to 0xedae7ff8)
May 20 03:30:59 localhost kernel: [ 1099.726773] 7fa0:                                     00000000 00000000 00000000 00000000
May 20 03:30:59 localhost kernel: [ 1099.726782] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
May 20 03:30:59 localhost kernel: [ 1099.726789] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
May 20 03:30:59 localhost kernel: [ 1099.812099] i2s_clock_board: i2s_clock_board_trigger
May 20 03:30:59 localhost kernel: [ 1099.812156] I2S Command State 1

I changed device output to analog codec, rebooted and create armbianmonitor log. Messages about snd_pcm* like messages i2s device, but haven't messages about sun4i_gpadc*.

I'm confused and don't know what make further.

 

I played files from connected sata hdd and NAS, but it does not matter. And maybe this issue related kworker problem? Because I periodically see kworker/0:4-events_freezable_power_ in top

 

Link to post
Share on other sites
Want Armbian t-shirt or a cup?

I'm confused, and I can't found source of problem. It's look like performance related issue, but I don't see any simptoms like high CPU loading.
aplay is working fine, but mpd whith same file sometime working tens minutes fine, but sometime long time gets regulary underruns with constant period 11 second which one is independent of the sampling rate. Restarting mpd can sometimes solve the problem, sometimes not. This behaviour repeated on all audio devices - codec, spdif and i2s.
I use many years old armbian version (with kernel 3.4.112) without any issue, but found it with new kernel.
Can anyone show me the right direction?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...