Tutorial: Raspberry Pi as Music Server, DSP, and Crossover

You can try a simple input to output. I would definitely specify the audio format. I am assuming here that your USB card can do full duplex (simultaneous I/O) and can operate at 44.1k, 16 bit:
Code:
ecasound  -f:16,2,44100 -i:alsahw,0,0 -o:alsahw,0,0
The above command assumes your USB dongle is card 0. The card is the first digit after alsahw. Until you post the output from aplay -l and arecord -l I cannot tell for sure which card number your USB dongle is being assigned.

If the above is working you should be able to feed in audio and listen to it via the dongle. Again, this assumed the dongle is capable of full duplex IO.
 
Hi Charlie. Thanks for posting. I tried this command ecasound -i:alsahw,0,0 -o:alshw,0,0
and ecasound loaded up like normal but all I got was angry buzzing.

I am uncertain if the USB card, running through the Odroid is full duplex. The sound card is a good one that runs flawlessly on Windows and Ubuntu when plugged into a regular PC. That said, I am uncertain that the Odroid supports full duplex USB. I have been messing around with configurations and made the usb card be 0 by inserting into the alsa-base.conf the command to make usb index=0. I get the usb card as zero when I run aplay -l but have two default cards when I run aplay -L. The onboard HDMI and the USB. So, I am going to reinstall and start over as I believe I have mucked things up I think.
 
Hi all,

I have been enthusiastically working with an Odroid C1+ and now a C2 trying to get an implementation that will allow me use my much loved Hafler DH-110 and B & O Beogram turntable through the DSP system. I am using a derivation of Richard Taylor's ecasound-based system.

For reasons beyond my skill level I cannot get the USB card I am using to perform analog in/DSP/analog out. The system works great if I have digital files already on the SD card but I get nothing but nothing or static if I try to input a line level signal to the USB card.

I am beginning to wonder if it is a hardware problem in how they implement USB?

Has anyone here successfully done the analog in/DSP/analog out?

On another site, which memory fails me now (maybe this one), a poster said he could use mpd from an analog input. Never explained how though. I am fine on the ecasound, routing to multiple outputs part but am flummoxed by the analog in to the USB card.

Color me frustrated.

James

Might have been me....

I use a CM6206LX 5.1 soundcard.

When I was doing it the path was....
1) Analog input through the "line in" socket from source.
2) MPD playing "line in" as the source. In my case "hd:1,0".
3) MPD outputs to ALSA "plug" device defined in asound.conf, consisting of LADSPA filters for crossover, level matching and BSC. I use Charlie's ACDf.
4) asound.conf directs output to device "hd:1,0".

You can use ARECORD to troubleshoot audio input difficulties in a similar way to using APLAY for outputs.
 
Jerms, I wonder if you could be more explicit on how you set up your asound.conf and used alsa plug devices?

I changed USB cards and ran this command after doing aplay -l

ecasound -B:rtlowlatency -b:512 -i:alsahw,1,0 -o:alsahw,1,0

Ecasound loaded like normal, the soundcard led blinked like it does when receiving audio but all I heard was angry buzzing.

So, I closed ecasound and ran speaker-test -D surround21😀evice -c 2 -t wav and got a clear Front Left/Front Right. So, I know the card works but not with line-in.

I also went into alsamixer and selected the usb card, did alsactl store but it make no difference.

Putting it away for the night methinks. Thanks for all your input but I think I am back to the Odroid not being able to process full duplex. Mind you, I have used this Odroid to do six channels of processed audio, with ecasound, RTaylor's stuff but only with the music loaded on the SD card. It work impeccably then.

Back to square negative 1 I guess.

Thanks all.

James
 
Hi, I figured out how to capture output! Learned something today at least.

