Hi all!
Got a Stereo audio setup on my pi with ArchlinuxArm and HifiBerry Amp+ with mpd with success.
Now i am wondering....
Could i use two mpd instances to control INDEPENDANT of the Hifi Berry AMP+
This means that one mpd instance would control the Left mono channel
and
the second mpd instance would control the right mono channel
As if they were individual sound cards.
Should i do this on the Alsa Level, should i switch to Pulse Audio?
Is this even possible?
I bet somebody knows how to do his... or if it impossible...
Thanks!
NJ
Date
Votes
4 comments
-
HiFiBerry team With ALSA this won't be possible as only a single process can use the sound card. I'm not even sure if it will work with pulseaudio in between. It should be possible, but I can't tell how to configure a setup like this.
Best regards
Daniel -
Nicolas Jacques Hello again!
more info...
I want to be able to play from 2 mpd instance.
Instance 1 is a mpd playlist playing audio files from a narrator's voice
Instance 2 is a mpd playlist playing background music
I do not want to mix the audio at the creation stage, since i want to be able to change the "narrator's" playlist order at any time, keeping the background music as is.
So while still reading up on this...
I saw that DMIX (alsa) could be used to "share" or "prevent blocking", where mpd instance #1 and #2 would be each playing to a "virtual" soundcard (or device, not sure) and the result would be Music + narrator's voice at the stereo output. This is contrary to what i have written in original post where i state independent track.
I mostly want the sum of both audio (i will then just have to figure out the audio level ratio between both)
Most of my attempts have generated mpd.log like:
--------
ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
Jul 05 20:36 : alsa_output: Failed to open "Sound Card" [alsa]: Error opening ALSA device "default" (snd_pcm_hw_params_any): Invalid argument
Jul 05 20:36 : output: Failed to open audio output
Jul 05 20:36 : player: problems opening audio device while playing "Wave name here"
--------
or
--------
9] => ALSA lib pcm_direct.c:896:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
[230] => ALSA lib pcm_dmix.c:1036:(snd_pcm_dmix_open) unable to initialize slave
[231] => Jul 05 20:32 : alsa_output: Failed to open "my ALSA device" [alsa]: Failed to open ALSA device "default": Invalid argument
[232] => Jul 05 20:32 : output: Failed to open audio output
---------
Portion of mpd.log (still a single instance for now)
--------
audio_output {
type "alsa"
name "Sound Card"
options "dev=dmixer"
}
---------
Still testing out some stuff, just wanted to update on "some" progress...
Maybe my extended information may help!
NJ -
isikistanbul Hi,
I believe I have a similar issue or I can move this to a new topic. I just got a raspberry pi 2, hifiberry amp+ and samson meteorite usb mic last week. I am fairly new to raspberry pi. What I am trying to do is to play a loop wav file while the microphone picks up the sounds of the performer and takes that signal to the speaker without recording it. So there will be two signals (audio sources) going into the speakers , one from the wav file and one from the usb mic. Is this possible to do? I got the usb mic working and the loop wav file working separately, now I am trying to make them work simultaneously. I was trying to do this with alsa for the last couple of days but as I understand I wont be able to do this with alsa. So should I use pulse audio? -
HiFiBerry team Hi,
you just need a program that takes 2 stream (one from your USB mic and from from the WAV file) and mix it. Wile pulseaudio can do this, it is not easy to configure. Maybe there are easier tools for your use case. Unfortunately I can't recommend anything.
Best regards
Daniel
Please sign in to leave a comment.