From: Reco <recovery...@enotuniq.net>
    Date: Fri, 30 Jul 2021 19:37:49 +0300
> Aha. So, will this work?
> aplay -d dmix:CARD=Set,DEV=0 /usr/share/sounds/alsa/Noise.wav

peter@joule:/home/peter$ aplay -d dmix:CARD=Set,DEV=0 
/usr/share/sounds/alsa/Noise.wav
aplay: main:653: invalid duration argument 'dmix:CARD=Set,DEV=0'

peter@joule:/home/peter$ aplay -D dmix:CARD=Set,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:1345: Channels count non available

peter@joule:/home/peter$ aplay -D dmix:CARD=Set,DEV=0 -c 1 
/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:1345: Channels count non available

No sound.  Channels (or channels) has me stumped for now.

> Or this:
> aplay -D plughw:CARD=Set,DEV=0 /usr/share/sounds/alsa/Noise.wav

Gives the noise.  Good.  I guess hw = hardware.  No explanation of 
plughw in the aplay manual but google found a few remarks. 

Conclusion for users who want sound and don't care about channels: try plughw.
 
> And likewise:
> aplay -D dmix:CARD=U0x46d0x807,DEV=0 /usr/share/sounds/alsa/noise.wav
> aplay -D plughw:CARD=U0x46d0x807,DEV=0 /usr/share/sounds/alsa/noise.wav

peter@joule:/home/peter$ aplay -D dmix:CARD=U0x46d0x807,DEV=0 
/usr/share/sounds/alsa/noise.wav
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
aplay: main:828: audio open error: No such file or directory

peter@joule:/home/peter$ aplay -D plughw:CARD=U0x46d0x807,DEV=0 
/usr/share/sounds/alsa/noise.wav
aplay: main:828: audio open error: No such file or directory

main:828?  What is that?

> I'm unsure what should "usbstream:CARD=Set" do, but try it as well.

peter@joule:/home/peter$ aplay -D usbstream:CARD=Set 
/usr/share/sounds/alsa/Noise.wav
ALSA lib pcm_usb_stream.c:508:(_snd_pcm_usb_stream_open) Unknown field hint
aplay: main:828: audio open error: Invalid argument

These three give noise.

peter@joule:/home/peter$ aplay -D default:CARD=ICH5 
/usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, 
Rate 48000 Hz, Mono

peter@joule:/home/peter$ aplay -D sysdefault:CARD=ICH5 
/usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, 
Rate 48000 Hz, Mono

peter@joule:/home/peter$ aplay -D surround21:CARD=ICH5,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

peter@joule:/home/peter$ aplay -D front:CARD=ICH5,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

The "front" device gives silence.  A cable inside the box is not 
connected to the system board?  Will check when there is time.

Try a voice message.

peter@joule:/home/peter$ aplay -D plughw:CARD=ICH5,DEV=0 m94.WAV
aplay: test_wavefile:1054: can't play WAVE-file format 0x0031 which is not PCM 
or FLOAT encoded

So try play.  It lacks the -D parameter.  Two commands required.  =8~(

peter@joule:/home/peter$ set AUDIODEV=plughw:CARD=ICH5,DEV=0; play m94.WAV
play WARN alsa: can't encode 0-bit Unknown or not applicable

In spite of the warning, sound is produced.  Good!  Might have a 
reliable way to hear voice messages.

CONCLUSIONS

Audio messages can be interpreted.  Eg.,
set AUDIODEV=plughw:CARD=ICH5,DEV=0; play m94.WAV

"aplay -L" reported approximately 61 devices.  A few hours of trial 
and error (and note writing) got sound from four. Terrible odds.  
(Computing is so much more productive when based upon reason rather 
than guesswork.)

The best alsa documentation I've found in debian.org is 
https://wiki.debian.org/ALSA .  In my view, the first sentence should 
direct the reader to learn basics at 
https://alsa-project.org/wiki/Main_Page . Even so crucial gaps are 
obvious.  What exactly is a channel?  A reader should be wary of any 
document containing undefined terms.

Thanks for the help,                       ... P.

-- 
48.7693 N 123.3053 W
tel: +1 604 670 0140

Reply via email to