Hi Waldemar Thanks! Indeed that might be an alternative to using aloop.What I'm facing now seems to be unrelated to brutefir. I.e. both brutefir and aloop seem to be working fine.It seems kodi and aloop are not working together ideally. So I think something is going wrong with kodi's alsa config. Do you know where that is stored/how I might be able to modify the asound file kodi uses? Oliver
Von: Waldemar Brodkorb wbx@openadk.org An: Oliver Schib lich000king@yahoo.de CC: "dev@openadk.org" dev@openadk.org Gesendet: 19:47 Sonntag, 11.März 2018 Betreff: Re: [openadk] kodi and brutefir
Hi Oliver, Oliver Schib wrote,
Hi everyone
In the last few weeks I have tried getting brutefir to work with kodi in openadk. My goal is to get room correction with kodi on my pi2. :-)
While it is quite simple to use the brutefir convolution engine with mpd through jack, this does not work so easily in kodi, since kodi does not support jack. At least there is no official support as far as I'm aware.
Now one possibility would be to try and implement jack support in kodi which I think would be rather hard, or maybe see if someone else has done something that could be used.
However, there seems to be an easier way. For alsa there is a loopback driver called 'aloop' available in the linux kernel. Basically it simply adds a 'virtual loopback cable' device. This means the audio you play through this device will be available for capture in another device. You can find more on it here: https://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge So the idea is straight-forward: Set up kodi to play through this loopback device instead of the speakers, use the other end as input for brutefir, filter the audio and have brutefir output to the speakers.
I tried it out, and I think I'm close to having it work. If you are interested, here is a proof of concept:
- build adk with e.g. convolution, kodi and ADK_LINUX_KERNEL_SND_ALOOP.
- start brutefir:
$ brutefir -nodefault config.conf where config.conf is the attached brutefir cofig file.
- play an audio file:
$ audio.wav -Dhw:0 On my pi2 with a hifiberry DAC+ installed this will play the brutefir-filtered audio through the hifiberry. If you don't have one, you may need to modify the config file.
Now I don't quite have it working with kodi yet. With SND_ALOOP enabled, kodi's audio settings show 5 devices: 1 PI: HDMI 2 PI: Analogue 3 PI: HDMI and Analogue 4 ALSA: Loopback (@CARD=Loopback,DEV=0), LoopbackPCM 5 ALSA: Loopback (surround21:CARD=Loopback,DEV=0), Loopback PCM
Note that the hifiberry (which works fine in kodi without aloop) is missing here. Why is that? Something seems not quite right. Also, when I select number 4 from the above, audio will be played through the berry even when brutefir is not running. And it is playing at full volume, ignoring kodi's volume setting, which does not sound nice at all. So something is clearly no ok yet. I do not have an asound file at this point (I think none should be needed?) Does anyone have an idea what I'm missing?
Thanks for any ideas
Nice sum up. I have no clue about Kodi with brutefir, but what if you use pulseaudio in the middle between kodi and brutefir? https://lists.freedesktop.org/archives/pulseaudio-discuss/2015-September/024...
Kodi seems to have a pluseaudio backend.
Best regards Waldemar