Play sound on USB audio dongle
I would like to stream radio stations from the Internet on the satellite receiver when it is in standby mode and the TV is turned off. This receiver is based on Ubuntu/Debian. The operation of the satellite functions is handled by the Enigma 2 software.
The receiver is built on a 4 core ARMv7 and there is 4.6 GB of free Flash and 0.5 GB of free RAM. CPU usage is also low. The goal is to stream radio station via plugged USB sound dongle. USB audio dongle is properly recognized by the system of Sat receiver (type Zgemma H9 Combo): Code:
root@zegmma-p:/# aplay -l Code:
root@zegmma-p:/# cat /proc/asound/cards It very easy to control it such streaming via home automation suite like Domoticz, and thats the way I want to do. It works perfectly on Raspberry Pi. So my question is. What command and syntax I have to use to playback (using mpg123 for example) to play mp3 file or stream from Internet? |
What are you using for input to the USB dongle? Is it truly both a sink and source, meaning does it accept input as well as output via headphones? I know nothing about that device, so I need more information to even be sure exactly what you're doing.
|
1 Attachment(s)
Sorry for too perfunctory description of the situation.
This dongle has audio input (dedicated for microphone) and output dedicated for stereo headphones. Hardware input will not be used in this project. Output will be connected to AUX input of soundbar. The input for USB dongle audio output should be a stream taken from internet. In other post I wrote about streaming radio station via Bluetooth from Raspberry Pi to soundbar. It works using script like below (part of it): Code:
****** But the problem is BT and WiFi interference, because of huge amount of WiFi devices (the sound is distorted very often). So my decision to use free resources in Linux based Sat receiver and connect soundbar using cable (and audio USB dongle). As You can see on attached picture, "alsamixer" of Sat receiver shows correctly controls for this USB dongle connected. So my question is. How to modify the script above to playback stream not via Bluetooth but via this audio dongle to headphone output? It is strange, however, that there is no "alsa" command/daemon in the FW of the Sat receiver. It is also not in the default repository. But the sound through the HDMI output is of course played by the TV while receiving the Sat signals. Look, what concerning "alsa" is installed on Sat receiver Code:
root@zegmma-p:~# opkg list-installed|grep alsa Code:
root@zegmma-p:~# opkg list|grep alsa |
I haven't dealt with alsa directly in a long time. I use pulseaudio, which should make it easy enough to configure the inputs and outputs. You need both pulseaudio and pavucontrol installed. The latter is the volume control applet, in which you configure everything. It should be mostly self-explanatory.
|
Quote:
|
3 Attachment(s)
Quote:
Nooelec NESDR SMArt v4 SDR - Premium RTL-SDR w/ Aluminum Enclosure, 0.5PPM TCXO, SMA Input. RTL2832U & R820T2-Based Software Defined Radio Easy to install the s/w on linux, dc-light frequency coverage All available on Amazon |
OK, I didn't realize there is no GUI installed. I would have to spend time researching alsa, because I don't remember much about it.
What you have should work. Do you have the headphone jack on the USB dongle connected to the soundbar? Can you hear the radio station through earphones? What inputs does the soundbar have? I'm not familiar with current Raspberry Pi models. Does it have HDMI output? |
Quote:
|
Quote:
Quote:
BTW. The model of RPi I have, has no video chip too (nano version dedicated for control). Quote:
Quote:
Streaming radio stations is something like add-on to Sat receiver, utilizing free flash/RAM/CPU resources. BTW. As I wrote, At this moment it is possible to playback from RPi via BT to soundbar, but the sound is distorted because of WiFi interference. Because of layout of electronic devices in my house, to connect RPi and soundbar over cable, it should be necessary to use 6-7 m of cable (dangerous and distortion possibility), drill hole in the wall and so on. But using Sat receiver instead RPi it is needed only 0,5m cable jack-jack. |
OK, perhaps the trouble is that I don't understand exactly what you mean by "linux satellite receiver". Is this separate hardware, a computer, or what? I think I'm beyond the limits of my competency here.
|
Quote:
All works under regular Ubuntu/Debian (core version). The difference is that there is busybox instead regular shell set of commands. For receiving and playback TV channel on TV-set there is installed application named Enigma2 (Open ATV project). But ones more. You have to look at this unit as regular Ubuntu/Debian computer. BTW. It is possible to buy Satellite USB dongle, plug to desktop PC or laptop and install Enigma2 and watch Sat channels. |
alsa is fine by itself. Most media players let you explicitly state what device to use. You can also use the .asoundrc to override defaults (HW:0,0).
FILE: $HOME/.asoundrc Code:
defaults.ctl.card 2 |
I agree alsa should work. I've just forgotten almost everything I ever knew about it from disuse. And I have little incentive to relearn it. Thanks for the updates. As I said, I'm not going to be much help.
|
Quote:
http://zgemma.org/zgemma-h9-combo.html |
Quote:
What concerning actual configuration look at outputs below: Code:
root@zegmma-p:~# cat /etc/asound.conf |
All times are GMT -5. The time now is 12:55 AM. |