generating alsa configs for bluealsa #471
Replies: 2 comments 7 replies
-
Nice! Yes Kodi listens to udev for soundcards. We have a patch to have it listen for BT devices connecting but udev doesn't know what sort of bluetooth device it is. We were thinking of adding a dbus listener but I'll have a look at your patch and see if we can meet in the middle. |
Beta Was this translation helpful? Give feedback.
-
That will certainly work with my approach. There is also a simpler option of just calling |
Beta Was this translation helpful? Give feedback.
-
I've put up an experimental commit in a branch on my bluez-alsa fork here: https://github.com/borine/bluez-alsa/tree/dynamic
This edits the ALSA config in-memory when devices connect/disconnect such that name hints are added and removed as required.
To use it you need to have
ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf:/usr/share/bluealsa/alsa-dynamic.conf
exported into the environment of the alsa application (eg aplay etc).Ive tested it with aplay where I get good results, and with kodi where it is less successful. kodi reads the namehints on startup but after that only when a sound card is plugged/unplugged (I'm guessing via udev event) , so the dynamic aspect is completely missed.
Beta Was this translation helpful? Give feedback.
All reactions