From mboxrd@z Thu Jan 1 00:00:00 1970 From: gsantosh@codeaurora.org Subject: Re: customized IOCTL in pcm platform driver. Date: Wed, 24 Oct 2012 21:56:26 -0700 (PDT) Message-ID: <6f00eacf2834f3322850a660bf74d7ee.squirrel@www.codeaurora.org> References: <4d3d244e3c337274675747eee0404a78.squirrel@www.codeaurora.org> <9c99072a34e9cd171404e40d6e543d13.squirrel@www.codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine01.qualcomm.com (wolverine01.qualcomm.com [199.106.114.254]) by alsa0.perex.cz (Postfix) with ESMTP id 9BA1C264F34 for ; Thu, 25 Oct 2012 06:56:27 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org Cc: Takashi Iwai , alsa-devel@alsa-project.org, lrg@ti.com, gsantosh@codeaurora.org List-Id: alsa-devel@alsa-project.org >> At Tue, 9 Oct 2012 00:30:40 -0700 (PDT), >> gsantosh@codeaurora.org wrote: >>> >>> > At Mon, 8 Oct 2012 23:44:40 -0700 (PDT), >>> > gsantosh@codeaurora.org wrote: >>> >> >>> >> > At Mon, 8 Oct 2012 23:30:09 -0700 (PDT), >>> >> > gsantosh@codeaurora.org wrote: >>> >> >> >>> >> >> Hi All, >>> >> >> >>> >> >> will ALSA framework provide any customized IOCTL functionality in >>> PCM >>> >> >> platform driver. >>> >> > >>> >> > No. >>> >> > >>> >> >> in my system there is a requirement to get some information from >>> DSP >>> >> to >>> >> >> user space and I am thinking to add IOCTL's, is there any method >>> to >>> >> >> accommodate or how we can address this issue? >>> >> > >>> >> > You can use hwdep device for any extra methods. >>> >> >>> >> We need to tie this ioctl with the on going DSP session which will >>> be >>> >> difficult When used with hwdep interface. >>> > >>> > Hm, how can it be difficult? More specific description is needed to >>> > answer more. >>> >>> to communicate with DSP we open up a session and populate that >>> information >>> in the substream, for this use case during the playback session user >>> space >>> has to talk to DSP to get some information like time stamp also the >>> time >>> stamp statistics, to talk to DSP I need to get hold of the proper >>> substream so that the communication with particular session is >>> possible. >>> >>> I see adding one IOCTL in the platform driver will solve my issue, but >>> not >>> finding any way to integrate this in the current framework, >>> >>> if we use the hwdep, not sure how can I get hold of the substream >>> handle >>> so I can talk to particular session in DSP. >> >> A PCM substream can be identified simply by a PCM device number and >> a PCM substream index. You can make ioctl to pass these information. >> > > Can you point to any code reference doing this operation? > did you mean accessing the sub-stream handle in user space or in the > kernel driver. > > >> >> Takashi >> > > thanks for the information Takashi, but I have new requirement, want to see how can I implement a asynchronous functionality using dependent hardware interface, consider a use case where the DSP responds with proprietary data tied up with session opened, now the data received at app has to be propagated to user space for further processing, does any one implemented this in hardware dependent interface layer.