From: Takashi Iwai Subject: Re: [PATCHv2 - CA0132 HDA Codec 1/2] ALSA: Update Creative CA0132 codec to add DSP features. Date: Sat, 04 Aug 2012 09:29:19 +0200 Message-ID: References: <1343239280-3503-1-git-send-email-ian_minett@creativelabs.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 0265926525C for ; Sat, 4 Aug 2012 09:29:18 +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 To: Ian Minett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 3 Aug 2012 20:29:44 -0700, Ian Minett wrote: > > >So, the data transfer here is just like the normal PCM streaming? > >For example, if you have an op like > > > > int (*load_dsp)(struct hda_bus *bus, void *buffer, int size); > > > >and calling this for each segment would work? > >(In addition, we'd need to give some way to determine the stop > > condition in the codec side.) > > > > Hi, > > Yes - this approach would work. We would also need to set the data > format, and control the stop condition. > > For example, by adding the following ops to handle the dsp > download process: > > /* format is 16-bit Stream Format Structure as defined in HDA spec. > pcm_prepare() callback in the codec will be called so that codec driver > can obtain the stream tag and format to set up the codec. > */ > int (*load_dsp_prepare) \ > (struct hda_bus *bus, unsigned short format, void *buffer, int size); > > /* start the transfer. */ > int (*load_dsp_start)(struct hda_bus *bus); > > /* stop the transfer and flush the FIFO. */ > int (*load_dsp_stop)(struct hda_bus *bus); Looks good, but I think start and stop can be a single trigger like PCM op, something like: int (*load_dsp_trigger)(struct hda_bus *bus, bool start); The second argument could be a generic int like PCM op, but I don't think we'd need pause or suspend/resume command for DSP loader :) Takashi