Probably a stupid question, but here goes.
My Vero V connects to a TV via HDMI cable, and it’s all splendid for playing media with Kodi on that TV.
But now I would like to also be able to play some audio files from the “host environment”, so not from Kodi but from a bare command line, for example while being connected via SSH, so for instance with aplay /path/to/some.wav
, and I would like to output that sound from speakers that are connected via 3.5 mm jack output instead of HDMI-connected TV.
At the moment when I execute aplay /path/to/some.wav
, the sound comes from both the TV and the 3.5 mm speakers. But is it possible to make it so that aplay
outputs this sound only through 3.5 mm connected speakers?
Here are the devices that aplay
reports on Vero V:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: TDM-A-dummy-alsaPORT-pcm dummy-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-B-dummy-alsaPORT-i2s multicodec-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: TDM-C-T9015-audio-hifi-alsaPORT-i2s2hdmi T9015-audio-hifi-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: SPDIF-A-dummy-alsaPORT-spdif dummy-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 4: SPDIF-B-dummy-alsaPORT-spdifb dummy-4 []
Subdevices: 1/1
Subdevice #0: subdevice #0
and
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
bluealsa
Bluetooth Audio Hub
btaudio
Bluetooth Audio
hw:CARD=AMLAUGESOUND,DEV=0
AML-AUGESOUND,
Direct hardware device without any conversions
hw:CARD=AMLAUGESOUND,DEV=1
AML-AUGESOUND,
Direct hardware device without any conversions
hw:CARD=AMLAUGESOUND,DEV=2
AML-AUGESOUND,
Direct hardware device without any conversions
hw:CARD=AMLAUGESOUND,DEV=3
AML-AUGESOUND,
Direct hardware device without any conversions
hw:CARD=AMLAUGESOUND,DEV=4
AML-AUGESOUND,
Direct hardware device without any conversions
plughw:CARD=AMLAUGESOUND,DEV=0
AML-AUGESOUND,
Hardware device with all software conversions
plughw:CARD=AMLAUGESOUND,DEV=1
AML-AUGESOUND,
Hardware device with all software conversions
plughw:CARD=AMLAUGESOUND,DEV=2
AML-AUGESOUND,
Hardware device with all software conversions
plughw:CARD=AMLAUGESOUND,DEV=3
AML-AUGESOUND,
Hardware device with all software conversions
plughw:CARD=AMLAUGESOUND,DEV=4
AML-AUGESOUND,
Hardware device with all software conversions
default:CARD=AMLAUGESOUND
AML-AUGESOUND,
Default Audio Device
sysdefault:CARD=AMLAUGESOUND
AML-AUGESOUND,
Default Audio Device
hdmi:CARD=AMLAUGESOUND,DEV=0
AML-AUGESOUND,
HDMI Audio Output
dmix:CARD=AMLAUGESOUND,DEV=0
AML-AUGESOUND,
Direct sample mixing device
dmix:CARD=AMLAUGESOUND,DEV=1
AML-AUGESOUND,
Direct sample mixing device
dmix:CARD=AMLAUGESOUND,DEV=2
AML-AUGESOUND,
Direct sample mixing device
dmix:CARD=AMLAUGESOUND,DEV=3
AML-AUGESOUND,
Direct sample mixing device
dmix:CARD=AMLAUGESOUND,DEV=4
AML-AUGESOUND,
Direct sample mixing device
Trying to use different devices, I noticed that:
aplay --device hw:0,2 /path/to/some.wav
plays the sound both to HDMI and 3.5aplay --device hw:0,3 /path/to/some.wav
plays the sound only to HDMIaplay --device hw:0,4 /path/to/some.wav
plays the sound only to HDMI- …
but I did not find a device that would play only to 3.5 without HDMI.
When the TV is off, then it is fine, as I quite naturally get the sound only from the 3.5 speakers, but when the TV is on, then I don’t want the “duplicated” output from the TV, plus if Kodi is playing something, then aplay
refuses the play the sound saying that Device or resource busy
.
…And the other way around, is it also possible to “disable” 3.5 mm output in Kodi, so it would play my movies only through HDMI-connected TV, so I wouldn’t get “duplicated” output from 3.5 mm speakers?