elmesito Posted February 21, 2019 Posted February 21, 2019 This is my first post, however, I have been an avid reader of this forum for a few years. Now I have come to the stage where I cannot find a solution searching so I had to sign up. I have been fighting on this issue for a few days now, and keep on having the same issue. I am not a linux guru, but I know my way around the basics, and ignorant on the rest. My setup is: Board OrangePi Zero 256MB 16GB micro SD card USB speaker 2.4A USB power supply Ethernet connection USB UART console. ARMBIAN 5.73 stable Ubuntu 18.04.2 LTS 4.19.20-sunxi What I am trying to achieve: I want to play a mp3 files from a playlist for a set time (20-30 minutes) after a button has been pushed. What I am doing: Testing that one mp3 file can play What I have done: I have put the Armbian image on the micro sd card let it boot change root password, etc... rebooted updated/upgraded system run cat /proc/asound/cards, which returns my USB speaker and nothing else edit the /etc/asound.conf file and add the following lines: pcm.!default { type hw card 1 } ctl.!default { type hw card 1 } save and reboot log in again run cat /proc/asound/cards, which returns --- no soundcards --- WTF! clear the /etc/asound.conf file reboot and same result, regardless of purging alsa and reinstalling it. What am I doing wrong? I have gone through the process quite a few times, removing any unnecessary steps. I have tested it playing mp3 files with aplay, and it did work like a charm, but I haven't had such luck since. I have tried pulseaudio, but that is a huge can of worms, which just got worse and worse and never worked. This is really frustrating, and I am getting to the stage where I am going to test the performance of the Opi Zero as a Frisbee. I will probably have better luck. Thank you for reading this far, and I appreciate if you can reply with some idea of what I am doing wrong.
guidol Posted February 22, 2019 Posted February 22, 2019 13 hours ago, elmesito said: What I have done: run cat /proc/asound/cards, which returns my USB speaker and nothing else edit the /etc/asound.conf file and add the following lines: pcm.!default { type hw card 1 } ctl.!default { type hw card 1 } run cat /proc/asound/cards, which returns --- no soundcards --- WTF! clear the /etc/asound.conf file reboot and same result, regardless of purging alsa and reinstalling it. because alsa is normally installed I do install additionally "alsa-utils". With that I use "aplay -l" to display the soundcards and their numbers. When you got "no soundcard" after boot do a "dmesg -w" and reconnect the USB-Speaker to see if it is recognized or what error-message will occur. Also check the USB-Bus with "lsusb" if your USB-Speaker is recognized. For verification you could also activate the internal soundcard in armbian-config -> system - > hardware (analog-audio) then reboot and check if there is now a soundcard and which number they have. I never got a good usage of pulseaudio - for me alsa allways did work better.
elmesito Posted February 22, 2019 Author Posted February 22, 2019 Guidold, thank you for your kind reply and suggestions. I have installed alsa-utils on previous occasions, but it didn't really make much difference in terms of soundcards disappearing. aplay -l returns not soundcards even after enabling the analog-codec, in fact that was on of the sanity checks I did from day one. It always shows both, until both vanish. lsusb doesn't change when the usb speaker stops working. dmesg -w will list the USB device being unplugged, however when I plug it in the system freezes. I wonder if it is a current surge that makes the voltage drop, but that is a separate issue. Considering the both soundcards just vanish, even after reboots, I am keen on believing that alsa/linux sound are to blame, however I still cannot understand why, a minute works and the next just vanishes, and stays dead even after reboots, next step is to try with another USB soundcard and see if the current consumption of the speaker causes the issues. I would be surprised by that, because the power supply is suitable large, and the only reason for a voltage drop, would be because of a bad PCB layout. Another option is to try use the speaker through a self-powered USB hub. Any other ideas are welcome
guidol Posted February 22, 2019 Posted February 22, 2019 5 minutes ago, elmesito said: next step is to try with another USB soundcard and see if the current consumption of the speaker causes the issues. I would be surprised by that, because the power supply is suitable large, and the only reason for a voltage drop, would be because of a bad PCB layout. Another option is to try use the speaker through a self-powered USB hub. Any other ideas are welcome yes- a normal USB-Soundcard would be a test. 2.4A sounds fine, but maybe it isnt the power-supply but a bad (thin) USB-cable - so the full power would come to the board. Try again with a highpower-USB-cable. I got many (5-6) SBCs on a ANKER-Multi-USB-Poweroutlet and didnt got any problems, also using a normal USB-Soundcard or USB-TTL-RS232. Maybe the amplifier in the USB-Box (or cargeable battery) needs to much power? AND - as we wish from other people with a problem: Please do a "armbianmonitor -u" and write us the link here, so that we can read the config of your board and the logs from booting
elmesito Posted March 1, 2019 Author Posted March 1, 2019 Okay, I have finally had the time to test a better power cable, but without any change in terms of results. I noticed that if I run a apt purge alsa* and then install again alsa-base and alsa-utils, both cards show up again. when I change asound.conf and reboot, all works beatifully, but when I reboot again all cards vanish. here is the output of armbian-monitor -u http://ix.io/1Ckr
Recommended Posts