/dev/dsp: No such device or address

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

/dev/dsp: No such device or address

Postby bev » Thu Oct 08, 2009 11:21 pm

When I' running osstest, I have sound. However, if I try ossplay (or xine, pulseaudio), I get an error message that /dev/dsp can't be accessed:
Code: Select all
benno@benno-laptop:~$ osstest
Sound subsystem and version: OSS 4.1 (b 1051/200902061202) (0x00040100)
Platform: Linux/i686 2.6.27-14-generic #1 SMP Mon Aug 31 13:01:41 UTC 2009

*** Scanning sound adapter #-1 ***
/dev/oss/oss_hdaudio0/pcm0 (audio engine 0): HD Audio play pcm
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47952.00 Hz (-0.10%)>
/dev/oss/oss_hdaudio0/pcmin0 (audio engine 1): HD Audio rec select
- Skipping input only device

*** All tests completed OK ***
benno@benno-laptop:~$ ossplay Test.wav
/dev/dsp: No such device or address
benno@benno-laptop:~$ ls -l /dev/dsp
lrwxrwxrwx 1 root root 26 2009-10-08 23:20 /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
benno@benno-laptop:~$ ls -l /dev/oss/oss_hdaudio0/pcm0
crw-rw-rw- 1 root root 251, 3 2009-10-09 00:49 /dev/oss/oss_hdaudio0/pcm0


And some debug output, for completeness:
ossinfo -v3
Code: Select all
Version info: OSS 4.1 (b 1051/200902061202) (0x00040100)
Platform: Linux/i686 2.6.27-14-generic #1 SMP Mon Aug 31 13:01:41 UTC 2009 (benno-laptop)

Number of audio devices:   2
Number of audio engines:   6
Number of mixer devices:   1


Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 ATI HD Audio interrupts=2789 (2789)
    HD Audio controller ATI HD Audio
    Vendor ID    0x1002437b
    Subvendor ID 0x161f205f
     Codec  0: STAC9200 (0x83847690/0x161f205f)
2: oss_usb0 USB audio core services


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


