simple question two outputs set default device?

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

simple question two outputs set default device?

Postby dlandis » Wed Oct 28, 2009 3:29 am

Hi Everyone,

I have two outputs, a "main" and "spdifout" from soundcard. Using osstest it was successful for both, however I only have "spdifout" hooked up to something, therefore only heard sound for the test for that output.

Now trying to listen to audio from applications it is using "main" which is not what I want. How to get all programs to use "spdfout" or to somehow cause "spdifout" to become the new "main"? I know the applications are using "main" based on the "ossxmix" program which show it.

Thanks. :D :D :? :?

INFO:

Audio devices
M-Audio Audiophile 192 main out /dev/oss/oss_envy24ht0/pcm0 (device index 0)
M-Audio Audiophile 192 digital out /dev/oss/oss_envy24ht0/spdout (device index 1)

Version info: OSS 4.2 (b 2001/200910230435) (0x00040100) TRIAL
Platform: Linux/i686 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009
dlandis
New Member
 
Posts: 3
Joined: Wed Oct 28, 2009 3:17 am

Re: simple question two outputs set default device?

Postby cesium » Wed Oct 28, 2009 4:37 pm

cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: simple question two outputs set default device?

Postby dlandis » Thu Oct 29, 2009 3:35 am

YES. Thank. I ended up doing this command for my system:

Code: Select all
sudo ln -sf /dev/oss/oss_envy24ht0/spdout /dev/dsp


And it works now for stuff. But your link also says to do :


* In OSS 4.1 and above, it's best to also add a "vmixctl attach" command to the soundon.user file to make sure vmix is attached to the new device and to add "vmix_no_autoattach=1" to the $OSSLIBDIR/conf/osscore.conf file. "vmixctl attach" syntax looks like this:

vmixctl attach /dev/oss/oss_sbxfi0/pcm0 /dev/oss/oss_sbxfi0/pcmin0

The second and third argument represent output and input nodes for vmix to attach to, allowing full duplex when /dev/dsp is used. However, the third argument can be omitted in some cases. See "vmixctl" manpage for explanation.


I have no clue what this means though..? :shock: :shock: :? :?: Why do I need the "vmix"? Is it only if I want to use inputs too, I can't tell from this.
dlandis
New Member
 
Posts: 3
Joined: Wed Oct 28, 2009 3:17 am

Re: simple question two outputs set default device?

Postby cesium » Thu Oct 29, 2009 11:43 pm

Oh. vmix is the software mixer subsystem. It allows multiple programs to use a device at the same time, so most users want to have it attached to the main output. You can check if it's attached to a device by doing 'ossinfo -v3' and seeing the "(vmix)" engines next to an attached device..
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: simple question two outputs set default device?

Postby dlandis » Fri Oct 30, 2009 12:48 am

Hey thanks for all the help. I did the vmix control thing too seems OK. Also the first thing I didn't stick once I rebooted so I put it in that soundon.user file and made it executable. I put 'sudo' before the commands in that file I don't know if that is right I'll find out next time I boot I guess. Anyway here is the 'ossinfo -v3' you mentioned maybe you can tell if there's anything else I can do to make it better.

Code: Select all
Version info: OSS 4.2 (b 2001/200910230435) (0x00040100) TRIAL
Platform: Linux/i686 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 (berry)

Number of audio devices:        5
Number of audio engines:        18
Number of MIDI devices:         2
Number of mixer devices:        2


Device objects
0: osscore0 OSS core services
1: oss_envy24ht0 M-Audio Audiophile 192 interrupts=259434 (259434)
2: oss_ich0 SiS 7012 interrupts=339 (57329)
3: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: M-Audio Audiophile 192 input (MIDI port 1 of device object 1)
    Device file /dev/oss/oss_envy24ht0/mid0, Legacy device /dev/midi00
    Modes: INPUT  , Available for use
    Caps:
    Minimum latency: Not indicated
    Device handle: PCI36321412-0000:00:0b.0-md01

1: M-Audio Audiophile 192 output (MIDI port 2 of device object 1)
    Device file /dev/oss/oss_envy24ht0/mid1, Legacy device /dev/midi01
    Modes: OUTPUT , Available for use
    Caps:
    Minimum latency: Not indicated
    Device handle: PCI36321412-0000:00:0b.0-md02


Mixer devices
0: M-Audio Audiophile 192 (Mixer 0 of device object 1)
    Device file /dev/oss/oss_envy24ht0/mix0, Legacy device /dev/mixer0
    Priority: 1
    Caps:
    Device handle: PCI36321412-0000:00:0b.0-mx01
    Device priority: 1

1: ICH AC97 Mixer (ALC655) (Mixer 0 of device object 2)
    Device file /dev/oss/oss_ich0/mix0, Legacy device /dev/mixer1
    Priority: 10
    Caps:
    Device handle: PCIa0021458-0000:00:02.7-mx01
    Device priority: 10


