1

I'll say it again to be clear - ALSA on the command line works fine (after I delete/modify .asoundrc after it's auto-broken by PIXEL).

The most seemingly contemporary answer I've found on modern Raspbian ALSA config was here (I have no idea where @Housni read about the slots option being needed for recent versions of Raspbian, though). It seems that ALSA on Raspberry Pi is a bit funny and I don't see any official docs that are relevant to non-standard audio anywhere (just directions on HDMI or the PWM outputs). I have looked at MANY websites, including raspi forums, this SE site, Adafruit, and the ALSA docs.

My situation:

  • I can set my USB device to default for alsa, as either device 0 or 1, except...
  • .asoundrc gets regenerated each login to LXDE/PIXEL. Somehow it knows where the built-in device is and selects that card. Doesn't matter if a good .asoundrc was there vs. no such file.
  • So, by default, I get the built-in sound on the command line after login, but I can edit/delete .asoundrc and everything's fine on the CLI.
  • The GUI (e.g., pimixer aka "Audio Device Manager") ONLY seems to see the built-in audio. The USB card is visible via e.g., aplay -l, but not in the pimixer drop-down.

Based on the pimixer README, it seems PIXEL (aka sorta LXDE) is using Gstreamer for GUI stuff.

As far as I can tell, this issue could reside in:

  • LXDE
  • PIXEL LXDE mods
  • Gstreamer
  • the XFCE4 mixer settings (pimixer related stuff)
  • Pulseaudio

I trashed my .config directory, and this doesn't change any behavior.

I'm open to simply using a different distro - I'm on an RPi3. I welcome solutions at any level!

I will also happily upvote comments / answers shedding light on some of the mysteries above, like:

  • What is generating that .asoundrc?
  • What sound framework is Chromium talking to?

UPDATES

  • this rpi SE post describes the same issue. The fix doesn't work for me. It also doesn't explain what's going on - it feels like breaking the system, not understanding it.
  • this rpi forum post explains how that doesn't work for some people and how you can just disable the internal audio. This also doesn't work - pimixer says "No ALSA audio devices were detected." (aplay -l still shows my USB device - a Blackjack Onyx.)
5
  • GUI apps use SDL for sound. Have you set the SDL-AUDIODRIVER environment variable to alsa
    – PaulF8080
    Commented Nov 28, 2016 at 11:32
  • Thanks for the suggestion, but may I add that the world of raspberry pi seems to largely consist of unsubstantiated statements. Where are you getting this info? I see nothing about SDL and XFCE4 or PIXEL. SDL is certainly not a necessary component of audio on linux. That said, I tried setting SDL_AUDIODRIVER (note underscore), and it had no effect. pimixer was already showing "bcm2835 ALSA (Alsa mixer) (Default)" in the Sound Card drop-down.
    – Dav Clark
    Commented Nov 29, 2016 at 2:06
  • Are you saying that when you right click on the sound icon (top right of the desktop), you can't choose the default device ?
    – Matt
    Commented Nov 29, 2016 at 4:14
  • I got that from debugging a port of a graphic app for the PI for the last two weeks. Asking if you tried something is not the same as stating a fact.
    – PaulF8080
    Commented Nov 29, 2016 at 5:35
  • @Matt I only see HDMI and analog (the two broadcom / built-in options) when I right-click. USB audio only shows up via alsa command line. I've also verified that pulse audio is not running by default.
    – Dav Clark
    Commented Nov 29, 2016 at 13:29

1 Answer 1

1

What is controlling the audio?

According to spl23 on the raspi forums, the program that's controlling audio settings is volumealsa.

What if I want audio right now?

I have verified that Ubuntu MATE works fine with the USB DAC I have (Onyx Blackjack) with Firefox and other GUI tools.

Strangely, streaming audio pages seem not to work still (Amazon Music, SoundCloud), but YouTube does.

1
  • Also - as of most recent updates, Raspbian is allowing the GUI to access my USB audio device!
    – Dav Clark
    Commented Dec 19, 2016 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.