Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Alsa SND_PCM_NONBLOCK broken pipe issues

Featured Replies

Hi guys,

 

I've been having problems on my NanoPi Duo implementing a music streaming service using Alsa PCM to output the audio.

When calling snd_pcm_open with the nonblock flag set, I had snd_pcm_writei returning a broken pipe error several times per day (when continuously playing).

I noticed not setting this flag and,  thus, allowing snd_pcm_writei to block until there was enough room in the Alsa PCM buffer, did not show this problem. 

This was however unusable because the blocking behaviour slowed down the rest of the software enough to be annoying. I think I solved it now by checking with snd_pcm_avail_update if there's enough room available, otherwise I would not call snd_pcm_writei.

 

Just wanted to put htis out there for anyone's future reference because I could not find any known issues with setting this flag + I don't understand what's causing this.. If anyone has experienced this as well, or might have a clue what's going on, please let me know 

 

 4.19.25-sunxi #5.78 SMP Mon Apr 8 07:46:22 CEST 2019 armv7l GNU/Linux

  • Author

Wrong :) Still had issues.

Issue seemed to be Alsa functions were called too quickly? For example, snd_pcm_avail  sometimes returned a broken pipe error. 

Now I added a 10ms delay between calls to Alsa and seems to be stable..

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.