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

next in thread | previous in thread | raw e-mail | index | archive | help


> On 11 Apr 2020, at 17:28, Harry Schmalzbauer <freebsd@omnilan.de> =
wrote:
> 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)).

I am not sure there is a general solution in the kernel.

> 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.

OK, looks fairly normal..
BTW you can get more information with..
sudo sysctl hw.snd.verbose=3D2
cat /dev/sndstat

> 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)).

That sounds pretty peculiar, I guess it could be an result of the fact =
your 4 PCM devices are really 1 piece of 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).

Yep, looks like it.

> 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.

Yes, it does - I haven't used it but it looks like what you want.

cuse is for allowing device drivers in user land, I don't think it's =
required for virtual_oss, just that the same author wrote both :)

> 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 ;-)

Good find, best of luck!

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F643A72D-2B2A-48B4-8D7F-4D53D7B0A671>