brutefir2 provides a 30 bands 1/3 octave equalizer. But I don’t update this plugin.
But if you install it only for the equalizer, it should be ok (even if factory presets doesn’t have any effect).
The running version for DRC is brutefir3, but I removed the equalizer as it had no sense when used with filters.
I tried to install brutefir2 but I do not see a 30-band equalizer. Should I manually install only the equalizer? my only curiosity because when I finish the system I want to use environmental correction through rew and rephase.
thank you
Just install brutefir 2. In settings, you can’t miss the equalizer…
But for Drc I suggest brutefir 3
ok, thanks. you’re the only one who answers me. last question. the plugin also works with dac usb? because i tried with a m audio fast track normal. on the list there and fast track pro.riesce to play but the plugin does not has no effect on it. I suppose it is not compatible with volumio. Before buying a dac usb I want to be sure.
thanks for everything
It should work with any output configured by Volumio.
With the plugin disabled, configure volumio’s output with your dac.
Enable the plugin and wait about 20sec.
Then, you can try to play a track. If no sound and no error, go in plugin settings and in advanced settings choose an other output option such as S32_LE. Some dac does not handle some value. It is hardware dependant.
I want to take khadas tone board. I hope it works with it. an environmental correction is required in the car
Hi,
I’m having trouble using brutefir3 plugin with a PiFi Digi+ v1.0 card (HifiBerry Digi clone) on a RaspberryPi 3B+.
The card is this one: amazon.it/gp/product/B07FQY … UTF8&psc=1
When brutefir3 is disabled, my external DAC plays music with the right samplerate between 44.1 and 192 kHz depending on the source file. The DAC is connected through a coaxial cable to the PiFi card.
However, when I enable brutefir3 plugin, PiFi card only accepts 16 bit 44.1 kHz input.
Brutefir3 returns this error when I set a samplerate other than S16_LE in the plugin configuration page:
[code]volumio@volumio:~$ /bin/sh /usr/bin/brutefir /data/configuration/audio_interface/brutefir/volumio-brutefir-config
BruteFIR v1.0m (November 2013) © Anders Torger
Internal resolution is 64 bit floating point.
Creating 4 FFTW plans of size 16384…finished.
Warning: could not save wisdom:
could not open “/data/configuration/audio_interface/brutefir/brutefir_convolver” for writing: Permission denied.
Loading 2 coefficient sets…finished.
Realtime priorities are min = 2, usermax = 1, mid = 3 and max = 4.
Warning: no support for clock cycle counter on this platform.
Timers for benchmarking may be unreliable.
Filters in process 0: 0
Filters in process 1: 1
ALSA I/O: Could not set audio output parameters for “hw:1”:
Failed to set sample format to S24_LE: Invalid argument.
Failed to init output device.
Failed to initialise digital audio interfaces.[/code]
And this is the error when I try to set a samplerate different from 44.1 kHz:
[code]volumio@volumio:~$ /bin/sh /usr/bin/brutefir /data/configuration/audio_interface/brutefir/volumio-brutefir-config
BruteFIR v1.0m (November 2013) © Anders Torger
Internal resolution is 64 bit floating point.
Creating 4 FFTW plans of size 16384…finished.
Warning: could not save wisdom:
could not open “/data/configuration/audio_interface/brutefir/brutefir_convolver” for writing: Permission denied.
Loading 2 coefficient sets…finished.
Realtime priorities are min = 2, usermax = 1, mid = 3 and max = 4.
Warning: no support for clock cycle counter on this platform.
Timers for benchmarking may be unreliable.
Filters in process 0: 0
Filters in process 1: 1
ALSA I/O: Could not set audio input parameters for “hw:Loopback,1”:
Failed to set sample rate to 48000 Hz, device suggested 44100 Hz instead.
Failed to init input device.
Failed to initialise digital audio interfaces.[/code]
This is ALSA configuration through aplay:
volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 7: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 1/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 7: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Any suggestions?
Have you tried to set output format to S32_LE or S16_LE?
Note : you can’t change sample rate while playing a track.
Everything played through the plugin will be Resampled to the value set in the plugin.
Edit : sorry, I read to fast. You already test different format. Output format is hardware dependent.
Ok, I made some more tests, and I managed to set samplerate to 192 kHz.
However, Brutefir3 still refuses to work with S24_LE:
[code]volumio@volumio:~$ /bin/sh /usr/bin/brutefir /data/configuration/audio_interface/brutefir/volumio-brutefir-config
BruteFIR v1.0m (November 2013) (c) Anders Torger
Internal resolution is 64 bit floating point.
Creating 4 FFTW plans of size 65536…finished.
Warning: could not save wisdom:
could not open “/data/configuration/audio_interface/brutefir/brutefir_convolver” for writing: Permission denied.
Loading 2 coefficient sets…finished.
Realtime priorities are min = 2, usermax = 1, mid = 3 and max = 4.
Warning: no support for clock cycle counter on this platform.
Timers for benchmarking may be unreliable.
Filters in process 0: 0
Filters in process 1: 1
ALSA I/O: Could not set audio output parameters for “hw:1”:
Failed to set sample format to S24_LE: Invalid argument.
Failed to init output device.
Failed to initialise digital audio interfaces.[/code]
On the other hand, I can confirm that PiFi Digi+ card works correctly when I disable Brutefir3 and play files that are 24 bit:
volumio@volumio:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 16384
buffer_size: 65536
Any ideas?
Just for the records, I blacklisted snd_bcm2835 module so that PiFi Digi+ card is now the default one:
volumio@volumio:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi,
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi,
Default Audio Device
[...]
However, S24_LE option in brutefir3 is still not working…
[code]volumio@volumio:~$ /bin/sh /usr/bin/brutefir /data/configuration/audio_interface/brutefir/volumio-brutefir-config
BruteFIR v1.0m (November 2013) © Anders Torger
Internal resolution is 64 bit floating point.
Creating 4 FFTW plans of size 65536…finished.
Warning: could not save wisdom:
could not open “/data/configuration/audio_interface/brutefir/brutefir_convolver” for writing: Permission denied.
Loading 2 coefficient sets…finished.
Realtime priorities are min = 2, usermax = 1, mid = 3 and max = 4.
Warning: no support for clock cycle counter on this platform.
Timers for benchmarking may be unreliable.
Filters in process 0: 0
Filters in process 1: 1
ALSA I/O: Could not set audio output parameters for “hw:0”:
Failed to set sample format to S24_LE: Invalid argument.
Failed to init output device.
Failed to initialise digital audio interfaces.[/code]
WHYYYYY!!!
Weird…I’ll have a look. But I remember (not sure) a bug in brutefir about s24_le.
To be checked.
Edit: maybe ludd.ltu.se/~torger/brutefir.html#news
To verify your suggestion, I wanted to test ALSA bypassing my PiFi Digi card. So, I connected my DAC using a USB port. In this case, Brutefir3 plugin works like a charm at 24 bit 96 kHz, which is the maximum available for my DAC through USB.
volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 5: C1 [Cambridge AudioDAC100 USB 1], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
[...]
This is interesting:
volumio@volumio:~$ cat /proc/asound/card5/pcm0p/sub0/hw_param
cat: /proc/asound/card5/pcm0p/sub0/hw_param: No such file or directory
volumio@volumio:~$ cat /proc/asound/card5/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S24_3LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 32768
buffer_size: 174762
The format is S24_3LE instead of S24_LE, even though I set the latter in Brutefir3 plugin configuration page…
What do you think about this? Shall PiFi Digi card be configured using S24_3LE as well?
hello,
I made some test with a usb dac. Set in brutefir to S24_LE. It works. But if I do a cat /proc/asound/card4/pcm0p/sub0/hw_param
I get
access: RW_INTERLEAVED
format: S24_3LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 8192
buffer_size: 174762
…
but in brutefir, available format are
[code]:
"S8", signed 8 bit integer.
"S16_LE", signed 16 bit little endian integer.
"S16_BE", signed 16 bit big endian integer.
"S16_4LE", signed 16 bit little endian integer, stored in the high bits of 4 bytes.
"S16_4BE", signed 16 bit big endian integer, stored in the high bits of 4 bytes.
"S24_LE", signed 24 bit little endian integer.
"S24_BE", signed 24 bit big endian integer.
"S24_4LE", signed 24 bit little endian integer, stored in the high bits of 4 bytes.
"S24_4BE", signed 24 bit big endian integer, stored in the high bits of 4 bytes.
"S32_LE", signed 32 bit little endian integer.
"S32_BE", signed 32 bit big endian integer.
"FLOAT_LE", 32 bit little endian floating point.
"FLOAT_BE", 32 bit big endian floating point.
"FLOAT64_LE", 64 bit little endian floating point.
"FLOAT64_BE", 64 bit big endian floating point. [/code]
I test with S24_3LE not in the list and it works…
So I’m not sure how to solve it… but
What you can test is to edit the template config file of the plugin :
nano /data/plugins/audio_interface/brutefir/brutefir.conf.tmpl
then line 52 add a # to comment.
below add
sample: " sample: "S24_3LE";
save the file.
type
sudo journalctl -f
and check what happen when you save the settings in the plugin.
If not better, try other value in the list I gave.
Do you know how to determine hw capabilties? If it is possible, I could add an auto settings in the plugin.
Let me know.
Hi Balbuze,
thanks for your help.
I made some research and I discovered that S24_3LE is supported by ALSA. As far as I can understand, 24 bit audio through USB is always S24_3LE and ALSA makes the convertion automatically. This is why in our tests we set S24_LE in Brutefir3 configuration page and we had S24_3LE in output to our USB DACs.
I also discovered this “alsa-capabilities” script that makes a great job in recognizing ALSA device capabilities. Take a look here:
https://lacocina.nl/permalink-https-lacocina-nl-detect-alsa-output-capabilities
After you download it, remember to make it executable before usage. For example:
chmod 775 alsa-capabilities
I tested my DAC USB connection and it confirms what I just said:
[code]volumio@volumioold:~$ ./alsa-capabilities -l d -s
3) USB Audio Class Digital alsa audio output interface `hw:5,0’
- device name = C1
- interface name = USB Audio
- usb audio class = 2 - isochronous asynchronous
- character device = /dev/snd/pcmC5D0p
- samplerates (Hz) = S24_3LE:44100,48000,88200,96000
- monitor file = /proc/asound/card5/pcm0p/sub0/hw_params
- stream file = /proc/asound/card5/stream0 [/code]
As for my PiFi Digi card, I obtained the following output:
[code]volumio@volumio:~$ ./alsa-capabilities -l a -s
- Analog alsa audio output interface `hw:0,0’
- device name = sndrpihifiberry
- interface name = HifiBerry Digi HiFi wm8804-spdif-0
- usb audio class = (n/a)
- character device = /dev/snd/pcmC0D0p
- samplerates (Hz) = S16_LE:44100,48000,88200,96000,176400,192000
S24_LE:44100,48000,88200,96000,176400,192000 - monitor file = /proc/asound/card0/pcm0p/sub0/hw_params
- stream file = (n/a)
- Analog alsa audio output interface `hw:7,0’
- device name = Loopback
- interface name = Loopback PCM
- usb audio class = (n/a)
- character device = /dev/snd/pcmC7D0p
- samplerates (Hz) = S16_LE:44100,48000,88200,96000,176400,192000
S16_BE:44100,48000,88200,96000,176400,192000
S32_LE:44100,48000,88200,96000,176400,192000
S32_BE:44100,48000,88200,96000,176400,192000
FLOAT_LE:44100,48000,88200,96000,176400,192000
FLOAT_BE:44100,48000,88200,96000,176400,192000 - monitor file = /proc/asound/card7/pcm0p/sub0/hw_params
- stream file = (n/a)
- Analog alsa audio output interface `hw:7,1’
- device name = Loopback
- interface name = Loopback PCM
- usb audio class = (n/a)
- character device = /dev/snd/pcmC7D1p
- samplerates (Hz) = S16_LE:44100,48000,88200,96000,176400,192000
S16_BE:44100,48000,88200,96000,176400,192000
S32_LE:44100,48000,88200,96000,176400,192000
S32_BE:44100,48000,88200,96000,176400,192000
FLOAT_LE:44100,48000,88200,96000,176400,192000
FLOAT_BE:44100,48000,88200,96000,176400,192000 - monitor file = /proc/asound/card7/pcm1p/sub0/hw_params
- stream file = (n/a)[/code]
Apparently, the only format shared between PiFi Digi card and the loopback devices created by Brutefir is S16_LE. However, I’ll have more tests in the near future and I’ll let you know.
In the meanwhile, you might use alsa-capabilities script as a starting point for a Brutefir3 plugin upgrade. Please note that, on some devices, supported samplerates depend on the selected bit depth.
Bye!
By the way, I don’t understand…
My PiFi Digi card supports S24_LE natively:
[code]volumio@volumio:~$ ./alsa-capabilities -l a -s
- Analog alsa audio output interface `hw:0,0’
- device name = sndrpihifiberry
- interface name = HifiBerry Digi HiFi wm8804-spdif-0
- usb audio class = (n/a)
- character device = /dev/snd/pcmC0D0p
- samplerates (Hz) = S16_LE:44100,48000,88200,96000,176400,192000
S24_LE:44100,48000,88200,96000,176400,192000 - monitor file = /proc/asound/card0/pcm0p/sub0/hw_params
- stream file = (n/a) [/code]
Why S24_LE option in Brutefir3 plugin configuration page is not accepted?
…ok, this is the reason why: from the version quoted here below on, Brutefir ALWAYS maps S24_LE to S24_3LE!!!
I also found where this happens in the code (file bfio_alsa.c)
[...]
case BF_SAMPLE_FORMAT_S24_LE:
format = SND_PCM_FORMAT_S24_3LE;
*sample_size = 3;
break;
case BF_SAMPLE_FORMAT_S24_BE:
format = SND_PCM_FORMAT_S24_3BE;
*sample_size = 3;
break;
[...]
Given what I said before about USB DACs, I guess that Brutefir’s author tested his work using only the USB port…
I also guess that I have to create a custom version of Brutefir for my purposes…
Ok, I did it without recompiling Brutefir!
I modified manually the files config.json and volumio-brutefir-config in /data/configuration/audio_interface/brutefir/ folder (not /data/plugins/audio_interface/brutefir/brutefir.conf.tmp as you suggested). For config.json I set “output_format” to S24_4LE, whereas for volumio-brutefir-config I set “sample” value in the “output” section to S24_4LE as well. And now, my PiFi Digi card is playing 24 bit 192 kHz with Brutefir3 plugin enabled: :mrgreen:
volumio@volumio:/proc/asound/card0/pcm0p/sub0$ cat hw_params
access: RW_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 32768
buffer_size: 65536
The value S24_4LE comes from Brutefir source file bfio_alsa.c:
case BF_SAMPLE_FORMAT_S24_LE:
format = SND_PCM_FORMAT_S24_3LE;
*sample_size = 3;
break;
case BF_SAMPLE_FORMAT_S24_BE:
format = SND_PCM_FORMAT_S24_3BE;
*sample_size = 3;
break;
case BF_SAMPLE_FORMAT_S24_4LE:
format = SND_PCM_FORMAT_S24_LE;
*sample_size = 4;
break;
case BF_SAMPLE_FORMAT_S24_4BE:
format = SND_PCM_FORMAT_S24_BE;
*sample_size = 4;
break;
As you can see, it maps S24_XX to S24_3XX, and also S24_4XX to S24_XX. I don’t know why the programmer did so, but it is clear that if I want S24_LE I have to feed S24_4LE instead. That’s what I just did and it works!
To sum up, I think that you should upgrade Brutefir3 plugin configuration page by mapping hardware settings (obtained using “alsa-capabilities” script as a starting point) according to the transformations made by bfio_alsa.c file.
Let me know when you are done, as I’m keen to test the next version of your plugin!
but simple rate 192k what does it mean if you play native dsd audio there are quality losses? or even you have to set volume resempler to 192 k? sorry for my ignorance. I have not bought any dac yet because I want to be safe
I had a similar issue with Allo Digione. Brutefir plugin did not play when I selected S24_LE in the plugin options.
While the DigiOne and connected DAC also support 24-bit, the plugin/brutefir only played with S16_LE.
After reading this mail topic, I added the option S24_4LE to the Brutefir plugin config file (UIConfig.json).
No the option S24_4LE is available in the plugin screen and the DigiOne plays 24-bit when selected!
First, thank you so much for your work getting BruteFIR/DRC working on Volumio! I just recently picked up a pi3b+ to try out Volumio before I purchased a miniDSP SHD (which I wanted for the Dirac DRC). Surprise surprise, it turns out I can also have DRC with Pi 3B+!!
Anyways, this is probably a dumb question, but I’m going to ask for sanity check! Do the test tones/pink noise tones in the plug-in run through the filters? i.e. can I use the in-plugin tones to do before and after comparisons of the filters I apply?
Thanks so much again!
verkion
Sent from my SM-N950W using Tapatalk