[nas] [PATCH] use the mixer specified in the input section

Erik Auerswald auerswal at unix-ag.uni-kl.de
Wed Aug 16 20:01:57 MDT 2006


On Wed, Aug 16, 2006 at 07:20:11PM -0600, Jon Trulson wrote:
> On Thu, 17 Aug 2006, Erik Auerswald wrote:
> >On Wed, Aug 16, 2006 at 08:26:20PM +0200, Erik Auerswald wrote:
> >>On Wed, Aug 16, 2006 at 01:36:42PM -0400, Paul Fox wrote:
> >>>erik wrote:
> >>>> Yes, the default behaviour is changed. The default config should be
> >>>> adjusted as well to use /dev/mixer for in- and output. Sorry that I
> >>>> forgot to do this.
> >>>
> >>>i'm also concerned about people with pre-installed configs that
> >>>install a new nas daemon, and get surprising results.  but i
> >>>guess that's progress.  :-)
> >>
> >>Attached is a second version of my patch that implements an _untested_
> >>fallback for incorrect config files specifying a non-existant mixer
> >>device in the input section. It's modelled after the equivalent
> >>functionality to fall back from /dev/dsp1 to /dev/dsp.
> >
> >I've just tested that patch and updated it to report the correct mixer
> >device name after switching to the shared device case. See the
> >attachement.
>         Ok, I've committed this patch.  Nice work! :)


>         I do not have an input device to test with, but it worked just
>         fine on my setup - I noticed no ill behavior.


>         FWIW, this is the output I get (pretty much default config on
>         an SB PCI using alsa oss emulation):
>         ...
>         initMixer: opened output mixer device /dev/mixer
>         initMixer: opened input mixer device /dev/mixer1
>         initMixer: /dev/mixer1: using recording level control method 1
>         Init: initMixer was successful
>         ...

This means that there are 2 mixer devices. According to the ALSA
documentation this means that there are 2 sound "cards" configured. If
you were to use the input jack of your SB PCI you would probably not be
able to record anything with NAS.

To check the ALSA configuration you can do a "cat /proc/asound/cards",
which produces the following output on my machine:

[erik at fal ~]$ cat /proc/asound/cards
0 [CK8S           ]: NFORCE - NVidia CK8S
                     NVidia CK8S with ALC850 at 0xe7000000, irq 12
1 [Live           ]: EMU10K1 - Sound Blaster Live!
                     Sound Blaster Live! (rev.8, serial:0x80271102) at 0xa000, irq 10

The file /proc/asound/oss/sndstat contains information about the OSS
emulation of ALSA:

[erik at fal ~]$ cat /proc/asound/oss/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code)
Kernel: Linux fal.fast.net 2.6.11-1.27_FC3 #1 Tue May 17 20:27:37 EDT 2005 i686
Config options: 0

Installed drivers: 
Type 10: ALSA emulation

Card config: 
NVidia CK8S with ALC850 at 0xe7000000, irq 12
Sound Blaster Live! (rev.8, serial:0x80271102) at 0xa000, irq 10

Audio devices:
0: NVidia CK8S (DUPLEX)


Midi devices:
1: EMU10K1 MPU-401 (UART)

7: system timer

0: Realtek ALC850 rev 0
1: SigmaTel STAC9721/23

The ALSA documentation states that the OSS emulation module creates one
/dev/dsp, /dev/adsp and /dev/mixer device per sound card. If there is a
/dev/dsp1, /dev/adsp1 or /dev/mixer1 this belongs to another sound card.
This could be on-board sound hardware or a TV card.

>         Here is some suggested wording for a Note/Warning regarding
>         the possible changed behavior. [...]

I like it. :-)


More information about the Nas mailing list