odroid@odroid32:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S.27 dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [USB2.0 High-Speed True HD Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [USB2.0 High-Speed True HD Audio], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [USB2.0 High-Speed True HD Audio], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0

aplay -L Gives this:

null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=ODROIDHDMI
ODROID-HDMI,
Default Audio Device
sysdefault:CARD=ODROIDHDMI
ODROID-HDMI,
Default Audio Device
dmix:CARD=ODROIDHDMI,DEV=0
ODROID-HDMI,
Direct sample mixing device
dsnoop:CARD=ODROIDHDMI,DEV=0
ODROID-HDMI,
Direct sample snooping device
hw:CARD=ODROIDHDMI,DEV=0
ODROID-HDMI,
Direct hardware device without any conversions
plughw:CARD=ODROIDHDMI,DEV=0
ODROID-HDMI,
Hardware device with all software conversions
default:CARD=Audio
USB2.0 High-Speed True HD Audio, USB Audio
Default Audio Device
sysdefault:CARD=Audio
USB2.0 High-Speed True HD Audio, USB Audio
Default Audio Device
front:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Front speakers
surround21:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct sample mixing device
dmix:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct sample mixing device
dmix:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct sample mixing device
dsnoop:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct sample snooping device
dsnoop:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct sample snooping device
dsnoop:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct sample snooping device
hw:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct hardware device without any conversions
hw:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct hardware device without any conversions
hw:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct hardware device without any conversions
plughw:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Hardware device with all software conversions
plughw:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Hardware device with all software conversions
plughw:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Hardware device with all software conversions
 
I just did a simple ecasound -i:alsahw,1,0 -o:alsahw,0,0

Where 1,0 is the USB and 0,0 is the HDMI. It worked then went to an unknown state 3. I do not know if it was actually outputting audio for the reasons in my last post.



Interesting. Have you tried input to one usb dac and output from the other? If you have two, that should be pretty easy 🙂


Sent from my iPhone using Tapatalk
 
ecasound -i:alsahw,2,0 -o:alsahw,1,0 gets me a running session for ecasound but no audio.

Doing the reverse gets me a running session for ecasound, the blue led blinks on the outputting soundcard but no audio and then unknown state 3.

Okay, I am putting this to rest for the night folks. I cannot figure it out.
 
I posted this a while ago. Output only to three raspberry pi configurations.
http://www.diyaudio.com/forums/pc-b...c-asound-conf-configurations-have-worked.html

As I mentioned earlier, ARECORD -l or -L will list capture devices.

I think I'd break the problem down into more simple tests. Getting LADSPA working on a previously known-good config nearly had me throwing it all into a corner in a huff.

1) can you ARECORD from a mic or line-in source?
2) Can you play from that source as input to MPD (or other player).... And output to an ALSA playback device with no filtering/DSP?
3) Add the DSP to the mix....
 
There really are few good ADCs for SBC (R-Pi, Odroid, etc.). HiFiMeDIY may be offering one in another couple of months (USB based). Until then the Behringer UCA202 is one of the few plug and play full duplex ADC/DAC until I know of.

Lack of a good ADC was one of my primary motivations for developing a streaming audio application based on gstreamer. I listen to ripped and streaming radio mostly. On my audio server computer the motherboard has an ALC892 7.1ch audio codec, and I can connect an external line to that if I want to listen to a tuner, a CD player output, etc.

There is also the possibility of SPDIF input using a miniStreamer...

But if you want to do everything with a single R-Pi and use it like a crossover box, you need a line input and therefore an ADC.

I have tried a Pi HAT called the audio injector, which has an ADC and DAC, but is a bit cumbersome to set up. I am holding out hope for the HiFiMeDIY offering.
 
I have a Raspberry right here that I will load with a basic Raspbian and give it a try.
I would first try to separately test input (ADC) and output (DAC) functionality, but not both together. I would install ecasound for this purpose.

To test input, record input to to a file. Then try to play that file back through the output, which you can test first (I am sure it will work).

If you need help, we can better help you if you post the output from aplay -l and arecord -l. No need to post the longer "L" output at this point.