05-08-2025, 08:27 PM
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:
to:
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:
to:
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:
to:
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.
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') {
Code:
if (0 === strpos($_SESSION['i2soverlay'], 'hifiberry-dacplusadc')) {
In the same script, lines 146-147 were changed from:
Code:
if ($_SESSION['i2sdevice'] == 'HiFiBerry DAC+ ADC') {
sysCmd('alsaloop > /dev/null 2>&1 &');
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 inp-config.php, line 38 was changed from:
Code:
if ($_SESSION['i2sdevice'] == 'HiFiBerry DAC+ ADC') {
Code:
// Either version of HiFiBerry DAC+ADC
if (0 === strpos($_SESSION['i2soverlay'], 'hifiberry-dacplusadc')) {
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.