Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 2020 09:58:54 +0200
From:      Harry Schmalzbauer <freebsd@omnilan.de>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Audio mixer and mixer control
Message-ID:  <f422ad19-16b9-488c-4bf1-d87eafa6b52b@omnilan.de>
In-Reply-To: <AF5EFF09-34E3-444E-B1D6-FE0315C4025B@dons.net.au>
References:  <426353fd-bb39-5bba-5ca1-af00a8b8ff4e@omnilan.de> <AF5EFF09-34E3-444E-B1D6-FE0315C4025B@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 11.04.2020 um 06:57 schrieb O'Connor, Daniel via freebsd-stable:
…
>> So if I have dsp0 with line-in and line-out, and dsp3 with a S/PDIF out, there's no way to get the dsp0-"mix" over to dsp3?
> 
> You can't use mixer to do what you want, but you can probably do something with a sox pipe line that would read from one input and feed to another if that is indeed what you need.
> 
>> What I'm looking for is a mixer which processes various input sources and sends them to arbitrary output devices.
>> Does anybody know if there's such kind of mixer available?
>>
>> Or is it possible to interconnect different dsp channels? (ugh, I don't really know anything about contemporary audio hardware :-( )
>>
>> I also have problems understanding the mixer(8) channels.  Hard to find the corresponding dsp channel... The relation of "speaker", "mix", the invible "monitor" and "rec" is completely unclear to me, likewise the difference of "vol" and "pcm".
>>
>> Is it common that S/PDIF out is a separate dsp?  I never had to investigate on other OS, where I get the same signal on analog and digital outputs simultaniously.
> 
> I don't think it's very uncommon, although I haven't used FreeBSD on a desktop for quite a while..
> 
> What does this output?
> cat /dev/sndstat
> 
> If you just want to play some audio out to the S/PDIF you can tell your audio program to use that particular device (eg /dev/dsp1 or whatever it is)

Hello and thanks for your help.  Main issue is to playback 
simultaniously on more than one dsp (musicpd(1) is providing that 
feature out of the box, but I was looking for a more general way, 
covering mixed line-in (DAB+ radio)).

Here's my sndstat:
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC892 (Rear Analog 5.1/2.0)> on hdaa0  (1p:2v/1r:2v) default
pcm1: <Realtek ALC892 (Front Analog)> on hdaa0  (1p:2v/1r:1v)
pcm2: <Realtek ALC892 (Internal Digital)> on hdaa0  (1p:1v/0r:0v)
pcm3: <Realtek ALC892 (Rear Digital)> on hdaa0  (1p:1v/0r:0v)
pcm4: <USB audio> at ? kld snd_uaudio (0p:0v/1r:1v)
No devices installed from userspace.

To my surprise, today there's dsp0_line-in/mix signal on dsp1_line-out. 
No idea if it was a layer 8 error yesterday (pretty sure it was not) or 
if some smart chip on the mainboard decided to interconnect over night 
(no reboot)?!? In fact, adjusting "mix" on dsp0 controls the output 
volume on dsp1 (analog line-in on dsp0 get's somehow routed to analog 
out on dsp1 (killed pulseaudio, nothing else is running, so it must be 
done in hardware)).

I'd like to share what I discovered while browsing freshports.org/audio:
rawrec(1) might be the leanest way to pipe signals, like you mentioned 
using sox(1).
virtual_oss(8) seems to do exactly what I was looking for regarding 
"mixing". No idea how cuse(3) comes into play, seems to be not as native 
as I prefer things.

Unfortunately, I don't have time to play with at the moment.  But once I 
come back to it, I'll find it here for reference ;-)

Thanks,

-harry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f422ad19-16b9-488c-4bf1-d87eafa6b52b>