![]() |
ALSA error - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: ALSA error (/showthread.php?tid=4105) |
RE: ALSA error - Steven Crook - 08-18-2021 (08-18-2021, 11:23 AM)Tim Curtis Wrote: With the Pi on do you ever switch your DAC off or change the input? I always turn the DAC off between sessions, always have done. The DAC boots slow-ish siting there thinking about things for a few seconds before it decides it's got a good input, then there's a tik noise from an internal relay and music flows. It appears that, once it's in this error state, there's no automatic recovery. At some point today I'll power everything down, and be a bit more methodical on what I do and when going from startup to playback. Perhaps a pattern will emerge. I'll let you know. RE: ALSA error - Steven Crook - 08-18-2021 1. Turned off DAC, PI continues working, I can play tracks (into nothing) 2. Shutdown PI, turned off power, waited 30 secs, turned on PI, started a track playing on PI, turned on DAC and music played once DAC booted. So nothing obviously wrong. I'll continue to play, but I suspect this is going to be a waiting game for the problem to reoccur. RE: ALSA error - Steven Crook - 10-06-2021 Today I've restarted Moode 10 times with no change. MPD config continued to show DAC as unavailable/switched off. I left the DAC switched on and with the USB input selected. I repeatedly changed MPD output device, saved MPD settings over a period of about 20 minutes.
I have no idea why Moode could suddenly see the DAC. Is there anything I can add in logging that'll explain what's happening over MPD/USB? RE: ALSA error - Tim Curtis - 10-06-2021 Not really. Normally after a USB audio device is plugged in and configured in MPD Config it can be unplugged or turned off then plugged back in or turned on and Linux/ALSA will simply re-recognize the device after a brief period of time. The MPD configuration for USB audio devices is persistent and thus no need to redo MPD Config. In your case it appears that for this particular audio device after turning it back on Linux/ALSA does not "see it". This would suggest some sort of hardware or USB cable issue or some type of incompatibility between the particular audio device and Linux/ALSA. RE: ALSA error - TheOldPresbyope - 10-06-2021 Schiit makes quite a fuss about its proprietary Unison USB interface. I wonder if other Schiit DAC users have seen similar issues with Linux ALSA. Regards, Kent RE: ALSA error - Steven Crook - 10-07-2021 I've tried several different cables and there's no difference in behaviour. Just had another try today and it's definitely a thing. Started Moode and it thinks the DAC is offline. Switched to HDMI + restart, DAC disappears from list, and two further restarts of Moode and on the second the DAC is detected. Seems to me that something is only periodically receptive to making a USB connection, as if there's a timeout that has to complete. I suspect the DAC as that's the thing that stay on during Moode restarts. I've been in the habit of switching off the DAC before I shut Moode down. I'll leave the DAC on, shut Moode down, then turn the DAC off. Unison? My Gungnir is a few years old, and is running Schiit Gen 5 I think. Thing is though, I've been running Moode OK for some time and all of these connection problems started when I upgraded from the last 6.* to 7.0. Not saying it's Moode's fault, but that clearly there's been a shift in USB handling somewhere in the OS that's provoking something in the DAC. Or perhaps the DAC has developed a fault... I'll run a couple more tests and then contact Schiit to see if they've got any sage advice. RE: ALSA error - TheOldPresbyope - 10-07-2021 @Steven Crook Remember that all the audio device detection, connection, and communication occurs in the Linux kernel, its drivers, and the Advanced Linux Sound Architecture (ALSA) layer. Quote:all of these connection problems started when I upgraded from the last 6.* to 7.0. Aha, and if you read the moOde release notes (/var/www/relnotes.txt) you'll see this snippet: Code: ################################################################################ My experience with manufacturers is that when you merely name a specific Linux-based player they immediately say "talk to the player developer". You need to confirm with Schiit that its Gen5 USB interface works with these versions of RaspiOS and kernel. For reference, RaspiOS 10.6 is based on Debian 10.6 and both are codenamed Buster. Regards, Kent PS - there's plenty of legwork you could do from the command line, for example reading the output of the dmesg command (or reading the /var/log/kern.log file) for the case when the DAC is detected during boot and also for the case when the DAC is not detected. Here's examples with my Khadas Tone1 USB DAC (firmware updated from original release) Code: pi@rpi4b2:~ $ dmesg Note the "USB disconnect" line. There seems to be a repeating cycle of discovery and disconnection before things settle down. I don't know why (perhaps it's a little starved for power?). The same pattern is repeated in the kern.log file but with full date/time stamp. Once this discovery and connection is done, the USB DAC should show up in the summary output from the lsusb command. As well, various audio related endpoints should show up in its verbose mode. Again, the Khadas Tone1 (note the firmware dev didn't bother to have the interface announce itself by name in the summary line; eg, assigned no string value to the idVendor and idProduct parameters) Code: # Show the detected USB devices And then we're off to aplay and other familiar commands. RE: ALSA error - Steven Crook - 10-09-2021 That's a lot to think about. I'll try looking tomorrow when it's going to boot and have the device error and I can see what dmesg and lsusb have to say... One thing. I have Moode and the DAC talking happily. I power off the DAC. Change the output device to Headphones. Shut down Moode and unplug power. Start Moode. On start DAC is still in the list of devices though the DAC is powered off. I start the DAC and when it's stable I hear the relay click indicating it's chatting to Moode, though Headphones is still the output device. Change the output device to DAC, restart MPD and it plays. Which makes me wonder why this is different to shutdown/power off at night and restart in the morning. Is the OS operating a cache of devices and timing them out? So, it's tripped on boot in the morning because it's several hours since it last saw the device. RE: ALSA error - Tim Curtis - 10-09-2021 Discovered USB devices are kept in the MPD list to allow switching between HDMI, Headphones and USB, and also if the USB device happens to be unplugged or powered off it can be plugged back in or powered on and its config will be intact. This works perfectly fine with most USB Audio devices but with your particular device there appears to be a hardware or cable issue that is causing the device to intermittently be unrecognized by Linux/ALSA after power up. RE: ALSA error - Steven Crook - 10-17-2021 (10-09-2021, 08:49 PM)Tim Curtis Wrote: Discovered USB devices are kept in the MPD list to allow switching between HDMI, Headphones and USB, and also if the USB device happens to be unplugged or powered off it can be plugged back in or powered on and its config will be intact. The MPD cache is what I'd assumed to be the case. I think a cable fault is really unlikely, I've tried three different cables, it makes no difference. Hardware faults tend to be either there or not, and I'm not moving anything so I doubt it's a loose connection. I'd wondered if there was more up-to-date firmware that would fix issues in the USB subsystem, but AFAIKT the firmware comes with the distribution. That so? The fact that the DAC and Pi can talk happily makes me think it's a software issue either in Alsa/MPD or DAC. Protocol issues in USB comms. But beyond that I really don't know. I still don't have enough to take to Schiit and have them spend time on it, particularly when they've got a shiny new USB interface they can say is flawless. I spent a few hours going round in circles with Alsa trying to see if there were diagnostics I could get out of it for its chatting over USB. Eventually I decided I'd put in enough time and effort, and there were other, more enjoyable things I could be doing. Like listening to music. So I dug up the HiFi Berry Digi+ I've had hidden in a box. It works of course. But not being able to use USB still irks me ![]() Anyway. I'll try USB as each new release and will post back here if things change. I have plans to order a couple more Pi and I'll try those too. If I discover anything useful I'll post back here. |