Skip to contentSkip to conversation

Accessing alsa device in kernel space.

DISCUSSION Vasily Khoruzhick 2 participants 4 messages Aug 5, 2007 – Aug 7, 2007

lore
Share & tools
lore
#0 lore raw

Hi, how to access to alsa device from kernel space?
I want to create driver for virtual soundcard, that will perform mixing and rate converting in kernelspace, and put result in real hardware. But I found no documentation how to open alsa device in kernel space :(

Best regards,
Vasily.

#1 lore raw

At Sun, 5 Aug 2007 19:11:23 +0300,

Quoted 5 lines · Vasily Khoruzhick

Hi, how to access to alsa device from kernel space?
I want to create driver for virtual soundcard, that will perform mixing and rate converting in kernelspace, and put result in real hardware. But I found no documentation how to open alsa device in kernel space :(

You shouldn't do it. It'd be horribly messy.
If you'd like to access the device files of other hardwares, simply use the user-space solution.

Takashi

#2 lore raw
Quoted 8 lines · On 6 August 2007 you wrote:

At Sun, 5 Aug 2007 19:11:23 +0300,

Quoted 4 lines · Vasily Khoruzhick

Hi, how to access to alsa device from kernel space?
I want to create driver for virtual soundcard, that will perform mixing and rate converting in kernelspace, and put result in real hardware. But I found no documentation how to open alsa device in kernel space :(

Quoted 6 lines

You shouldn't do it. It'd be horribly messy.
If you'd like to access the device files of other hardwares, simply use the user-space solution.

Takashi

Btw, why there's oss-emulation in kernel? AFAIK it can't use pcm-plugins (e.g. dmix), so oss-applications that try to play through /dev/dsp can't produce any sound, or they block soundcard and other programs can't use it.

#3 lore raw

At Mon, 6 Aug 2007 22:29:46 +0300,

Quoted 15 lines · Vasily Khoruzhick
Quoted 13 lines · On 6 August 2007 you wrote:

At Sun, 5 Aug 2007 19:11:23 +0300,

Quoted 4 lines · Vasily Khoruzhick

Hi, how to access to alsa device from kernel space?
I want to create driver for virtual soundcard, that will perform mixing and rate converting in kernelspace, and put result in real hardware. But I found no documentation how to open alsa device in kernel space :(

You shouldn't do it. It'd be horribly messy.
If you'd like to access the device files of other hardwares, simply use the user-space solution.

Quoted 5 lines
Quoted 1 line

Takashi

Btw, why there's oss-emulation in kernel? AFAIK it can't use pcm-plugins (e.g. dmix), so oss-applications that try to play through /dev/dsp can't produce any sound, or they block soundcard and other programs can't use it.

Because the OSS API _requires_ the kernel device file. We have user-space aoss wrapper, too.

Takashi