(copied from https://etherpad.gnome.org/p/hHCbgC0w4P4ZrSDiaoGB)
- Because USB Audio supports Bluetooth devices (and anything other, like USB-OTG, etc.)
- Because USB Audio supports audio filters (like echo cancellation)
- Because USB Audio supports call recording
- Because you will experience less clicks
- Because you may want to both have a call and listen to music?
- Because it's buggy and untested
- Because there's a delay introduced
- Because USB connection between main CPU and modem tends to disconnect
- Because you don't want to void your 30-day warranty by replacing the modem firmware
- Because perhaps PinePhone CPU is too slow or you want your battery to work longer (unsure)
- Install Biktorg's community modem firmware: https://github.com/Biktorgj/pinephone_modem_sdk (this will void your 30-day warranty). You don't need to rollback this step to undo. ** It may be possible to do it with the proprietary firmware, see the following links: *** https://forums.quectel.com/uploads/short-url/79VE3yUZiWsTQ5SQ3GnmxyH3mnW.pdf *** https://forums.quectel.com/t/switch-on-uac-on-eg25g/12085 *** This step replaces the "AT+EN_USBAUD" step. Please fill in more in this document if you go this path.
- We set our EG25-G into the state of moving audio thru the USB Gadget mode (like Librem5 does with its modem), not via the codec
- Then we disable switching by copying over the HiFi ALSA-UCM2 config over the PhoneCall config
- Finally we run
wys
from Librem5 to route audio between the codec (or any other audio device) and modem in userspace when calls start. It also does echo cancellation!
# Enable the USB audio gadget (you must have Biktorg's firmware - if you don't know if you have one, you don't!)
# Warning - this will persist across modem reboots!
echo -e "AT+EN_USBAUD\r" | sudo tee /dev/ttyUSB2 # or: /dev/EG25.AT
# Check if it worked. Type cat /proc/asound/cards, you should see the following:
# 0 [PinePhonePro ]: simple-card - PinePhonePro
# PinePhonePro
# 1 [Module ]: USB-Audio - LTE Module
# Quectel, Incorporated LTE Module at usb-fe3c0000.usb-1, high speed
# Install wys, may be packaged in your distro
# Fedora:
# Enable marcin/pine copr: https://copr.fedorainfracloud.org/coprs/marcin/pine/
# dnf -y install wys
# Disable switching
cd /usr/share/alsa/ucm2/Pine64/PinePhonePro
# replace with PinePhone for PP
# also it may be in /usr/share/alsa/ucm2/PinePhonePro depending on your distro
# Backup the VoiceCall.conf file, important if you will want to rollback (and believe me, you will!):
cp VoiceCall.conf VoiceCall.conf.bak
# Overwrite VoiceCall.conf with HiFi.conf
cp HiFi.conf VoiceCall.conf
# Reload alsaucm config:
alsaucm reload
# Start wys for the "LTE Module" card
wys -m "LTE Module"
# (if you want to make it permanent edit your wys.service to add -m "LTE Module" and enable it)
# Disable USB Audio gadget
echo -e "AT+DIS_USBAUD\r" | sudo tee /dev/ttyUSB2 # or: /dev/EG25.AT
# Ensure wys isn't running
killall wys
# Restore CallAudio.conf from backup
cd /usr/share/alsa/ucm2/Pine64/PinePhonePro
cp VoiceCall.conf.bak VoiceCall.conf
alsaucm reload