Opps… Sorry! Didn’t understand. Let me try again…
A preliminary point? I have downloaded a test file and called it test.wav.
Starting simple, I check it plays on both sound cards with:
# **aplay -v test.wav**
No protocol specified
Playing WAVE 'test.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : FLOAT_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 32
buffer_size : 22050
period_size : 5512
period_time : 125000
tstamp_mode : NONE
tstamp_type : GETTIMEOFDAY
period_step : 1
avail_min : 5512
period_event : 0
start_threshold : 22050
stop_threshold : 22050
silence_threshold: 0
silence_size : 0
boundary : 6206523236469964800
#
From this (because I think I will need it later?) I conclude that the format switch (-f) should be S32_LE (stereo, 32 bit, little endian).
As the above aplay command does not specify a device, I am switching the default sound card with the System Settings | Multimedia | Audio Volume GUI (Systemsettings5).
This seems to work.
Next, I get my list of devices:
**# aplay -L**
null
Discard all samples (playback) or generate zero samples (capture)
**default**
Default ALSA Output (currently PulseAudio Sound Server)
**sysdefault:CARD=MID**
HDA Intel MID, VT1828S Analog
Default Audio Device
**front:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
Front speakers
**surround21:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
2.1 Surround output to Front and Subwoofer speakers
**surround40:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
4.0 Surround output to Front and Rear speakers
**surround41:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
**surround50:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
5.0 Surround output to Front, Center and Rear speakers
**surround51:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
**surround71:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
**hdmi:CARD=MID**,DEV=0
HDA Intel MID, VT1828S Digital
HDMI Audio Output
**hdmi:CARD=HDMI**,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
**hdmi:CARD=HDMI**,DEV=1
HDA ATI HDMI, HDMI 1
HDMI Audio Output
#
I have emboldened the strings that I think I need to use in the –device= switch.
I suspect that the only devices that I will hear are the 2 defaults and the 3 hdmi?
This is because I have an HDMI amp plugged into the motherboard sound card and two DisplayPort monitors (with speakers) plugged into the graphics card.
Firstly, if I try the two “defaults”:
#** aplay --device=default test.wav**
No protocol specified
Playing WAVE 'test.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
#** aplay --device=sysdefault test.wav**
Playing WAVE 'test.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
#
And yes, I hear audio from both commands.
However –device=default, produced audio from the sound card on the motherboard and
–device=sysdefault produced audio from the sound card on the display adaptor?
So I now move on to try the other devices.
# **aplay --device=front:CARD=MID test.wav**
Playing WAVE 'test.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1339: Sample format non available
Available formats:
- S16_LE
- S32_LE
#
… so do I need a format switch? Let me try:
# **aplay --device=front:CARD=MID -f S32_LE test.wav**
Playing WAVE 'test.wav' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1339: Sample format non available
Available formats:
- S16_LE
- S32_LE
#
Nope. No different. And all the other devices result in the same output.
Have I misunderstood the --device= switch? Why has it (sorta) worked for the –device=default and –device=sysdefault but none of the others devices?
Regards, Martin
PS - Sorry that this is getting so involved. It’s like spaghetti in there!