Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

err opening dev/dsp

Hi folks

I am having a problem opening /dev/dsp with an application. It tries to open the device /dev/dsp

# define AUDIO_DEVICE /dev/dsp

fd=open(AUDIO_DEVICE, O_RDWR|O_NONBLOCK);

this returns -1 to fd. I tought this might be because I'm using a ROM filesystem. Therefore I tried using

fd=open(AUDIO_DEVICE, O_RDONLY|O_NONBLOCK);

this did'nt help though.

Any ideas what to do?

Regards

Michael E

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you add the correct functionality in the kernel?

    Using a RO filesystem should not be a problem since /dev/ entries are not a real file but a fake filesystem to access kernel functionality.

    I would assume this error results from static device nodes (i.e. always there) without having the correct functionality in the kernel (device module/driver).

    You try to access the kernel, but the kernel does not know what you are talking about.