raedwulf / alsaequal

GNU Lesser General Public License v2.1
32 stars 13 forks source link

EQ on HDMI output #13

Open jacobweldon opened 1 year ago

jacobweldon commented 1 year ago

I am looking to understand the equalizer plug-in. I am trying to implement a system-wide EQ on my raspberry pi 4 B. For the EQ, I am using alsamixer -D equal. This EQ has worked previously on streaming audio out of the headphone jack, but I am looking for a way to run this EQ on the HDMI audio output.

Here is my current /etc/asound.conf file.

ctl.equal { type equal; } pcm.plugequal { type equal; slave.pcm hdmi } pcm_slave.format_adj { pcm hdmi format IEC958_SUBFRAME_LE rate 44100 } pcm.equal { type plug; slave format_adj }

When running command aplay Organ.wav, I get audio, but it is not running through the EQ.

When running command aplay -D equal Organ.wav, I get the following error:

"Playing WAVE 'Organ.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo ALSA lib pcm_params.c:2226:(snd1_pcm_hw_refine_slave) Slave PCM not usable aplay: set_params:1314: Broken configuration for this PCM: no configurations available".

I am a bit confused on data types here. It looks like the wave file is S16_LE, I read somewhere that alsaequal only supports FLOAT, and I believe HDMI audio works through IEC958_SUBFRAME_LE.

My real end-goal is to get the equalizer working on audio coming from a web browser and out through the HDMI port, but I saw this path as a means of hopefully getting there.

Please let me know any advice you might have! Thanks!

RacoonK1ng commented 1 month ago

I have the same issue and I stumbled upon your comment. I am wondering if you ever got it working ?

If so could you let me know how ? Thanks!

jacobweldon commented 1 month ago

@RacoonK1ng I was not able to fix it. What I ended up doing was processing audio out of the AUX jack and buying a device on amazon that would combine the processed audio with the video output from the HDMI. I'll send a link to what I bought. It works ok. Not perfect but not too bad.

https://www.amazon.com/Embedder-Inserter-Digital-Support-TOSLINK/dp/B0CHBGLTHY/ref=sr_1_5?dib=eyJ2IjoiMSJ9.QMGZiDoKbICQcjwV0ZM5ThWfKU67STW8uRSuMNpMKPXvXp4jjpbikDNqD_ZkFMOXkRHE7q0GEAPp3_mrfTlP0YDdy69ixwZ9sVpwU7C5u39Yo473-q2KY8i69A1sKfcHyXU2j86pEf2lDAlm_ZGNFW1WK8q8Tzic2VUXv45ppqLCpRbA2KxNyEJ9fPI6wnjC2JyfjMDkjW_PBNIjO7_XdaSUEBnr0GfjJ5JkOdF8_J0._xxMDpuFnfgDq810DdoEXqrca3m-IB20QnXQf3hwzJk&dib_tag=se&keywords=hdmi+audio+inserter&qid=1721672999&sr=8-5