Consistent "Error opening ALSA device" with Pi/Allo Boss DAC

On multiple Volumio installations, running a variety of Volumio builds, I periodically get an error after some days or hours of use:

This occurs with Allo Boss DAC hardware, and Raspberry Pi (various versions including Pi 3 and Zero).

Error Failed to open "alsa" [alsa]; Error opening ALSA device "hw:1,0"; snd_pcm_hw_params() failed: Remote I/O error

When this happens, I can no longer play anything.

Restarting the device does not help - I have to power it down first, disconnecting it from the PSU. After that, all works fine again, until the next time.

I’m currently on 2.522, though as I said, this has happened with multiple other builds.

It seems to me that the issue is that the Allo Boss DAC needs to be restarted, which requires disconnecting the power. Is there a way to send a command to it to restart to test this theory?

Help! :astonished: This is also happening to me, ever since I upgraded to the latest Volumio. My hardware seems to be the same as the OP’s…
RPI 3 B+ and an Allo Boss. All seemed to work fine until I applied the upgrade to 2.572 last week. :frowning:

I have the same problem. I think it’s a power supply issue. I will try today to increase the voltage of power supply to 5.8v and see if this helps.

The problem is still here. Seems that is not related to power supply. I really dont understand why allo boss dac randomly stops. I don’t have this issue with pHat dac. I lost one day trying to solve the problem even with separated power supply (lab power supply) I’m thinking seriously to return it.

All,

PI 3B+ & ALLO BOSS DAC+ rpi display, Volumio 2.586 June 4, 18:28:14

I dont believe its a supply isue.
I used a lab-supply (Delta electronics, NL, and R&S HMP series) that are really flat/no noise, linear endstage.
Second: Not using the USB connector to supply (this is causing quite some voltage drop), instead directly soldered
on the PI near the fuse.
Supply on board (measured on DAC header) is 5.04V & is rock solid (verified with a scope :sunglasses: )
(With the 5.2V adapter you get 5.07V onboard, and as it is a SMPS, most likely more noise as well)

The direct soldering is quite reccomended way over using the crappy USB connector.

Back on topic:
The PCM5122 DAC is used in I2C mode, and in master mode.

Im still digging trough the datasheet of the PCM5122, but there is a statement that it can enter sleep/shutdown mode when no CLK is detected, and other conditions.

As in some cases it works, it looks like the device is adressed on I2C, but not able to answer in time/missing the start telegram/or giving crappy data.
(Its indeed a best guess, but I suspect it is in a sleep mode)
As a result the ALSA table remains empty, so no playback.

The following pin is used to mute (have to trust datasheet Allo) the DAC: GPIO6/DMUTE, but maybe it does MORE then we know of.
So its worth to have a look in the adressing script that wakes up the DAC.
WHEN these GPIO is adressed --> next which value it has (before/after)
WHEN the clocks are set etc
Specific messages toward the DAC in I2C
And… the timing between it, as this is essential for a proper INIT of the DAC
(If someone can digg that up, as Im not that good in Linux yet :slight_smile:)

In the comming days (when time permits) will have a better look with a logic analyser and capture the whole communication train from startup.

Second option:
Maybe someone can FORCE/FAKE a table entry as posted above, and just adress the DAC…
Might even work as well.

===

The nice thing is, I DID have it working a while, and for no reason, no setup changes (yes, I do off it at night) it got stuck in the “alsa hw error”…
But when it works, the sound is really something!!
So it is worth the effort in getting it properly running again.

Regards,
J

Here others with the same issue.
Hence the idea to have a file that just “says/fakes” the alsa stuff, so the PI starts just talking to the DAC, if its there or not…

raspberrypi.stackexchange.com/q … -dac-board

==== copied from above link===

The problem

After a few days without issue, attempts to play audio will produce no sound (though the software seems to think it is playing) and an error is reported in the Volumio interface:

Error
Failed to open “alsa” [alsa]; Failed to open ALSA device “hw:1,0”:
No such file or directory

Everything else in all other respects appears to work as expected.

In order to get it working again, the unit needs to be powered down (not just restarted - the power needs to be disconnected completely) and after restarting, it will once again work for a few days. This almost always works.
Further information

Speculation on the Volumio forums suggest that this is related to a power issue, and that would make sense to me - possibly the DAC board enters a fault state and needs to be powered down before it will work again.

When the unit is in its working state, the sudo i2cdetect -y 1 and aplay -l commands have the following output:

~$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – UU – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

$ 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: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

When in the fault state, the output is:

$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

$ 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

Hi all

I send this topic directly to allo. Maybe they have somenthing to say…

All,

Here the result of the i2c scan…
The bus looks very clean, no spurious spikes etc, and I did several reboots to confirm data consistency/communication: OK
There is only one item addressed: 0x4D --> guess this is the display.

It seems that the DAC is never ever addressed at all :cry:
(not when changing settings to I2S DAC, not when pressed “save”, I armed the analyzer for single capture, and I only see this display communication)

Based on this, and a tiny detail I recall from last week, i believe it is some kind of config file that gets messed up, so the PI does not even know
it has to communicate with the DAC.

I previously had it in I2S DAC configuration, and it was NOT working.
Next, I checked there was a update, so…pls do so… and hit the update button.
Next it rebooted: NO POWERCYCLE !!!..

Guess what: It worked flawlessly after the reboot…
Next… I turned it off nicely at the end of day, with the shutdown button.
After that, same issue again.

