Comments (3)
Do you know what effect changing the configuration in /etc/asound.conf
has? Are you able to debug into SDL and find out why it's failing?
from sdl.
The effect of modifying /etc/asound.conf is limited to setting the default sound card. By default, Linux designates headphones as the default sound card (index 0). The configuration I've provided above is intended for establishing the first HDMI as the default sound card. This ensures that it is also the one automatically selected by SDL when passing the NULL value.
With that said, I'm curious about the differences in SDL's behavior when allowing it to choose the default card versus explicitly passing the name. If you have any suggestions for debugging this issue, I would appreciate it. I ran out of ideas.
from sdl.
In case it helps, this is the output of my aplay -L
:
null
Discard all samples (playback) or generate zero samples (capture)
default
Default Audio Device
sysdefault
Default Audio Device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
Hardware device with all software conversions
default:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
Direct sample mixing device
hw:CARD=vc4hdmi0,DEV=0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi0,DEV=0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi0,DEV=0
vc4-hdmi-0, MAI PCM i2s-hifi-0
HDMI Audio Output
dmix:CARD=vc4hdmi0,DEV=0
vc4-hdmi-0, MAI PCM i2s-hifi-0
Direct sample mixing device
hw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
HDMI Audio Output
dmix:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct sample mixing device
And these are the testing results for hdmi0:
aplay -D default /usr/share/sounds/alsa/Noise.wav
plays OK
aplay -D sysdefault /usr/share/sounds/alsa/Noise.wav
plays OK
aplay -D default:CARD=vc4hdmi0 /usr/share/sounds/alsa/Noise.wav
plays OK
aplay -D sysdefault:CARD=vc4hdmi0 /usr/share/sounds/alsa/Noise.wav
plays OK
aplay -D hw:CARD=vc4hdmi0,DEV=0 /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1343: Sample format non available
Available formats:
- IEC958_SUBFRAME_LE
aplay -D plughw:CARD=vc4hdmi0,DEV=0 /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1343: Sample format non available
Available formats:
- IEC958_SUBFRAME_LE
aplay -D hdmi:CARD=vc4hdmi0,DEV=0 /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1349: Channels count non available
aplay -D dmix:CARD=vc4hdmi0,DEV=0 /usr/share/sounds/alsa/Noise.wav
ALSA lib pcm_direct.c:1206:(snd1_pcm_direct_initialize_slave) requested or auto-format is not available
ALSA lib pcm_dmix.c:1087:(snd_pcm_dmix_open) unable to initialize slave
aplay: main:830: audio open error: Invalid argument
from sdl.
Related Issues (20)
- SDL2 does not detect game controllers when started as a child process on windows HOT 2
- [Android] Overrding `createSDLMainRunnable()` skips important SDL (de)initialisation code
- Window width/height is off by one when odd? HOT 5
- Add path separator at the end of string returned by SDL_GetUserFolder()
- Feature Request: File pickers on UIKit, Android, and UWP HOT 3
- Device not found error on SDL_Init() HOT 4
- Release workflow didn't create SDL3.xcframework HOT 1
- Using `SDL_ShowOpenFolderDialog` on MacOS 11.7 leads to segfault.
- testdropfile: Wayland display connection closed after repeatedly dropping file HOT 2
- testcamera: deadlock when there is a delay between `SDL_ReleaseCameraFrame` and `SDL_CloseCamera`
- Supporting going in and out of remote desktop?
- Feature Request: Debugging Symbols for Windows HOT 8
- Dump SDL_vulkanInstance and SDL_vulkanSurface? HOT 1
- After logging system changes, calling SDL functions that error is far more expensive
- Remove `SDL_DROPEVENT_DATA_SIZE` and `SDL_TEXTEDITINGEVENT_TEXT_SIZE` HOT 1
- [KMSDRM] is there any way to have SDL set display mode in portrait mode? HOT 12
- 2.30.2 ok with iOS but upgrade to 2.30.3 failed HOT 1
- The Sensor API may send duplicate events with the same timestamp, confusing downstream consumers
- SDL_ShowMessageBox cuts last word from messageboxdata.message on windows HOT 2
- SDL_ShowMessageBox on windows doesn't support newlines while linux does HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl.