[alsa-devel] [PATCHv2 - CA0132 HDA Codec 1/2] ALSA: Update Creative CA0132 codec to add DSP features.

Takashi Iwai tiwai at suse.de
Sat Aug 4 09:29:19 CEST 2012

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 :)


More information about the Alsa-devel mailing list