doent work even tried just hw: instead of plughw. only default works
"hw:x,y" can be problematic because it relies on the underlying audio card natively supporting 8khz sample rate, which I learned the hard way that not all do. "plughw:x,y" is usually more tolerant because it includes a rate-adaption module allowing an input arbitrary sample rate to work with whatever the card supports.
First step for you should be figuring out the proper hardware addreses, which you can either do with "aplay -l" and inspection of the /proc/asound hierachy.
Code:
gnorbury@yoga2 ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC298 Analog [ALC298 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
Code:
gnorbury@yoga2 ~ $ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xa1328000 irq 153
Code:
gnorbury@yoga2 ~ $ ls /proc/asound/card0
codec#0 eld#2.0 eld#2.2 eld#2.4 eld#2.6 eld#2.8 pcm0c pcm10p pcm7p pcm9p
codec#2 eld#2.1 eld#2.3 eld#2.5 eld#2.7 id pcm0p pcm3p pcm8p
In this example I have just the one card, so all ALSA devices will be "hw:0,x".
Playback device numbers: 0, 3, 7, 8, 9, 10
Capture device number: 0
If you had multiple cards you would have more than one "cardX" entry.
If you have a small .wav file you can test the output using "aplay -D devname filename.wav"