lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5h63mjddvj.wl%tiwai@suse.de>
Date:	Wed, 19 Nov 2008 14:49:52 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	"Bryan Wu" <cooloney@...nel.org>
Cc:	"ALSA devel" <alsa-devel@...a-project.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Question] Can I open a substream in kernel space without attach to a file pointer?

At Wed, 19 Nov 2008 18:00:36 +0800,
Bryan Wu wrote:
> 
> Hi Takashi,
> 
> I am developing a USB gadget driver compliant to USB Audio Class Spec 2.0.
> So I want to open a PCM substream and do some playback of capture,
> then close them?
> 
> I found snd_pcm_open_substream() is for opening a substream and attach
> it to a file.
> But in my application, there is no need to open a file before opening
> a substream.
> 
> - Is there any interface for me to open a substream in kernel space
> without attach to a file?
> - How to playback and capture in kernel space, use snd_pcm_lib_write
> and snd_pcm_lib_read?
> - How to get the snd_pcm_hardware struct from low level driver,
> because I have to get the hardware configuration of the snd pcm
> device?
> 
> And I am reading the code of OSS emulator in ALSA. It provides some
> info about the kernel space sound card programming.

Yes, OSS emulation code handles the PCM in the kernel.
But, basically I don't recommend you to do this -- it's not the job of
the sound card driver.  The whole PCM stuff is handled by the PCM
middle layer, not the driver itself.
Any reason why you handle the PCM stuff completely in your driver
code?


Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