Skip to content

Sound Settings / Audio Card Not Selecting ALSA default or sysdefault Hardware Device #800

@nathan-hook

Description

@nathan-hook

Good day,

Here is my system information:
Pi 4 (8 gig ram)
CanaKit 3.5A USB-C Power Supply with Noise Filter
Retropie Version 4.8.2 - Last Commit: 3 weeks ago (f271ce9d)
Image downloaded from retropie website
HiFiBerry DAC2 HD installed

This problem might be a simple understanding of my misinterpreting how audio-cards work in EmulationStation...

I have been just having a terrible time getting my HiFiBerry DAC to work properly.

I have read numerous examples of how to properly setup ALSA.

For now, I have settled on the following setup in my /etc/asound.conf file:

# Works for hifiberry
pcm.!default {
  type plug
  slave.pcm "dmix:sndrpihifiberry,0"
}
# Works for hdmi, plug works with hw but not dmix
pcm.!sysdefault {
  type plug
  slave.pcm "hw:b1,0"
}

My goal is to be able to select using my hifi berry or hdmi via the sound settings in retropie.

However, I am unable to get switching back and forth between the two devices/audio cards to work...

Here is what I am expecting to work.

When I go to Sound Settings -> Audio Card when I select default, the sound should come through the hifi berry (see the asound.conf above). This actually works and is expected behavior.

However, I don't always want the sound to go through my receiver and speakers.

So, I have hdmi setup as sysdefault in ALSA and when I go to Sound Settings -> Audio Card and select sysdefault, I would expect the sound to start coming though the hdmi (see the asound.conf above).

However, the sound still comes though the receiver/speakers (the default device) and not the hdmi (sysdefault).

What am I doing wrong and how can I achieve my goal of being able to select which device plays sound?

Does Sound Settings -> Audio Device have to be set to a different specific value for this plan/idea to work?

Any friendly advice would be greatly appreciated.

BTW, I am able to play sounds through both the hdmi and hifiberry using omxplayer.

Here are the two different commands:

# Plays through the hifi berry -> receiver -> speakers
$ omxplayer -o alsa:default -g --pos 00:00:15 "Banco De Gaia - Last Train To Lhasa (cd 1).mp3"

# Plays though the hdmi -> tv
$ omxplayer -o alsa:sysdefault -g --pos 00:00:15 "Banco De Gaia - Last Train To Lhasa (cd 1).mp3"
~~~

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions