Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4 HDMI audio modules conflict with loopbacks #4

Closed
n7ihq opened this issue Mar 21, 2022 · 3 comments
Closed

Raspberry Pi 4 HDMI audio modules conflict with loopbacks #4

n7ihq opened this issue Mar 21, 2022 · 3 comments

Comments

@n7ihq
Copy link

n7ihq commented Mar 21, 2022

sudo modprobe snd-aloop enable=1,1,1 index=1,2,3
HDMI drivers are loaded at index 1, 2 and loopback at index 3.
Loopbacks are required at index 1, 2, 3.

cat /proc/asound/cards
0 [audioinjectorpi]: audioinjector-p - audioinjector-pi-soundcard
audioinjector-pi-soundcard
1 [vc4hdmi0 ]: vc4-hdmi - vc4-hdmi-0
vc4-hdmi-0
2 [vc4hdmi1 ]: vc4-hdmi - vc4-hdmi-1
vc4-hdmi-1
3 [Loopback ]: Loopback - Loopback
Loopback 3

This problem can be fixed by adding the loopback driver in /etc/modules-load.d/modules.conf and loopback options in /etc/modprobe.d/alsa.conf

sudo nano /etc/modules-load.d/modules.conf
Add: snd-aloop
sudo nano /etc/modprobe.d/alsa.conf
Add: options snd-aloop index=1,2,3 enable=1,1,1

cat /proc/asound/cards
0 [audioinjectorpi]: audioinjector-p - audioinjector-pi-soundcard
audioinjector-pi-soundcard
1 [Loopback ]: Loopback - Loopback
Loopback 1
2 [Loopback_1 ]: Loopback - Loopback
Loopback 2
3 [Loopback_2 ]: Loopback - Loopback
Loopback 3
4 [vc4hdmi0 ]: vc4-hdmi - vc4-hdmi-0
vc4-hdmi-0
5 [vc4hdmi1 ]: vc4-hdmi - vc4-hdmi-1
vc4-hdmi-1

@RichNeese
Copy link

you can disable the hdmi dirver in /boot/config.txt

@afarhan
Copy link
Owner

afarhan commented Feb 2, 2024

The HDMI audio needs to be disabled as mentioned in previous comments. I am closing this

@afarhan afarhan closed this as completed Feb 2, 2024
@n1ai
Copy link
Contributor

n1ai commented Feb 4, 2024

I've commented on this issue elsewhere:

https://groups.io/g/BITX20/message/108542 -- you don't have to rely on order of discovery if you use proper names

https://groups.io/g/BITX20/message/108485 -- stop using numbers, start using names

A fix is IMO pretty easy:
Create and use a new git branch so sending a PR is easier ('git checkout -b sbitx-alsa-names' will do this)
Go into sbitx.c and change "plughw:0,0" to "plughw:CARD=audioinjectorpi,DEV=0".
Go into sbitx_sound.c and change "plughw:1,0" to "plughw:CARD=Loopback,DEV=0".
Go into sbitx_sound.c and change "plughw:2,1" to "plughw:CARD=Loopback_1,DEV=1".
Rebuild the code and test that the sbitx app still works for rx and tx of voice modes.
Then test that the sbitx app still works with fldigi and/or wsjt-x external digital apps.

Then change /boot/config.txt to not disable HDMI audio (or standard broadcom headphone jack either).
Reboot and do the same tests.

Then plug in a USB headset or soundcard dongle, reboot, retest.

I'm pretty sure it will all just work based on the testing I did earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants