Trying to enable 2.1 with OSS4

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Trying to enable 2.1 with OSS4

Postby exodus454 » Mon Nov 07, 2011 7:28 pm

Hey everyone -

I'm running Linux Mint Debian, just compiled and installed OSS4 last night. WOW what a difference compared to pulse. I've got playback working from most programs so far in stereo, but I cannot for the life of me get OSS to enable the sub output on my motherboard. The motherboard is 8-channel and I have it set to "multich" in ossxmix.

The output of 'ossinfo -v3' indicates "2-8" channels with preferred channels being "not indicated". I'm doing my best to understand this stuff and I just spent a few hours on google with not much reward. I feel like I need to remap something but I'm not 100% sure what it is.

Is it possible to enable just 2.1 rather than full surround? If not I can play with my sub setup, but I'd rather not have to run line level inputs if possible.

Code: Select all
ossinfo -v3
Version info: OSS 4.2 (b 2005/201111070705) (0x00040100) GPL
Platform: Linux/x86_64 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 (linux)

Number of audio devices:   8
Number of audio engines:   12
Number of MIDI devices:      0
Number of mixer devices:   1


Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 ATI HD Audio interrupts=4637998 (4638177)
    HD Audio controller ATI HD Audio
    Vendor ID    0x10024383
    Subvendor ID 0x1043836c
     Codec  0: Unknown (0x11060397/0x1043836c)
2: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)

Mixer devices
0: High Definition Audio 0x1106039 (Mixer 0 of device object 1)
    Device file /dev/oss/oss_hdaudio0/mix0, Legacy device /dev/mixer0
    Priority: 10
    Caps:
    Device handle: PCI836c1043-0000:00:14.2-mx01
    Device priority: 10


Audio devices
HD Audio play pcm1                /dev/oss/oss_hdaudio0/pcm0  (device index 0)
    Legacy device /dev/dsp0
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Out engine  1: 0/HD Audio play pcm1
                     Busy (OUT) label 'VMIX'
      Engine      2: 8/HD Audio play pcm1 (vmix)
                     Busy (OUT) by PID 4598 / mpegaudioparse5 label 'mpegaudioparse5'
      Engine      3: 9/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      4: 10/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      5: 11/HD Audio play pcm1 (vmix)
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au01
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 8
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play pcm2                /dev/oss/oss_hdaudio0/pcm1  (device index 1)
    Legacy device /dev/dsp1
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 1/HD Audio play pcm2
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au02
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play pcm3                /dev/oss/oss_hdaudio0/pcm2  (device index 2)
    Legacy device /dev/dsp2
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 2/HD Audio play pcm3
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au03
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play pcm4                /dev/oss/oss_hdaudio0/pcm3  (device index 3)
    Legacy device /dev/dsp3
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 3/HD Audio play pcm4
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au04
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play spdifout1           /dev/oss/oss_hdaudio0/spdout0  (device index 4)
    Legacy device /dev/dsp4
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 4/HD Audio play spdifout1
                     Available for use
    Input formats (0x00001410):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001410):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au05
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio play spdifout2           /dev/oss/oss_hdaudio0/spdout1  (device index 5)
    Legacy device /dev/dsp5
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 5/HD Audio play spdifout2
                     Available for use
    Input formats (0x00001410):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001410):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au06
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,88200,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio rec select1              /dev/oss/oss_hdaudio0/pcmin0  (device index 6)
    Legacy device /dev/dsp6
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      In engine   1: 6/HD Audio rec select1
                     Busy (IN) label 'VMIX_IN'
      Engine      2: 8/HD Audio play pcm1 (vmix)
                     Busy (OUT) by PID 4598 / mpegaudioparse5 label 'mpegaudioparse5'
      Engine      3: 9/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      4: 10/HD Audio play pcm1 (vmix)
                     Available for use
      Engine      5: 11/HD Audio play pcm1 (vmix)
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au07
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio rec jack6                /dev/oss/oss_hdaudio0/pcmin1  (device index 7)
    Legacy device /dev/dsp7
    Caps: TRIGGER MMAP
    Modes: INPUT 
      In engine   1: 7/HD Audio rec jack6
                     Available for use
    Input formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_S32_LE   - 32 bit signed little endian
    Device handle: PCI836c1043-0000:00:14.2-au08
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 2
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated


Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


'ossinfo -a'

