Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Input from HiFiBerry DAC2 ADC Pro
#4
Hello Tim,

I am happy to report that analog input works fine with the HiFiBerry DAC2 ADC PRO.

Note changes in HiFiBerry drivers are documented here: Change in HiFiBerry drivers. My understanding is that their device name is always 'sndrpihifiberry'.

In audio.php, line 113 was changed from:
Code:
if ($_SESSION['i2sdevice'] == 'HiFiBerry DAC+ ADC') {
to:
Code:
if (0 === strpos($_SESSION['i2soverlay'], 'hifiberry-dacplusadc')) {
in order to support those cards with an ADC port. The new devices names are not in the 'Named I2S device' list.

In the same script, lines 146-147 were changed from:
Code:
        if ($_SESSION['i2sdevice'] == 'HiFiBerry DAC+ ADC') {
            sysCmd('alsaloop > /dev/null 2>&1 &');
to:
Code:
        if (0 === strpos($_SESSION['i2soverlay'], 'hifiberry-dacplusadc')) {
            sysCmd('alsaloop -C hw:sndrpihifiberry,0 -P hw:sndrpihifiberry,0 -t 50000 > /dev/null 2>&1 &');
in order to support a numbered card. I am surprised the original code produced any output at all.

In inp-config.php, line 38 was changed from:
Code:
if ($_SESSION['i2sdevice'] == 'HiFiBerry DAC+ ADC') {
to:
Code:
// Either version of HiFiBerry DAC+ADC
if (0 === strpos($_SESSION['i2soverlay'], 'hifiberry-dacplusadc')) {
in order to allow the input selector in the configuration page.

I can switch from analog input to MPD without any issue. Actual capture parameters (frequency, bit depth, etc.) are of no concern at this time. I probably should specify 32 bits, 2 channels, 48/96 kHz in real life but right now, I just wanted this to work.

Thank you for your support.
Reply


Messages In This Thread
Input from HiFiBerry DAC2 ADC Pro - by scaronpce - 05-06-2025, 07:26 PM
RE: Input from HiFiBerry DAC2 ADC Pro - by scaronpce - 05-08-2025, 08:27 PM

Forum Jump: