¿ªÔÆÌåÓý

Re: Issue #4 Raspberry Pi 4 HDMI audio modules conflict with loopbacks


Paul
 

¿ªÔÆÌåÓý

Hi Dave
Might the update I did for the headset issue (/g/BITX20/message/108643) provide the solution for this too?
If you are able to identify the HDMI interface and set its priority as I did for the USB ports then at least you can prevent clashes with the loopback interfaces.
The one bit I probably haven¡¯t quite answered is the naming of the loopback interfaces, though I think looking at the alsa modules config might be the starting point.?
This bit of config would be the same regardless of the codebase as it is core sound config from a naming perspective, though that would have an impact on the code as references to the loopbacks would then have to be updated to reflect the new device names.
I am now at the point where I need to understand the code architecture at a higher level to see how the code modules (assuming its modular) interact with each other.?
While Ashar pointed me at the mixer section of the sbitx.sound.c code, it is called by something else that passes the device names, hence me needing to understand the code at an architectural/flow level before digging in. Maybe in doing so we can get to device naming at the same time.?
From what I can tell in the code Ashar refers to the aplay -l (or -L) command to get device names, what I don¡¯t see is how this is done and its not in the sbitx.sound.c code.
ALSA config will be the source of naming of devices but on reflection maybe the loopbacks could be individually named in the /etc/rc.local file instead of using the combined name of snd-aloop for all devices, try creating a line for each loopback e.g.

modprobe sbitx-digi-out enable=1 index=1
modprobe sbitx-digi-in enable=1 index=2

Instead of

modprobe snd-aloop enable=1,1,1,1 index=1,2,3,4

I suspect this is where /proc/asound/modules gets the loopback names from, do cat /proc/asound/modules to see what I mean.

I recall some references to snd-aloop in the code so it may need tweaking to reflect these changes.

Hope this helps in some way

Regards
Paul G0KAO

Join [email protected] to automatically receive all group messages.