Based on this, the working I2C bus, I start to believe it is a system file that somehow gets corrupted on shutdown.
(as it also complains about “ALSA no such file or…”
Might be my issue, but I never understood why on shutdown you want to re-save all kind of system settings, which where good in the first place…
Just save it, when you hit save… after that, leave it. And ONLY recover files, when specifically asked for.

This also makes platforms way more robust for instant power-off
(might need to get this to Volumio’s attention: " a save all settings" button)

A good test would be:
Create a test image, with correct ALLO BOSS settings, and write protect files, or, ensure they are restored from a different file name upon boot.
Next, we can check if this works.

Someone more Linux experienced might step up to help here :laughing:

Attached, 2 pictures of the i2c during boot
Volumio_I2C_during_boot_2nd_boot.jpg
Volumio_I2C_during_boot.jpg

The answer from allo:

"Yes this result shows the DAC i2c detection not happening.

May be related to specific DAC hardware problem, Did you tried with different boss hardware ?"

Yes, I tried two. Seems that allo sels crappy stuff.
I’m verry disappointed.

I don’t know why I missed this discussion… Sorry about that.
My speculation: something in the DAC goes wrong after few time and the only way to solve such a “freeze” is powering it off.
I will sync with Allo to hear what they think

It usually happens to me, it’s a Volumio SimpleEqualizer problem, I deactivate it, Allo Boss restores it as DAC and returns to normal.

I don’t use any eq plugin. Yesterday I prepared a fresh install of volumio. Same problem :frowning:

All…

Significantly narrowing the issue:

Downloaded 2 Volumio IMG files, (latest and an older one)
Burned on flash…

BOTH work fine, right out of the box, nicely initializing the BOSS-DAC.

The main difference is:
I did NOT activate:

  • The touchscreen plugin
  • The power switch plugin
    Just use it with a win-laptop remotely.

Next, I tried installing the plugins, to see where it goes wrong…

:sunglasses: :sunglasses:
First one is a hit: the touchscreen plugin…very surprising.

It display’s a warning that it is not recommended with PI 3B+, but… it did work perfectly before…
Next, it gets always stuck on line “21 OTHER” with fonts or so…
Need to force it to reboot to get out of this situation.
After reboot, the GUI is NOT displayed, even when the plugin is set active.
(Only the Volumio login, which still perfectly works with external keyboard)

Important remark :exclamation: :exclamation: :exclamation: :exclamation: :
The install says V1.00, while the plugin is V1.01 (maybe it installs an old version from repository??)

Puzzled for a while, why now the display suddenly does not work…

Then the “AHA”effect… : :smiley:
Initially, I run the PI & display without the BOSS-DAC… (as a temporary solution to play,I used the pi output)

At that time, I installed display, remote pi, auto start plugin, and this worked fine…
After that, my BOSS-DAC arrived, and I plugged it in…
And problems started…

I recall very often a message on the screen after reboot, that chromium asks for “restore”…
A clear indication that the nice shutdown I perform is not executed correctly :exclamation:

This is quite a pity, as this native 7” PI display is a very important & positive contribution to the “WAF-factor”
(The “Wife Acceptance Factor”, for all audio equipment in the living room)

@ Volumio:
From my electronic engineering background, it cant be too hard to fix this natively supported PI display?
As you already display the native Volumio login on it by default.
No need to be fancy or so, just the basic GUI & tap… to pause and play it, search for music

It seems a conflict on I2C, and or something that chromium kills on shutdown.
(unsure what this chromium is doing anyway for the display/audio player)

Be aware, that it DID work flawlessly for a while with display, if the display plugin is installed first, THEN the DAC installation.
Only after a few reboots, chromium restore messages, the ALSA trouble starts…

Hope this analysis helps to fix it for others too.

Regards from Taiwan.

Just thought I’d chime in and say mine’s fine.
I have the Pi3 with the Allo Boss in the Allo Boss aluminium case and the Raspberry Pi 2.5A power supply.
Solid as a rock.

Maybe start by disabling any extraneous addons installed on your Volumio installation and check that your power supply can supply at least 2.5A or if powering the Boss separately 2.5A to the Pi & 3A to the Boss.

Some real numbers for current consumption.

RPI 3B+ , 7" touch display, ALLO-BOSS DAC

ON:
1.4A peak
1.2A avg

Off:
200mA

The reason why 2.5A supplies are “needed” is that they are usually designed for peak 2.5A, so 1.5A continues they will survive… :laughing:
A add on DAC will consume something, but this is very little compared to pi… (order of magnitude of 100mA)
So arranging supplies in excess of 2A for a DAC is useless, low impedance and very very low noise is key :exclamation:

Regards,

Today I remove the 7inch display and Allo boss dac seems to work well. This is not a power supply problem (I have plenty of power). The problem is somewhere on software side. I hope that will be solved in the future. Until then…no dispaly :frowning:

I have run into the same problem and “solution” as costi_n here.
Is this still happening for others? Has a workaround/patch been found?

  • Raspberry Pi 3 Model B Rev 1.2
  • Raspberry Pi 3 7" touchscreen display
  • Allo Boss 1.2
  • Volumio 3.396
  • Kernel: 5.10.92-v7+
  • Touch Display Plugin 3.3.5

while display is connected and on the DAC will sometimes come on fully (power & config lights on) and may play a song or the Volumio startup noise. It will then lose connection - only power on LED is on, and playing web radio gives the same ALSA error message shown here. Disconnecting display and disabling the plugin allows DAC to work flawlessly again.

I still face the same problem often. Sometimes, if I disable the DAC and play through headphones and then enable the DAC back and reboot the system, it works perfectly.