Code: Select all
Audio devices
HD Audio play pcm1                /dev/oss/oss_hdaudio0/pcm0  (device index 0)
HD Audio play pcm2                /dev/oss/oss_hdaudio0/pcm1  (device index 1)
HD Audio play pcm3                /dev/oss/oss_hdaudio0/pcm2  (device index 2)
HD Audio play pcm4                /dev/oss/oss_hdaudio0/pcm3  (device index 3)
HD Audio play spdifout1           /dev/oss/oss_hdaudio0/spdout0  (device index 4)
HD Audio play spdifout2           /dev/oss/oss_hdaudio0/spdout1  (device index 5)
HD Audio rec select1              /dev/oss/oss_hdaudio0/pcmin0  (device index 6)
HD Audio rec jack6                /dev/oss/oss_hdaudio0/pcmin1  (device index 7)

Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


Also, 'ossmix'
Code: Select all
ossmix
Selected mixer 0/High Definition Audio 0x11060397
Known controls are:
jack.jack1c.mute ON|OFF (currently OFF)
jack.jack1c.pcm11 [<leftvol>:<rightvol>] (currently 62.9:62.9 dB)
jack.jack1c.pcm12 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm3 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm2 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.jack6 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.jack5 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm4 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1d.mute ON|OFF (currently OFF)
jack.jack1e.mute ON|OFF (currently OFF)
record.select1.select1 <pcm3|pcm2|jack6|jack5|mix> (currently mix)
record.select1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
record.jack6 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.pcm2 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute1 ON|OFF (currently OFF)
misc.pcm3 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.pcm4 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute2 ON|OFF (currently OFF)
misc.mute3 ON|OFF (currently OFF)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Multich)
vmix0-src <Fast|High|OFF> (currently OFF)
vmix0-outvol <monovol> (currently 24.5 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("mpegaudioparse1")
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)



osstest is also giving me errors and I'm not entirely sure what they mean..

Code: Select all
osstest
Sound subsystem and version: OSS 4.2 (b 2005/201111070705) (0x00040100)
Platform: Linux/x86_64 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011

*** Scanning sound adapter #-1 ***
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play pcm1
Note! Device is in use (by PID 0/VMIX) but will try anyway
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47995.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcm1 (audio engine 1): HD Audio play pcm2
- Performing audio playback test... /dev/oss/oss_hdaudio0/pcm1: Device or resource busy
Can't open the device
/dev/oss/oss_hdaudio0/pcm2 (audio engine 2): HD Audio play pcm3
- Performing audio playback test... /dev/oss/oss_hdaudio0/pcm2: Device or resource busy
Can't open the device
/dev/oss/oss_hdaudio0/pcm3 (audio engine 3): HD Audio play pcm4
- Performing audio playback test... /dev/oss/oss_hdaudio0/pcm3: Device or resource busy
Can't open the device
/dev/oss/oss_hdaudio0/spdout0 (audio engine 4): HD Audio play spdifout1
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47982.00 Hz (-0.04%)>
/dev/oss/oss_hdaudio0/spdout1 (audio engine 5): HD Audio play spdifout2
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47993.00 Hz (-0.01%)>
/dev/oss/oss_hdaudio0/pcmin0 (audio engine 6): HD Audio rec select1
- Skipping input only device
/dev/oss/oss_hdaudio0/pcmin1 (audio engine 7): HD Audio rec jack6
- Skipping input only device

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



EDIT:
Got sound out of the sub by doing 'vmixctl attach /dev/oss/oss_hdaudio0/pcm2'. I can get sound out of it now with 'osstest 2' but I can't seem to get any farther than that. I only get sound from the left and stereo tests which I'm guessing is because OSS doesn't realize it's a mono channel. I also tried 'vmixctl remap /dev/pcm0 2 1 4' but somehow I don't think I'm understanding the remapping correctly. Is there a way to attach /dev/dsp to more than one output?

I also tried 'sudo ln -sf /dev/oss/oss_hdaudio0/pcm2 /dev/dsp' and it'll play through the sub.. just not the other speakers.
exodus454
New Member
 
Posts: 1
Joined: Mon Nov 07, 2011 7:06 pm

Re: Trying to enable 2.1 with OSS4

Postby cesium » Tue Nov 08, 2011 1:59 pm

As a rule, programs open the device and tell OSS how many channels they want. So if they say they want 2 channels, than OSS would give them 2 channels. 5.1 programs would ask for 6 channels, etc. And channels are sequentially given. In "2.1" case, either they ask for 3 channels (very unlikely) or something would have to fabricate the ".1" channel for them. That could happen in mixer or hw level. hmm.. don't think vmix does expanding, you can try to emulate it by (while vmix is at multich) having a channel mapping like "1 2 1", but that's probably not what you want...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 1 guest