kernel sound mixing

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium, kodachi

kernel sound mixing

Postby antik » Fri Sep 08, 2006 1:32 pm

Why I can't use FreeBSD feature- in-kernel sound mixing, so multiple applications can use one sound device in parallel. Instead of selecting multiple sound devices (that is not possible with most of the apps) I'd prefer transparent way of working with sound system.

Code: Select all
#Enable more Sound Channels
hw.snd.pcm0.vchans=4
hw.snd.maxautovchans=4


OSS sound quality is good but lack of this MAJOR feature scare me away...
antik
New Member
 
Posts: 3
Joined: Fri Sep 08, 2006 1:24 pm

Re: kernel sound mixing

Postby dev » Fri Sep 08, 2006 11:23 pm

antik wrote:Why I can't use FreeBSD feature- in-kernel sound mixing, so multiple applications can use one sound device in parallel. Instead of selecting multiple sound devices (that is not possible with most of the apps) I'd prefer transparent way of working with sound system.

Code: Select all
#Enable more Sound Channels
hw.snd.pcm0.vchans=4
hw.snd.maxautovchans=4


OSS sound quality is good but lack of this MAJOR feature scare me away...


OSS has virtual mixer - it's just not automatic like the kernel - you can play multiple audio apps by specifying a unique /dev/dspXX device with your app.
(type cat /dev/sndstat and you'll see what I mean)

Infact our Virtual mixer is better than bsd and alsa's mixing technology that is purely linear interpolated.

regards
Dev
dev
Developer
 
Posts: 580
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Re: kernel sound mixing

Postby antik » Sat Sep 09, 2006 9:24 am

dev wrote:OSS has virtual mixer - it's just not automatic like the kernel - you can play multiple audio apps by specifying a unique /dev/dspXX device with your app.
(type cat /dev/sndstat and you'll see what I mean)

Infact our Virtual mixer is better than bsd and alsa's mixing technology that is purely linear interpolated.

regards
Dev


I know about /dev/sndstat.

How it can be better if I can't user more than one app with /dev/dsp0 ?!? Mixing should be done transparently, not through virtual channels. With most apps you can't change sound device to something other like /dev/dsp1. If I got two sound cards then I expect /dev/dsp1 to be second card and all sounds should be separated. If you implement transparent mixing then I'll switch from FreeBSD NewPCM to OSS instantly. Playing with manual configuration of apps is frustrating.

With OSS driver I got static noise while recording sound from microphone and there is no such a noise in native FreeBSD driver.

Code: Select all
cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <nVidia nForce2> at io 0xd000, 0xd400 irq 21 bufsz 16384 kld snd_ich (1p/1r/4v channels duplex default)


My dynamic microphone VT-3830:
Working frequency range: 50Hz-20KHz,
Sensitivity: -74+/-3dB
Resistance: 6000hm+/-30%
Noise reduction filter

I am PC-BSD developer and I'd like to make PBI installer from OSS driver. Most users of PC-BSD got high end desktop computers and they expect their 7channel sound cards to work at their full potential- FreeBSD native driver is lacking these multichannel features and this is real show stopper. Is it possible to eliminate this unnecessary manual configuration and make it automatic and transparent to end-users? Then we may start providing OSS driver as addition to PC-BSD future releases.

P.S. PC-BSD iso is downloaded more than 150.000 times starting from 1.0 release and we preparing next 1.3 release later this month (september 2006).
antik
New Member
 
Posts: 3
Joined: Fri Sep 08, 2006 1:24 pm

Re: kernel sound mixing

Postby dev » Sat Sep 09, 2006 8:48 pm

antik wrote:I know about /dev/sndstat.

How it can be better if I can't user more than one app with /dev/dsp0 ?!? Mixing should be done transparently, not through virtual channels. With most apps you can't change sound device to something other like /dev/dsp1. If I got two sound cards then I expect /dev/dsp1 to be second card and all sounds should be separated. If you implement transparent mixing then I'll switch from FreeBSD NewPCM to OSS instantly. Playing with manual configuration of apps is frustrating.


Most OSS audio apps will allow you to change the device - XMMS, mpg123, Audacity etc. You need to use ONLY virtual mixer devices - if you access a physical device VMIX will not work.

With OSS driver I got static noise while recording sound from microphone and there is no such a noise in native FreeBSD driver.

Code: Select all
cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <nVidia nForce2> at io 0xd000, 0xd400 irq 21 bufsz 16384 kld snd_ich (1p/1r/4v channels duplex default)


My dynamic microphone VT-3830:
Working frequency range: 50Hz-20KHz,
Sensitivity: -74+/-3dB
Resistance: 6000hm+/-30%
Noise reduction filter

I am PC-BSD developer and I'd like to make PBI installer from OSS driver. Most users of PC-BSD got high end desktop computers and they expect their 7channel sound cards to work at their full potential- FreeBSD native driver is lacking these multichannel features and this is real show stopper. Is it possible to eliminate this unnecessary manual configuration and make it automatic and transparent to end-users? Then we may start providing OSS driver as addition to PC-BSD future releases.

P.S. PC-BSD iso is downloaded more than 150.000 times starting from 1.0 release and we preparing next 1.3 release later this month (september 2006).


Should be no problems recording off NForce2 audio.

We are working on OSS v4.0 - check out the pkg format installation at http://www.opensound.com/test directory.




regards
dev mazumdar
dev
Developer
 
Posts: 580
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Re: kernel sound mixing

Postby antik » Sun Sep 10, 2006 8:05 am

dev wrote:Should be no problems recording off NForce2 audio.

We are working on OSS v4.0 - check out the pkg format installation at http://www.opensound.com/test directory.

regards
dev mazumdar


KDE sound system aRTS is not working. aRTS is looking for /dev/dsp and can't find any sound device. Then I made link from /dev/dsp0 to /dev/dsp and was able to get some sound first- with huge delay and crackling. Tried couple of times and then it won't make any sound at all.
Code: Select all
cat /dev/sndstat
OSS 4.0rc0 (build 162/200608251741) (C) 4Front Technologies 1996-2006

**** UNREGISTERED VERSION ****

This OSS version will expire after:  Mar 2007
Kernel: FreeBSD 6.1-RELEASE-p3 #0: Mon Aug  7 11:26:03 EEST 2006
    root@PCBSD.localhost:/usr/obj/usr/src/sys/PCBSDv1.3B


Audio devices:
0: Nvidia nForce2 (DUPLEX)
   Opened by: artsd/3352 @ 48000/48000 Hz Fragment: Not started
1: Nvidia nForce2 (shadow) (DUPLEX)
2: Nvidia nForce2 (S/PDIF) (GRC3)
3: OSS Virtual Mixer v3.0 Rec/Play CH #1 (GRC3)
4: OSS Virtual Mixer v3.0 Rec/Play CH #2 (GRC3)
5: OSS Virtual Mixer v3.0 Rec/Play CH #3 (GRC3)
6: OSS Virtual Mixer v3.0 Rec/Play CH #4 (GRC3)
7: OSS Virtual Mixer v3.0 Rec/Play CH #5 (GRC3)
8: OSS Virtual Mixer v3.0 Rec/Play CH #6 (GRC3)
9: OSS Virtual Mixer v3.0 Rec/Play CH #7 (GRC3)
10: OSS Virtual Mixer v3.0 Rec/Play CH #8 (GRC3)
11: Virtual Mixer Loopback Record CH #1 (GRC3)
12: Virtual Mixer Loopback Record CH #2 (GRC3)
13: Virtual Mixer Loopback Record CH #3 (GRC3)
14: Virtual Mixer Loopback Record CH #4 (GRC3)

MIDI devices:
  *** MIDI support not available in this OSS version ***

Mixers:
0: ICH AC97 Mixer (ALC650)
1: Virtual Mixer

History:
dsp0: pid 3226 cmd 'artsd' IN OUT
dsp0: pid 3226 cmd 'artsd' IN OUT
dsp0: pid 3226 cmd 'artsd' IN OUT 3411 overruns
dsp0: pid 3352 cmd 'artsd' IN OUT
dsp0: pid 3352 cmd 'artsd' IN OUT


Restarting aRTS is useless. Osstest works just fine- good sound quality.

Code: Select all
osstest

*** Scanning sound adapter #-1 ***
/dev/dsp0  Nvidia nForce2 (adapter0, subdev0)
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <real srate 47979.00 Hz (-0.04%)>
/dev/dsp1  Nvidia nForce2 (shadow) (adapter0, subdev1)
- Skipping device (card already tested)
/dev/dsp2  Nvidia nForce2 (S/PDIF) (adapter0, subdev2)
- Performing audio playback test...
  <left> Device returned error: Input/output error

*** Scanning sound adapter #0 ***
/dev/dsp3  OSS Virtual Mixer v3.0 Rec/Play CH #1 (adapter1, subdev0)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp4  OSS Virtual Mixer v3.0 Rec/Play CH #2 (adapter1, subdev1)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp5  OSS Virtual Mixer v3.0 Rec/Play CH #3 (adapter1, subdev2)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp6  OSS Virtual Mixer v3.0 Rec/Play CH #4 (adapter1, subdev3)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp7  OSS Virtual Mixer v3.0 Rec/Play CH #5 (adapter1, subdev4)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp8  OSS Virtual Mixer v3.0 Rec/Play CH #6 (adapter1, subdev5)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp9  OSS Virtual Mixer v3.0 Rec/Play CH #7 (adapter1, subdev6)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp10 OSS Virtual Mixer v3.0 Rec/Play CH #8 (adapter1, subdev7)
- Skipping virtual device (use -V to force test)

*** Scanning sound adapter #0 ***
/dev/dsp11 Virtual Mixer Loopback Record CH #1 (adapter1, subdev8)
- Skipping input only device

*** Scanning sound adapter #0 ***
/dev/dsp12 Virtual Mixer Loopback Record CH #2 (adapter1, subdev9)
- Skipping input only device

*** Scanning sound adapter #0 ***
/dev/dsp13 Virtual Mixer Loopback Record CH #3 (adapter1, subdev10)
- Skipping input only device

*** Scanning sound adapter #0 ***
/dev/dsp14 Virtual Mixer Loopback Record CH #4 (adapter1, subdev11)
- Skipping input only device

*** Some errors were detected during the tests ***


If I set aRTS to device /dev/dsp3 then system locks up and restarts automatically. Osstest -V plays all channel fine.

man pages not found.
antik
New Member
 
Posts: 3
Joined: Fri Sep 08, 2006 1:24 pm

Re: kernel sound mixing

Postby l0b0 » Thu Jun 28, 2007 3:50 pm

antik wrote:
Code: Select all
cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <nVidia> at io 0xd000, 0xd400 irq 21 bufsz 16384 kld snd_ich (1p/1r/4v channels duplex default)


I'm using FreeBSD 6.2-RELEASE with
Code: Select all
device sound
device snd_ich
in my kernel configuration, but the "kld snd_ich" part above is just not there:
Code: Select all
$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <nVidia> at io 0xd000, 0xd400 irq 22 bufsz 16384  (1p/1r/4v channels duplex default)


How can this happen? How do I check whether the snd_ich device has been loaded? "dmesg | grep ich" shows nothing. Could you post your kernel configuration or /boot/loader.conf?
l0b0
New Member
 
Posts: 3
Joined: Thu Jun 28, 2007 6:36 am


Return to BSD

Who is online

Users browsing this forum: No registered users and 1 guest

cron