On Mon, 26 May 2014 10:30:33 +0200 Clemens Ladisch clemens@ladisch.de wrote:
Christopher Head wrote:
asound # cat cards 0 [MID ]: HDA-Intel - HDA Intel MID HDA Intel MID at 0xf4900000 irq 53 1 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xf3080000 irq 17
I can't play audio on non-default devices.
Running aplay with -D hdmi does not work, failing with this message: aplay: main:722: audio open error: No such file or directory
The default card has no "hdmi" device.
Try -D hdmi:CARD=NVidia (or better plug:hdmi:CARD=NVidia to get automatic sample format conversions).
Regards, Clemens
Well, here’s what happens when I try either of those:
$ aplay -D hdmi:CARD=NVidia phone.wav Playing WAVE 'phone.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono aplay: set_params:1233: Sample format non available Available formats: - S16_LE - S32_LE
(so, looks like it worked fine)
$ aplay -D plug:hdmi:CARD=NVidia phone.wav ALSA lib /tmp/portage/media-libs/alsa-lib-1.0.27.2/work/alsa-lib-1.0.27.2/src/conf.c:4578:(parse_args) Unknown parameter hdmi:CARD ALSA lib /tmp/portage/media-libs/alsa-lib-1.0.27.2/work/alsa-lib-1.0.27.2/src/conf.c:4711:(snd_config_expand) Parse arguments error: No such file or directory ALSA lib /tmp/portage/media-libs/alsa-lib-1.0.27.2/work/alsa-lib-1.0.27.2/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM plug:hdmi:CARD=NVidia aplay: main:722: audio open error: No such file or directory
(no idea what happened here)
Actually, I was led to this problem initially due to trying to get Linphone to use my HDMI output for ringing but my normal audio output to headphones for talking. I discovered Linphone was using the wrong device node name, so I tried to narrow down the problem by getting Linphone out of the picture and just playing to different destinations with aplay.
What strikes me as weird is that sure, my default card doesn’t have an hdmi device—so why then is it trying to open a /dev/snd/pcm node whose name is a mixture of card and device that doesn’t exist? If it’s only willing to consider card 0 in this case, why is it looking up the name “hdmi” under card 1 and finding device number 3 at all, only to concatenate it with card number 0?
If this is considered not a bug, then I’ll be happy to leave you alone and poke the Linphone/Mediastreamer folks more instead.