Audio devices
HD Audio play pcm                 /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 pcm
                     Available for use
      Engine      2: 2/HD Audio play pcm (vmix)
                     Available for use
      Engine      3: 3/HD Audio play pcm (vmix)
                     Available for use
      Engine      4: 4/HD Audio play pcm (vmix)
                     Available for use
      Engine      5: 5/HD Audio play pcm (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: PCI205f161f-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,176400,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

HD Audio rec select               /dev/oss/oss_hdaudio0/pcmin0  (device index 1)
    Legacy device /dev/dsp1
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      In engine   1: 1/HD Audio rec select
                     Available for use
      Engine      2: 2/HD Audio play pcm (vmix)
                     Available for use
      Engine      3: 3/HD Audio play pcm (vmix)
                     Available for use
      Engine      4: 4/HD Audio play pcm (vmix)
                     Available for use
      Engine      5: 5/HD Audio play pcm (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: PCI205f161f-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,176400,192000)
    HW Type: Not indicated.
    Minimum latency: Not indicated



ossmix
Code: Select all
Selected mixer 0/High Definition Audio STAC9200
Known controls are:
jack.int-green.mode <select|input> (currently select)
jack.int-green.select1 <pcm|select> (currently pcm)
jack.int-green.select2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.fp-pink.mode <select|input> (currently select)
record.select.select1 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.select.select2 [<leftvol>:<rightvol>] (currently 19.4:19.4 dB)
misc <-28.-8dB|-19.-2dB|-9.-6dB|0.0dB|mute> (currently 131(too large (a=5)?))
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|Low|Medium|High|High+|Production|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm2 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm3 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm4 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm5 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


Anyone has an idea what could be causing this? The files exist and seem to have the right permissions, but there really seems to be something wrong with the /dev/dsp symlink, else osstest couldn't work, right?
bev
New Member
 
Posts: 3
Joined: Thu Oct 08, 2009 10:54 pm

Re: /dev/dsp: No such device or address

Postby cesium » Fri Oct 09, 2009 3:50 am

This is odd, since the node seems to exist.. Try running "sudo ossdetect -d -v" and "sudo ossdevlinks -v -r" (these commands will recreate the node and symlinks). Also, try "-R" and "-d/dev/oss/oss_hdaudio0/pcm0" switches with ossplay if the above doesn't work..
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: /dev/dsp: No such device or address

Postby bev » Fri Oct 09, 2009 6:28 pm

Ok, I tried you suggestions. The raw mode works, everything else didn't change anything:
Code: Select all
benno@benno-laptop:~$ sudo ossdetect -d -v
[sudo] password for benno:
mknod /dev/sndstat c 252 0
mknod /dev/mixer c 252 1
mknod /dev/oss/oss_hdaudio0/mix0 c 251 2
mknod /dev/oss/oss_hdaudio0/pcm0 c 251 3
benno@benno-laptop:~$ sudo ossdevlinks -v -r
2 audio devices
/dev/dsp0 is the next free legacy device
/dev/dsp0: No such file or directory
Created new legacy device /dev/dsp0 -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp1: No such file or directory
Created new legacy device /dev/dsp1 -> /dev/oss/oss_hdaudio0/pcmin0
0 legacy dsp device files
/dev/oss/oss_hdaudio0/pcm0 is the default /dev/dsp device
/dev/oss/oss_hdaudio0/pcm0 is the default dsp_out device
/dev/oss/oss_hdaudio0/pcm0 is the default dsp_in device
/dev/oss/oss_hdaudio0/pcm0 is the default mmap output device
/dev/oss/oss_hdaudio0/pcm0 is the default multichan output device
1 mixer devices
/dev/mixer1 is the next free legacy device
/dev/mixer0: No such file or directory
Created new legacy device /dev/mixer0 -> /dev/oss/oss_hdaudio0/mix0
1 legacy mixer device files
benno@benno-laptop:~$ ossplay Test.wav
/dev/dsp: No such device or address
benno@benno-laptop:~$ ossplay Test.wav -d/dev/oss/oss_hdaudio0/pcm0
/dev/oss/oss_hdaudio0/pcm0: No such device or address
benno@benno-laptop:~$ ossplay Test.wav -R
Playing WAVE file Test.wav, 16 bits/stereo/22050 Hz
Warning: Playback using 44100 Hz (file 22050 Hz)
bev
New Member
 
Posts: 3
Joined: Thu Oct 08, 2009 10:54 pm

Re: /dev/dsp: No such device or address

Postby cesium » Fri Oct 09, 2009 11:22 pm

This is odd... Lets try this:
Edit /usr/lib/oss/conf/osscore.conf and add the line "vmix_no_autoattach=1". Then restart OSS (soundoff && soundon). First, see if ossplay/etc. work now. If they do, try attaching vmix using vmixctl command. Then try ossplay again.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: /dev/dsp: No such device or address

Postby bev » Mon Oct 12, 2009 8:34 pm

I changed the config and restarted OSS, and ossplay worked. (Everything else too, thank you!) When I attached vmix, sound stopped working until I detached it again.
Code: Select all
benno@benno-laptop:~$ ossplay Test.wav
Playing WAVE file Test.wav, 16 bits/stereo/22050 Hz
benno@benno-laptop:~$ sudo vmixctl attach /dev/dsp
[sudo] password for benno:
Virtual mixer attached to device.
benno@benno-laptop:~$ ossplay Test.wav
/dev/dsp: No such device or address
benno@benno-laptop:~$ sudo vmixctl detach /dev/dsp
Virtual mixer detached from device.
benno@benno-laptop:~$ ossplay Test.wav
Playing WAVE file Test.wav, 16 bits/stereo/22050 Hz
bev
New Member
 
Posts: 3
Joined: Thu Oct 08, 2009 10:54 pm

Re: /dev/dsp: No such device or address

Postby cesium » Mon Oct 19, 2009 9:48 am

Sorry for taking so long to reply.. You better provide the second argument to vmixctl (an input node - e.g. pcmin0), otherwise programs opening the device with O_RDWR would fail. You can also try using -M switch with vmixctl.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron