1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct v4l2_subdev_audio_ops</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-struct-v4l2-subdev-tuner-ops.html" title="struct v4l2_subdev_tuner_ops"><link rel="next" href="API-struct-v4l2-mbus-frame-desc-entry.html" title="struct v4l2_mbus_frame_desc_entry"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct v4l2_subdev_audio_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-v4l2-subdev-tuner-ops.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-v4l2-mbus-frame-desc-entry.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-v4l2-subdev-audio-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct v4l2_subdev_audio_ops — 2 Callbacks used for audio-related settings 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct v4l2_subdev_audio_ops { 5 int (* s_clock_freq) (struct v4l2_subdev *sd, u32 freq); 6 int (* s_i2s_clock_freq) (struct v4l2_subdev *sd, u32 freq); 7 int (* s_routing) (struct v4l2_subdev *sd, u32 input, u32 output, u32 config); 8 int (* s_stream) (struct v4l2_subdev *sd, int enable); 9}; </pre></div><div class="refsect1"><a name="id-1.8.2.81.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">s_clock_freq</span></dt><dd><p> 10 set the frequency (in Hz) of the audio clock output. 11 Used to slave an audio processor to the video decoder, ensuring that 12 audio and video remain synchronized. Usual values for the frequency 13 are 48000, 44100 or 32000 Hz. If the frequency is not supported, then 14 -EINVAL is returned. 15 </p></dd><dt><span class="term">s_i2s_clock_freq</span></dt><dd><p> 16 sets I2S speed in bps. This is used to provide a standard 17 way to select I2S clock used by driving digital audio streams at some 18 board designs. Usual values for the frequency are 1024000 and 2048000. 19 If the frequency is not supported, then -EINVAL is returned. 20 </p></dd><dt><span class="term">s_routing</span></dt><dd><p> 21 used to define the input and/or output pins of an audio chip, 22 and any additional configuration data. 23 Never attempt to use user-level input IDs (e.g. Composite, S-Video, 24 Tuner) at this level. An i2c device shouldn't know about whether an 25 input pin is connected to a Composite connector, become on another 26 board or platform it might be connected to something else entirely. 27 The calling driver is responsible for mapping a user-level input to 28 the right pins on the i2c device. 29 </p></dd><dt><span class="term">s_stream</span></dt><dd><p> 30 used to notify the audio code that stream will start or has 31 stopped. 32 </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-v4l2-subdev-tuner-ops.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-v4l2-mbus-frame-desc-entry.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct v4l2_subdev_tuner_ops</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct v4l2_mbus_frame_desc_entry</span></td></tr></table></div></body></html> 33