'\" t .\" Title: struct snd_compr_ops .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Compress Offload .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRUCT SND_COMPR_OPS" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Compress Offload" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" struct_snd_compr_ops \- .SH "SYNOPSIS" .sp .nf struct snd_compr_ops { int (* open) (struct snd_compr_stream *stream); int (* free) (struct snd_compr_stream *stream); int (* set_params) (struct snd_compr_stream *stream,struct snd_compr_params *params); int (* get_params) (struct snd_compr_stream *stream,struct snd_codec *params); int (* set_metadata) (struct snd_compr_stream *stream,struct snd_compr_metadata *metadata); int (* get_metadata) (struct snd_compr_stream *stream,struct snd_compr_metadata *metadata); int (* trigger) (struct snd_compr_stream *stream, int cmd); int (* pointer) (struct snd_compr_stream *stream,struct snd_compr_tstamp *tstamp); int (* copy) (struct snd_compr_stream *stream, char __user *buf,size_t count); int (* mmap) (struct snd_compr_stream *stream,struct vm_area_struct *vma); int (* ack) (struct snd_compr_stream *stream, size_t bytes); int (* get_caps) (struct snd_compr_stream *stream,struct snd_compr_caps *caps); int (* get_codec_caps) (struct snd_compr_stream *stream,struct snd_compr_codec_caps *codec); }; .fi .SH "MEMBERS" .PP open .RS 4 Open the compressed stream This callback is mandatory and shall keep dsp ready to receive the stream parameter .RE .PP free .RS 4 Close the compressed stream, mandatory .RE .PP set_params .RS 4 Sets the compressed stream parameters, mandatory This can be called in during stream creation only to set codec params and the stream properties .RE .PP get_params .RS 4 retrieve the codec parameters, mandatory .RE .PP set_metadata .RS 4 Set the metadata values for a stream .RE .PP get_metadata .RS 4 retrieves the requested metadata values from stream .RE .PP trigger .RS 4 Trigger operations like start, pause, resume, drain, stop\&. This callback is mandatory .RE .PP pointer .RS 4 Retrieve current h/w pointer information\&. Mandatory .RE .PP copy .RS 4 Copy the compressed data to/from userspace, Optional Can\*(Aqt be implemented if DSP supports mmap .RE .PP mmap .RS 4 DSP mmap method to mmap DSP memory .RE .PP ack .RS 4 Ack for DSP when data is written to audio buffer, Optional Not valid if copy is implemented .RE .PP get_caps .RS 4 Retrieve DSP capabilities, mandatory .RE .PP get_codec_caps .RS 4 Retrieve capabilities for a specific codec, mandatory .RE .SH "COPYRIGHT" .br