EC21-AUX UAC ALSA Failure - cannot set hw params: Invalid argument

Hi,
With UAC enabled I have the soundcard in place but accessing it via tinyalso or aplay/arecord is not possible.
FIRMWARE: EC21AUXGAR08A07M1G
OS: Debian 12
Kernel: 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux

1.AT+QCFG=“USBCFG”,0x2C7C,0x0121,1,1,1,1,1,0,1
RESPONSE: OK
2.cat /proc/asound/cards
RESPONSE: 0 [EC21AUX ]: USB-Audio - EC21-AUX
Quectel EC21-AUX at usb-0000:00:14.0-6, high speed
3. tinyplay test.wav -D 0 -d 0 -c 1 -r 8000
RESPONSE:failed to open for pcm 0,0. cannot set hw params: Invalid argument
4. aplay -L
RESPONSE:hw:CARD=EC21AUX,DEV=0
EC21-AUX, USB Audio
Direct hardware device without any conversions
5. aplay -D hw:CARD=EC21AUX,DEV=0 test.wav
RESPONSE: Playing WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1358: Channels count non available

Non UAC audio works but I am having a hard time controlling the amplitude in and out (very high and distorted).

I have upgraded the firmware to this version hoping it would solve the issue as it had for a user with an EC25 in a previous forum post but it hasn’t helped me.

Any help or suggestions would be appreciated. Thanks!

at+qdai=3,0,0,5,0,1,1,1
→ Set the freq to 16K. it would take effect after reboot.
aplay -D hw:2,0 -c 1 -r 16000 output.wav

Hi,
Thanks but I end up with the same outcome.
+QCFG: “usbcfg”,0x2C7C,0x0121,1,1,1,1,1,0,1
+QDAI: 3,0,0,5,0,1,1,1
AT+CFUN=1,1

cat /proc/asound/cards
RESPONSE:
1 [EC21AUX ]: USB-Audio - EC21-AUX
Quectel EC21-AUX at usb-0000:00:14.0-6, high speed
aplay -D hw:1,0 -c 1 -r 16000 test.wav
RESPONSE: Playing WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1358: Channels count non available

tinyplay test.wav -D 1 -d 0 -c 1 -r 16000
RESPONSE:
failed to open for pcm 1,0. cannot set hw params: Invalid argument

Also did a power cycle of the power with the same results.

Have you connected with the ALC5616 CodeC with the EC21-AUX?
Please refer to the guide of the UAC, you need to enable the UAC
AT+QPCMV=1,2

With running at+qpcmv=1,2 I still have the same outcome.

Welcome to minicom 2.8

OPTIONS: I18n
Port /dev/ttyUSB3, 14:02:08

Press CTRL-A Z for help on special keys

OK
at+qpcmv?
+QPCMV: 1,2

OK
at+qcfg=“usbcfg”
+QCFG: “usbcfg”,0x2C7C,0x0121,1,1,1,1,1,0,1

OK
at+qdai?
+QDAI: 3,0,0,5,0,1,1,1

OK
at+qpcmv?
+QPCMV: 1,2

OK

cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xa1130000 irq 133
1 [EC21AUX ]: USB-Audio - EC21-AUX
Quectel EC21-AUX at usb-0000:00:14.0-6, high speed

aplay -D hw:1,0 -c 1 -r 16000 test.wav
Playing WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1358: Channels count non available

On the main board sound card it plays no problem - as a differential
aplay -D hw:0,0 -c 1 -r 16000 test.wav
Playing WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

test.wav is 48K not a 16K wav file…
The UAC is working when you make voice all.

UAC is not working on voice calls on this machine.
But…
I have moved the modem to a complete different machine, with a later compiled kernel and aplay works correctly to the UAC.
I will further my investigation as to hardware differences as the original machine is an ASUS NUC i7 and that has a lot of USB modifiable options, BIOS wise.
The other machine is also an ASUS MB but a standard ATX with i9 CPU.

I will update on my findings.
Thanks for the help.

Is there another application that has already opened the Audio device?
Maybe you can check

lsof | grep pcm

It appears to be an inconsistency in ALSA API to the asterisk module I’m using on snd_pcm_open.

I need to put some time into but have been pushed to a different project for a period.
Hopefully in a few weeks I’ll get to check more and will report here.
Thanks for the help, in the meantime.

Hi Bean,
Could you supply me with the latest firmware for the ec21aux.
I am getting back into this project now.
Thankyou.

EC21AUXGAR08A07M1G_01.201.01.201 os already the lastest firmware.

Thankyou Bean.
I will continue my investiagation.

Hi Bean.
UAC is working great, thanks for the help.

Solution was all software permissions issues on /dev/snd/*
Basically asterisk under feeepbx runs under asterisk and dialout group and alsa is expecting audio group, adding asterisk to the audio group should have been the fix but for some reason, via convoluted means, asterisk consistently runs under dialout group only.
Basically I changed /dev/snd/* accessibillity for rw to anonymous 666 also which solved my issue with the quectel asterisk plugin.