You can also use this configuration.
pcm.dmix_stream { type dmix ipc_key 321456 ipc_key_add_uid true slave.pcm "hw:0,0" } pcm.mix_stream { type plug slave.pcm dmix_stream }
Update it in ~ / .asoundrc or /etc/asound.conf
You can use the command
For wav file
aplay -D mix_stream "file name"
For raw or pcmfile
aplay -D mix_stream -c "channels" -r "rate" -f "format" "filename"
Enter a value for the channels, speed, format and file name according to your sound file
source share