Audio devices
M-Audio Audiophile 192 main out   /dev/oss/oss_envy24ht0/pcm0  (device index 0)
    Legacy device /dev/dsp0
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Out engine  1: 0/M-Audio Audiophile 192 main out
                     Available for use
      Engine      2: 4/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      3: 5/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      4: 6/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      5: 7/M-Audio Audiophile 192 main out (vmix)
                     Available for use
    Input formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Output formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Device handle: PCI36321412-0000:00:0b.0-au01
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: STEREO
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 8000 - 192000 (8000,9600,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,176400,192000)
    HW Type: ANALOG_OUT     Minimum latency: Not indicated

M-Audio Audiophile 192 digital out  /dev/oss/oss_envy24ht0/spdout  (device index 1)
    Legacy device /dev/dsp1
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Out engine  1: 1/M-Audio Audiophile 192 digital out
                     Busy (OUT) label 'VMIX'
      Engine      2: 14/M-Audio Audiophile 192 digital out (vmix)
                     Busy (OUT) by PID 2061 / firefox label 'firefox'
      Engine      3: 15/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
      Engine      4: 16/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
      Engine      5: 17/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
    Input formats (0x00001400):
      AFMT_AC3          - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE       - 32 bit signed little endian
    Output formats (0x00001400):
      AFMT_AC3          - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE       - 32 bit signed little endian
    Device handle: PCI36321412-0000:00:0b.0-au02
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: STEREO
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 8000 - 192000 (8000,9600,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,176400,192000)
    HW Type: DIGITAL_OUT     Minimum latency: Not indicated

M-Audio Audiophile 192 analog in  /dev/oss/oss_envy24ht0/pcmin0  (device index 2)
    Legacy device /dev/dsp2
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      In engine   1: 2/M-Audio Audiophile 192 analog in
                     Available for use
      Engine      2: 4/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      3: 5/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      4: 6/M-Audio Audiophile 192 main out (vmix)
                     Available for use
      Engine      5: 7/M-Audio Audiophile 192 main out (vmix)
                     Available for use
    Input formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Output formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Device handle: PCI36321412-0000:00:0b.0-au03
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: STEREO
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 192000 (8000,9600,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,176400,192000)
    HW Type: ANALOG_IN     Minimum latency: Not indicated

M-Audio Audiophile 192 digital in  /dev/oss/oss_envy24ht0/spdin  (device index 3)
    Legacy device /dev/dsp3
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      In engine   1: 3/M-Audio Audiophile 192 digital in
                     Busy (IN) label 'VMIX_IN'
      Engine      2: 14/M-Audio Audiophile 192 digital out (vmix)
                     Busy (OUT) by PID 2061 / firefox label 'firefox'
      Engine      3: 15/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
      Engine      4: 16/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
      Engine      5: 17/M-Audio Audiophile 192 digital out (vmix)
                     Available for use
    Input formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Output formats (0x00001000):
      AFMT_S32_LE       - 32 bit signed little endian
    Device handle: PCI36321412-0000:00:0b.0-au04
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: STEREO
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 192000 (8000,9600,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,176400,192000)
    HW Type: DIGITAL_IN     Minimum latency: Not indicated

SiS 7012                          /dev/oss/oss_ich0/pcm0  (device index 4)
    Legacy device /dev/dsp4
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Engine      1: 8/SiS 7012
                     Available for use
      Engine      2: 9/SiS 7012 (vmix)
                     Available for use
      Engine      3: 10/SiS 7012 (vmix)
                     Available for use
      Engine      4: 11/SiS 7012 (vmix)
                     Available for use
      Engine      5: 12/SiS 7012 (vmix)
                     Available for use
      Engine      6: 13/SiS 7012
                     Available for use
    Input formats (0x00000410):
      AFMT_S16_LE       - 16 bit signed little endian
      AFMT_AC3          - AC3 (Dolby Digital) encoded audio
    Output formats (0x00000410):
      AFMT_S16_LE       - 16 bit signed little endian
      AFMT_AC3          - AC3 (Dolby Digital) encoded audio
    Device handle: PCIa0021458-0000:00:02.7-au01
    Related mixer dev: 1
    Sample rate source: 8
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 6
    Native sample rates (min - max): 48000 - 48000
    HW Type: Not indicated.
    Minimum latency: Not indicated


Nodes
  /dev/dsp -> /dev/oss/oss_envy24ht0/spdout
  /dev/dsp_in -> /dev/oss/oss_envy24ht0/pcm0
  /dev/dsp_out -> /dev/oss/oss_envy24ht0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_envy24ht0/spdout
  /dev/dsp_mmap -> /dev/oss/oss_envy24ht0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_ich0/pcm0
  /dev/dsp_spdifout -> /dev/oss/oss_envy24ht0/spdout
  /dev/dsp_spdifin -> /dev/oss/oss_envy24ht0/spdin
dlandis
New Member
 
Posts: 3
Joined: Wed Oct 28, 2009 3:17 am

Re: simple question two outputs set default device?

Postby cesium » Fri Oct 30, 2009 2:07 am

sudo is unnecessary, but isn't harmful either.
The "ossinfo" output looks fine. You may want to add "vmix_no_autoattach=1" to /usr/lib/oss/conf/osscore.conf to make the "ossxmix" mixer a bit simpler (since the vmix controls for the default attach won't show after that).

Btw, thanks for letting me know the wiki was unclear. I've edited it to (hopefully) be clearer to users.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron