\hypertarget{g__audio_8c_source}{}\doxysection{g\+\_\+audio.\+c}
\label{g__audio_8c_source}\index{dev/usb/gadget/g\_audio.c@{dev/usb/gadget/g\_audio.c}}
\mbox{\hyperlink{g__audio_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00006}00006 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00007}00007 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00008}00008 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00009}00009 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00011}00011 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00013}00013 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00014}00014 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00015}00015 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00016}00016 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00017}00017 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00018}00018 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00019}00019 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00020}00020 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00021}00021 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00022}00022 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00023}00023 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00024}00024 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00025}00025 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00028}00028 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00029}00029 \textcolor{comment}{ * USB audio specs: http://www.usb.org/developers/devclass\_docs/audio10.pdf}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00030}00030 \textcolor{comment}{ *                  http://www.usb.org/developers/devclass\_docs/frmts10.pdf}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00031}00031 \textcolor{comment}{ *                  http://www.usb.org/developers/devclass\_docs/termt10.pdf}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00035}\mbox{\hyperlink{g__audio_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00035}} \mbox{\hyperlink{g__audio_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/linker\_set.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__cdc_8h}{dev/usb/usb\_cdc.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbhid_8h}{dev/usb/usbhid.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00060}00060 \textcolor{preprocessor}{\#include "{}usb\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00062}\mbox{\hyperlink{g__audio_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00062}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR g\_audio\_debug}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__audio_8h}{dev/usb/gadget/g\_audio.h}}>}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00067}00067 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00068}\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acd7dd71be493c7b142fdf0dad0622b1c}{00068}}         \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acd7dd71be493c7b142fdf0dad0622b1c}{G\_AUDIO\_ISOC0\_RD}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00069}\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a21831d203980934cb5a53b350c92043b}{00069}}         \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a21831d203980934cb5a53b350c92043b}{G\_AUDIO\_ISOC1\_RD}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00070}\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{00070}}         \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00071}\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{00071}}         \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{G\_AUDIO\_ISOC1\_WR}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00072}\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{00072}}         \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{G\_AUDIO\_N\_TRANSFER}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00073}00073 \};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00075}\mbox{\hyperlink{structg__audio__softc}{00075}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00076}\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{00076}}         \textcolor{keyword}{struct }mtx \mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00077}\mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{00077}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__callout}{usb\_callout}} \mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{sc\_callout}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00078}\mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{00078}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__callout}{usb\_callout}} \mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{sc\_watchdog}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00079}\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{00079}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{G\_AUDIO\_N\_TRANSFER}}];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00081}\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{00081}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00082}\mbox{\hyperlink{structg__audio__softc_ad69bf83144ac748ed600fdc6b7886210}{00082}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_ad69bf83144ac748ed600fdc6b7886210}{sc\_pattern\_len}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00083}\mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{00083}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{sc\_throughput}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00084}\mbox{\hyperlink{structg__audio__softc_a1ab98e51dc4743856aaef3b688161e97}{00084}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_a1ab98e51dc4743856aaef3b688161e97}{sc\_tx\_interval}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00085}\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{00085}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00086}\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{00086}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00088}\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{00088}}         int8\_t  \mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}}[\mbox{\hyperlink{g__audio_8h_a35a5fee9becdc3d82b3672c7ae52f71f}{G\_AUDIO\_MAX\_STRLEN}}];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00090}\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{00090}}         uint16\_t \mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[2][\mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00092}\mbox{\hyperlink{structg__audio__softc_aa76819b221d5597d3daaa38b674af855}{00092}}         int16\_t \mbox{\hyperlink{structg__audio__softc_aa76819b221d5597d3daaa38b674af855}{sc\_data\_buf}}[2][\mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / 2];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00094}\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{00094}}         uint8\_t \mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}}[32];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00095}\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{00095}}         uint8\_t \mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}}[32];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00096}\mbox{\hyperlink{structg__audio__softc_a570bfd4aab6a2cd434da8e96b91bcb8e}{00096}}         uint8\_t \mbox{\hyperlink{structg__audio__softc_a570bfd4aab6a2cd434da8e96b91bcb8e}{sc\_sample\_rate}}[32];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00097}00097 \};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00099}\mbox{\hyperlink{g__audio_8c_a1c2ce8144a35775de70fc13362299b3a}{00099}} \textcolor{keyword}{static} \mbox{\hyperlink{g__audio_8c_a1c2ce8144a35775de70fc13362299b3a}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, g\_audio, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00100}00100     \textcolor{stringliteral}{"{}USB audio gadget"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00102}00102 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00103}00103 \textcolor{keyword}{static} \textcolor{keywordtype}{int} g\_audio\_debug = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00105}00105 \mbox{\hyperlink{g__audio_8c_afc865fff93590c79eb24db8bd4551ebc}{SYSCTL\_INT}}(\_hw\_usb\_g\_audio, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00106}00106     \&g\_audio\_debug, 0, \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00107}00107 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00109}\mbox{\hyperlink{g__audio_8c_ab650ad063e37b850cc5ef75aa63dfe66}{00109}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__audio_8c_ab650ad063e37b850cc5ef75aa63dfe66}{g\_audio\_mode}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00111}\mbox{\hyperlink{g__audio_8c_afc865fff93590c79eb24db8bd4551ebc}{00111}} \mbox{\hyperlink{g__audio_8c_afc865fff93590c79eb24db8bd4551ebc}{SYSCTL\_INT}}(\_hw\_usb\_g\_audio, OID\_AUTO, mode, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00112}00112     \&\mbox{\hyperlink{g__audio_8c_ab650ad063e37b850cc5ef75aa63dfe66}{g\_audio\_mode}}, 0, \textcolor{stringliteral}{"{}Mode selection"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00114}\mbox{\hyperlink{g__audio_8c_ab1a7a5db7aead6acd8395665edfa8922}{00114}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__audio_8c_ab1a7a5db7aead6acd8395665edfa8922}{g\_audio\_pattern\_interval}} = 1000;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00116}\mbox{\hyperlink{g__audio_8c_aeecd148428b7c13d57bcf9d770bd76c9}{00116}} \mbox{\hyperlink{g__audio_8c_afc865fff93590c79eb24db8bd4551ebc}{SYSCTL\_INT}}(\_hw\_usb\_g\_audio, OID\_AUTO, pattern\_interval, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00117}00117     \&\mbox{\hyperlink{g__audio_8c_ab1a7a5db7aead6acd8395665edfa8922}{g\_audio\_pattern\_interval}}, 0, \textcolor{stringliteral}{"{}Pattern interval in milliseconds"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00119}\mbox{\hyperlink{g__audio_8c_aa53331045606aba77e59ebc3a3be4615}{00119}} \textcolor{keyword}{static} \textcolor{keywordtype}{char} \mbox{\hyperlink{g__audio_8c_aa53331045606aba77e59ebc3a3be4615}{g\_audio\_pattern\_data}}[\mbox{\hyperlink{g__audio_8h_a35a5fee9becdc3d82b3672c7ae52f71f}{G\_AUDIO\_MAX\_STRLEN}}];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00121}\mbox{\hyperlink{g__audio_8c_a5b2366cc4d04672fb674775660109e5b}{00121}} \mbox{\hyperlink{g__audio_8c_a5b2366cc4d04672fb674775660109e5b}{SYSCTL\_STRING}}(\_hw\_usb\_g\_audio, OID\_AUTO, pattern, CTLFLAG\_RW,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00122}00122     \&\mbox{\hyperlink{g__audio_8c_aa53331045606aba77e59ebc3a3be4615}{g\_audio\_pattern\_data}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__audio_8c_aa53331045606aba77e59ebc3a3be4615}{g\_audio\_pattern\_data}}), \textcolor{stringliteral}{"{}Data pattern"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00124}\mbox{\hyperlink{g__audio_8c_a9b6777a108b81fd9c3cec75cedad7190}{00124}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__audio_8c_a9b6777a108b81fd9c3cec75cedad7190}{g\_audio\_throughput}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00126}\mbox{\hyperlink{g__audio_8c_abc93ed3c2caf42f4b0bb81c2afb5ae52}{00126}} \mbox{\hyperlink{g__audio_8c_afc865fff93590c79eb24db8bd4551ebc}{SYSCTL\_INT}}(\_hw\_usb\_g\_audio, OID\_AUTO, throughput, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00127}00127     \&\mbox{\hyperlink{g__audio_8c_a9b6777a108b81fd9c3cec75cedad7190}{g\_audio\_throughput}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__audio_8c_a9b6777a108b81fd9c3cec75cedad7190}{g\_audio\_throughput}}), \textcolor{stringliteral}{"{}Throughput in bytes per second"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00129}\mbox{\hyperlink{g__audio_8c_ac334bed57a350fe48c02cf2ebfa5e812}{00129}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{g__audio_8c_ac334bed57a350fe48c02cf2ebfa5e812}{g\_audio\_probe}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00130}\mbox{\hyperlink{g__audio_8c_ad2f501ab3ac8de1ab63713abfcfe73a1}{00130}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{g__audio_8c_ad2f501ab3ac8de1ab63713abfcfe73a1}{g\_audio\_attach}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00131}\mbox{\hyperlink{g__audio_8c_a05743eb2a9d100f91d7a5b72710c21e7}{00131}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{g__audio_8c_a05743eb2a9d100f91d7a5b72710c21e7}{g\_audio\_detach}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00132}\mbox{\hyperlink{g__audio_8c_a47f61f5d8fe9513c92a71cbf453e9ebc}{00132}} \textcolor{keyword}{static} usb\_handle\_request\_t \mbox{\hyperlink{g__audio_8c_a47f61f5d8fe9513c92a71cbf453e9ebc}{g\_audio\_handle\_request}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00134}\mbox{\hyperlink{g__audio_8c_a4c3b16f95df1c724ca5413a96c496f57}{00134}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{g__audio_8c_a4c3b16f95df1c724ca5413a96c496f57}{g\_audio\_isoc\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00135}\mbox{\hyperlink{g__audio_8c_abe1f72be9e53db8317bc3348b2ce2c7f}{00135}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{g__audio_8c_abe1f72be9e53db8317bc3348b2ce2c7f}{g\_audio\_isoc\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00137}\mbox{\hyperlink{g__audio_8c_a4120cd7866c1da342e1964d2ed21ad9f}{00137}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{g__audio_8c_a4120cd7866c1da342e1964d2ed21ad9f}{g\_audio\_devclass}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00139}00139 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__audio_8c_ae12389d0c1f0e1d747c7bd4d4f4bb937}{g\_audio\_watchdog}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00140}00140 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__audio_8c_a168807024a8dcfb2aa34e9cd28c67a45}{g\_audio\_timeout}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00142}\mbox{\hyperlink{g__audio_8c_a9a24ffee22fbb701037415fac0ec926f}{00142}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{g__audio_8c_a9a24ffee22fbb701037415fac0ec926f}{g\_audio\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00143}00143         \textcolor{comment}{/* USB interface */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00144}00144         DEVMETHOD(\mbox{\hyperlink{usb__handle__request_8c_acd7ff252b93f3bd9e87d0f8b3eb3ffa5}{usb\_handle\_request}}, \mbox{\hyperlink{g__audio_8c_a47f61f5d8fe9513c92a71cbf453e9ebc}{g\_audio\_handle\_request}}),}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00146}00146         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00147}00147         DEVMETHOD(device\_probe, \mbox{\hyperlink{g__audio_8c_ac334bed57a350fe48c02cf2ebfa5e812}{g\_audio\_probe}}),}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00148}00148         DEVMETHOD(device\_attach, \mbox{\hyperlink{g__audio_8c_ad2f501ab3ac8de1ab63713abfcfe73a1}{g\_audio\_attach}}),}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00149}00149         DEVMETHOD(device\_detach, \mbox{\hyperlink{g__audio_8c_a05743eb2a9d100f91d7a5b72710c21e7}{g\_audio\_detach}}),}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00151}00151         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00152}00152 \};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00154}\mbox{\hyperlink{g__audio_8c_a3d1c555e81ca8b937d547ae03f86eaaf}{00154}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{g__audio_8c_a3d1c555e81ca8b937d547ae03f86eaaf}{g\_audio\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00155}00155         .name = \textcolor{stringliteral}{"{}g\_audio"{}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00156}00156         .methods = \mbox{\hyperlink{g__audio_8c_a9a24ffee22fbb701037415fac0ec926f}{g\_audio\_methods}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00157}00157         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}}),}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00158}00158 \};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00160}\mbox{\hyperlink{g__audio_8c_abf57bd9e2867ffb7624a8a831ea18652}{00160}} \mbox{\hyperlink{g__audio_8c_abf57bd9e2867ffb7624a8a831ea18652}{DRIVER\_MODULE}}(g\_audio, uhub, \mbox{\hyperlink{g__audio_8c_a3d1c555e81ca8b937d547ae03f86eaaf}{g\_audio\_driver}}, \mbox{\hyperlink{g__audio_8c_a4120cd7866c1da342e1964d2ed21ad9f}{g\_audio\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00161}\mbox{\hyperlink{g__audio_8c_ada0076abc9daf9d8548279656641e8b3}{00161}} \mbox{\hyperlink{g__audio_8c_ada0076abc9daf9d8548279656641e8b3}{MODULE\_DEPEND}}(g\_audio, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00163}\mbox{\hyperlink{g__audio_8c_a02ca9418ae21aa5f7855b75c55696d1a}{00163}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{g__audio_8c_a02ca9418ae21aa5f7855b75c55696d1a}{g\_audio\_config}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{G\_AUDIO\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00164}00164         [\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acd7dd71be493c7b142fdf0dad0622b1c}{G\_AUDIO\_ISOC0\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00165}00165                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00166}00166                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00167}00167                 .direction = \mbox{\hyperlink{usb_8h_a6e0258e8570573ddabdd296569db720e}{UE\_DIR\_RX}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00168}00168                 .flags = \{.ext\_buffer = 1,.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00169}00169                 .bufsize = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00170}00170                 .callback = \&\mbox{\hyperlink{g__audio_8c_a4c3b16f95df1c724ca5413a96c496f57}{g\_audio\_isoc\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00171}00171                 .frames = \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00172}00172                 .usb\_mode = \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00173}00173                 .if\_index = 1,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00174}00174         \},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00176}00176         [\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a21831d203980934cb5a53b350c92043b}{G\_AUDIO\_ISOC1\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00177}00177                 .type = \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00178}00178                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00179}00179                 .direction = \mbox{\hyperlink{usb_8h_a6e0258e8570573ddabdd296569db720e}{UE\_DIR\_RX}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00180}00180                 .flags = \{.ext\_buffer = 1,.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00181}00181                 .bufsize = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00182}00182                 .callback = \&\mbox{\hyperlink{g__audio_8c_a4c3b16f95df1c724ca5413a96c496f57}{g\_audio\_isoc\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00183}00183                 .frames = \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00184}00184                 .usb\_mode = \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00185}00185                 .if\_index = 1,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00186}00186         \},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00188}00188         [\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00189}00189                 .type = \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00190}00190                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00191}00191                 .direction = \mbox{\hyperlink{usb_8h_aba70c1d0c8b6a6cd3452b304d9a981ba}{UE\_DIR\_TX}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00192}00192                 .flags = \{.ext\_buffer = 1,.pipe\_bof = 1,\},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00193}00193                 .bufsize = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00194}00194                 .callback = \&\mbox{\hyperlink{g__audio_8c_abe1f72be9e53db8317bc3348b2ce2c7f}{g\_audio\_isoc\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00195}00195                 .frames = \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00196}00196                 .usb\_mode = \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00197}00197                 .if\_index = 2,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00198}00198         \},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00200}00200         [\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{G\_AUDIO\_ISOC1\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00201}00201                 .type = \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00202}00202                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00203}00203                 .direction = \mbox{\hyperlink{usb_8h_aba70c1d0c8b6a6cd3452b304d9a981ba}{UE\_DIR\_TX}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00204}00204                 .flags = \{.ext\_buffer = 1,.pipe\_bof = 1,\},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00205}00205                 .bufsize = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00206}00206                 .callback = \&\mbox{\hyperlink{g__audio_8c_abe1f72be9e53db8317bc3348b2ce2c7f}{g\_audio\_isoc\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00207}00207                 .frames = \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00208}00208                 .usb\_mode = \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00209}00209                 .if\_index = 2,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00210}00210         \},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00211}00211 \};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00213}00213 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00214}\mbox{\hyperlink{g__audio_8c_a77d1fcc586a6d9fcb8d689d397544168}{00214}} \mbox{\hyperlink{g__audio_8c_a77d1fcc586a6d9fcb8d689d397544168}{g\_audio\_timeout\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00215}00215 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00216}00216         \textcolor{keywordtype}{int} i = \mbox{\hyperlink{g__audio_8c_ab1a7a5db7aead6acd8395665edfa8922}{g\_audio\_pattern\_interval}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00218}00218         sc-\/>\mbox{\hyperlink{structg__audio__softc_a1ab98e51dc4743856aaef3b688161e97}{sc\_tx\_interval}} = i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00220}00220         \textcolor{keywordflow}{if} (i <= 0)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00221}00221                 i = 1;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00222}00222         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i > 1023)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00223}00223                 i = 1023;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00224}00224 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00225}00225         i = \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(i);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00227}00227         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{sc\_callout}}, i, \&\mbox{\hyperlink{g__audio_8c_a168807024a8dcfb2aa34e9cd28c67a45}{g\_audio\_timeout}}, sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00228}00228 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00230}00230 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00231}\mbox{\hyperlink{g__audio_8c_a168807024a8dcfb2aa34e9cd28c67a45}{00231}} \mbox{\hyperlink{g__audio_8c_a168807024a8dcfb2aa34e9cd28c67a45}{g\_audio\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00232}00232 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00233}00233         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00235}00235         sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} = \mbox{\hyperlink{g__audio_8c_ab650ad063e37b850cc5ef75aa63dfe66}{g\_audio\_mode}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00237}00237         memcpy(sc-\/>\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}}, \mbox{\hyperlink{g__audio_8c_aa53331045606aba77e59ebc3a3be4615}{g\_audio\_pattern\_data}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00239}00239         sc-\/>\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}}[\mbox{\hyperlink{g__audio_8h_a35a5fee9becdc3d82b3672c7ae52f71f}{G\_AUDIO\_MAX\_STRLEN}} -\/ 1] = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00241}00241         sc-\/>\mbox{\hyperlink{structg__audio__softc_ad69bf83144ac748ed600fdc6b7886210}{sc\_pattern\_len}} = strlen(sc-\/>\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00243}00243         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} != \mbox{\hyperlink{g__audio_8h_ab3172f25f85f36353ca3d007d751320e}{G\_AUDIO\_MODE\_LOOP}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00244}00244                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00245}00245                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{G\_AUDIO\_ISOC1\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00246}00246         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00247}00247         \mbox{\hyperlink{g__audio_8c_a77d1fcc586a6d9fcb8d689d397544168}{g\_audio\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00248}00248 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00250}00250 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00251}\mbox{\hyperlink{g__audio_8c_af959a03d5fec79b0a0d8ddc632f3dfac}{00251}} \mbox{\hyperlink{g__audio_8c_af959a03d5fec79b0a0d8ddc632f3dfac}{g\_audio\_watchdog\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00252}00252 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00253}00253         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{sc\_watchdog}}, hz, \&\mbox{\hyperlink{g__audio_8c_ae12389d0c1f0e1d747c7bd4d4f4bb937}{g\_audio\_watchdog}}, sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00254}00254 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00256}00256 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00257}\mbox{\hyperlink{g__audio_8c_ae12389d0c1f0e1d747c7bd4d4f4bb937}{00257}} \mbox{\hyperlink{g__audio_8c_ae12389d0c1f0e1d747c7bd4d4f4bb937}{g\_audio\_watchdog}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00258}00258 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00259}00259         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00260}00260         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00262}00262         i = sc-\/>\mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{sc\_throughput}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00264}00264         sc-\/>\mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{sc\_throughput}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00266}00266         \mbox{\hyperlink{g__audio_8c_a9b6777a108b81fd9c3cec75cedad7190}{g\_audio\_throughput}} = i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00268}00268         \mbox{\hyperlink{g__audio_8c_af959a03d5fec79b0a0d8ddc632f3dfac}{g\_audio\_watchdog\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00269}00269 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00271}00271 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00272}\mbox{\hyperlink{g__audio_8c_a01c9c1ad1eaa914b0609f2bb4e6b7e70}{00272}} \mbox{\hyperlink{g__audio_8c_ac334bed57a350fe48c02cf2ebfa5e812}{g\_audio\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00273}00273 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00274}00274         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00276}00276         DPRINTFN(11, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00278}00278         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}})}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00279}00279                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00281}00281         \textcolor{keywordflow}{if} ((uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_ab0d02dc59a6a042d2de8c12708afc8b3}{bInterfaceClass}} == \mbox{\hyperlink{usb_8h_aacca2848a0c268f03af7215d28c8b1be}{UICLASS\_AUDIO}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00282}00282             (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_aa8ed5421fc671dcbd1fefb09180b604c}{bInterfaceSubClass}} == \mbox{\hyperlink{usb_8h_ab53c8afe6939f02d09160586906db642}{UISUBCLASS\_AUDIOCONTROL}}))}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00283}00283                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00285}00285         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00286}00286 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00288}00288 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00289}\mbox{\hyperlink{g__audio_8c_a540d168bc2bcd18df1fadf760bfd93ef}{00289}} \mbox{\hyperlink{g__audio_8c_ad2f501ab3ac8de1ab63713abfcfe73a1}{g\_audio\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00290}00290 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00291}00291         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00292}00292         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00293}00293         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00294}00294         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00295}00295         uint8\_t iface\_index[3];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00297}00297         DPRINTFN(11, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00299}00299         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00301}00301         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}}, \textcolor{stringliteral}{"{}g\_audio"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00303}00303         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{sc\_callout}}, \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00304}00304         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{sc\_watchdog}}, \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00306}00306         sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} = \mbox{\hyperlink{g__audio_8h_a9bf3d42bb369caac38347df3045db7e6}{G\_AUDIO\_MODE\_SILENT}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00307}00307 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00308}00308         sc-\/>\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}} = 1;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00310}00310         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00311}00311                 sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[0][i] = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00312}00312                 sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[1][i] = \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00313}00313         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00315}00315         iface\_index[0] = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00316}00316         iface\_index[1] = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} + 1;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00317}00317         iface\_index[2] = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} + 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00319}00319         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__device_8c_a04693d160af658ae93ddddeac41e6ef2}{usbd\_set\_alt\_interface\_index}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, iface\_index[1], 1);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00320}00320         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00321}00321                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}alt iface setting error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00322}00322                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00323}00323         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00324}00324         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__device_8c_a04693d160af658ae93ddddeac41e6ef2}{usbd\_set\_alt\_interface\_index}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, iface\_index[2], 1);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00325}00325         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00326}00326                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}alt iface setting error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00327}00327                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00329}00329         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00330}00330             iface\_index, sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}, \mbox{\hyperlink{g__audio_8c_a02ca9418ae21aa5f7855b75c55696d1a}{g\_audio\_config}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00331}00331             \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{G\_AUDIO\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00333}00333         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00334}00334                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00335}00335                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00336}00336         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00337}00337         \mbox{\hyperlink{usb__device_8c_a6aef4e9889e1a62a17d7c7ac8f0d2bfa}{usbd\_set\_parent\_iface}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, iface\_index[1], iface\_index[0]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00338}00338         \mbox{\hyperlink{usb__device_8c_a6aef4e9889e1a62a17d7c7ac8f0d2bfa}{usbd\_set\_parent\_iface}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, iface\_index[2], iface\_index[0]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00340}00340         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00342}00342         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acd7dd71be493c7b142fdf0dad0622b1c}{G\_AUDIO\_ISOC0\_RD}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00343}00343         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a21831d203980934cb5a53b350c92043b}{G\_AUDIO\_ISOC1\_RD}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00345}00345         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00346}00346         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{G\_AUDIO\_ISOC1\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00347}00347 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00348}00348         \mbox{\hyperlink{g__audio_8c_a77d1fcc586a6d9fcb8d689d397544168}{g\_audio\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00350}00350         \mbox{\hyperlink{g__audio_8c_af959a03d5fec79b0a0d8ddc632f3dfac}{g\_audio\_watchdog\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00352}00352         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00353}00353 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00354}00354         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00356}00356 detach:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00357}00357         \mbox{\hyperlink{g__audio_8c_a05743eb2a9d100f91d7a5b72710c21e7}{g\_audio\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00359}00359         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* error */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00360}00360 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00362}00362 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00363}\mbox{\hyperlink{g__audio_8c_a773855f6b743eb93197a3ab220e28373}{00363}} \mbox{\hyperlink{g__audio_8c_a05743eb2a9d100f91d7a5b72710c21e7}{g\_audio\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00364}00364 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00365}00365         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00367}00367         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00369}00369         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00370}00370         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{sc\_callout}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00371}00371         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{sc\_watchdog}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00372}00372         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00374}00374         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}, \mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04a68dea0ad423a90b2144b62111011285f}{G\_AUDIO\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00376}00376         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a9a008982f2896c831bfdf4358b0a8e53}{sc\_callout}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00377}00377         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_aa10d02652646bd61b49c20db15771428}{sc\_watchdog}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00379}00379         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__audio__softc_a31eea480cb746397484b8532445e270c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00381}00381         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00382}00382 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00384}00384 \textcolor{keyword}{static} int32\_t}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00385}\mbox{\hyperlink{g__audio_8c_a91ec382a3e72d85993ce33eebcc4fdf2}{00385}} \mbox{\hyperlink{g__audio_8c_a91ec382a3e72d85993ce33eebcc4fdf2}{g\_noise}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00387}00387         uint32\_t temp;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00388}00388         \textcolor{keyword}{const} uint32\_t prime = 0xFFFF1D;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00390}00390         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}} \& 1) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00391}00391                 sc-\/>\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}} += prime;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00392}00392         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00393}00393         sc-\/>\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}} /= 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00395}00395         temp = sc-\/>\mbox{\hyperlink{structg__audio__softc_ab9d3177bf4050d395a138d3f8e2f4622}{sc\_noise\_rem}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00397}00397         \textcolor{comment}{/* unsigned to signed conversion */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00399}00399         temp \string^= 0x800000;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00400}00400         \textcolor{keywordflow}{if} (temp \& 0x800000) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00401}00401                 temp |= (-\/0x800000);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00402}00402         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00403}00403         \textcolor{keywordflow}{return} temp;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00404}00404 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00406}00406 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00407}\mbox{\hyperlink{g__audio_8c_a1a0e3ab34505308159a9c426221219d0}{00407}} \mbox{\hyperlink{g__audio_8c_a1a0e3ab34505308159a9c426221219d0}{g\_audio\_make\_samples}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc, int16\_t *ptr, \textcolor{keywordtype}{int} samples)}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00408}00408 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00409}00409         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00410}00410         \textcolor{keywordtype}{int} j;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00411}00411 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00412}00412         \textcolor{keywordflow}{for} (i = 0; i != samples; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00413}00413                 j = \mbox{\hyperlink{g__audio_8c_a91ec382a3e72d85993ce33eebcc4fdf2}{g\_noise}}(sc);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00415}00415                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}} < 0) || (sc-\/>\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}} >= sc-\/>\mbox{\hyperlink{structg__audio__softc_ad69bf83144ac748ed600fdc6b7886210}{sc\_pattern\_len}}))}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00416}00416                         sc-\/>\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00417}00417 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00418}00418                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_ad69bf83144ac748ed600fdc6b7886210}{sc\_pattern\_len}} != 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00419}00419                         j = (j * sc-\/>\mbox{\hyperlink{structg__audio__softc_a42baa72591db45b34ff08ab06638b65c}{sc\_pattern}}[sc-\/>\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}}]) >> 16;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00420}00420                         sc-\/>\mbox{\hyperlink{structg__audio__softc_a2b8432b17369bbefaa8990eeb1f22b95}{sc\_state}}++;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00421}00421                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00422}00422                 *ptr++ = j / 256;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00423}00423                 *ptr++ = j / 256;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00424}00424         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00425}00425 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00427}00427 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00428}\mbox{\hyperlink{g__audio_8c_adc99ce66594ce444654db1f333b0948d}{00428}} \mbox{\hyperlink{g__audio_8c_abe1f72be9e53db8317bc3348b2ce2c7f}{g\_audio\_isoc\_write\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00429}00429 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00430}00430         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00431}00431         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00432}00432         \textcolor{keywordtype}{int} aframes;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00433}00433         \textcolor{keywordtype}{int} nr = (xfer == sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}}]) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00434}00434         int16\_t *ptr;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00435}00435         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00437}00437         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, \&aframes, NULL);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00439}00439         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}st=\%d aframes=\%d actlen=\%d bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00440}00440             \mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer), aframes, actlen);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00442}00442         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00443}00443         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00445}00445                 sc-\/>\mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{sc\_throughput}} += actlen;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00447}00447                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} == \mbox{\hyperlink{g__audio_8h_ab3172f25f85f36353ca3d007d751320e}{G\_AUDIO\_MODE\_LOOP}})}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00448}00448                         \textcolor{keywordflow}{break};          \textcolor{comment}{/* sync with RX */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00450}00450         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00451}00451 tr\_setup:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00452}00452 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00453}00453                 ptr = sc-\/>\mbox{\hyperlink{structg__audio__softc_aa76819b221d5597d3daaa38b674af855}{sc\_data\_buf}}[nr];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00455}00455                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} == \mbox{\hyperlink{g__audio_8h_a148caad1cfb7cfa1dc9f870f390c5e44}{G\_AUDIO\_MODE\_PATTERN}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00456}00456                         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00457}00457                                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, i, ptr, sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[nr][i]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00458}00458 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00459}00459                                 \mbox{\hyperlink{g__audio_8c_a1a0e3ab34505308159a9c426221219d0}{g\_audio\_make\_samples}}(sc, ptr, (\mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}) / 2);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00460}00460 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00461}00461                                 ptr += (\mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}) / 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00462}00462                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00463}00463                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__audio__softc_a1b2754f475500f92c75e16b440b38874}{sc\_mode}} == \mbox{\hyperlink{g__audio_8h_ab3172f25f85f36353ca3d007d751320e}{G\_AUDIO\_MODE\_LOOP}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00464}00464                         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00465}00465                                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, i, ptr, sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[nr][i] \& \string~3);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00467}00467                                 \mbox{\hyperlink{g__audio_8c_a1a0e3ab34505308159a9c426221219d0}{g\_audio\_make\_samples}}(sc, ptr, sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[nr][i] / 4);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00469}00469                                 ptr += (\mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}) / 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00470}00470                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00471}00471                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00472}00472                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00473}00473 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00474}00474         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00475}00475                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00476}00476 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00477}00477                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00478}00478                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00479}00479                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00480}00480                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00481}00481                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00482}00482                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00483}00483         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00484}00484 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00486}00486 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00487}\mbox{\hyperlink{g__audio_8c_adb9ca8a604cd5040e056f02071bc3ab2}{00487}} \mbox{\hyperlink{g__audio_8c_a4c3b16f95df1c724ca5413a96c496f57}{g\_audio\_isoc\_read\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00488}00488 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00489}00489         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00490}00490         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00491}00491         \textcolor{keywordtype}{int} aframes;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00492}00492         \textcolor{keywordtype}{int} nr = (xfer == sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acd7dd71be493c7b142fdf0dad0622b1c}{G\_AUDIO\_ISOC0\_RD}}]) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00493}00493         int16\_t *ptr;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00494}00494         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00495}00495 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00496}00496         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, \&aframes, NULL);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00498}00498         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}st=\%d aframes=\%d actlen=\%d bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00499}00499             \mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer), aframes, actlen);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00501}00501         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00502}00502         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00504}00504                 sc-\/>\mbox{\hyperlink{structg__audio__softc_ad157272f0db6f1d71bda0c1d90154f96}{sc\_throughput}} += actlen;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00506}00506                 \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00507}00507                         sc-\/>\mbox{\hyperlink{structg__audio__softc_aab2c7eb11b803811d34001e7a6310b30}{sc\_data\_len}}[nr][i] = \mbox{\hyperlink{usb__transfer_8c_a4a41497e9ac637390a5147766c135968}{usbd\_xfer\_frame\_len}}(xfer, i);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00508}00508                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00509}00509 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00510}00510                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04acec2671bb68ccb69c10ed7bc3579a4c9}{G\_AUDIO\_ISOC0\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00511}00511                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_ac55a50c6ea22f8753006c511e0addc36}{sc\_xfer}}[\mbox{\hyperlink{g__audio_8c_abc6126af1d45847bc59afa0aa3216b04afcc5cc4210d960a8701915d44aac0a3c}{G\_AUDIO\_ISOC1\_WR}}]);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00512}00512 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00513}00513                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00515}00515         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00516}00516 tr\_setup:}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00517}00517                 ptr = sc-\/>\mbox{\hyperlink{structg__audio__softc_aa76819b221d5597d3daaa38b674af855}{sc\_data\_buf}}[nr];}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00519}00519                 \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00520}00520                         \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, i, ptr,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00521}00521                             \mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00523}00523                         ptr += (\mbox{\hyperlink{g__audio_8h_acd8ab8f9347d5e048924c427dfc0d4bd}{G\_AUDIO\_BUFSIZE}} / \mbox{\hyperlink{g__audio_8h_a90c0f217b2d20a9f71d13cbb6db51496}{G\_AUDIO\_FRAMES}}) / 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00524}00524                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00526}00526                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00527}00527                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00529}00529         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00530}00530                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00532}00532                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00533}00533                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00534}00534                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00535}00535                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00536}00536                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00537}00537                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00538}00538         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00539}00539 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00541}00541 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00542}\mbox{\hyperlink{g__audio_8c_a3a0518a450f3669de8e2c9452a8b7d85}{00542}} \mbox{\hyperlink{g__audio_8c_a47f61f5d8fe9513c92a71cbf453e9ebc}{g\_audio\_handle\_request}}(device\_t dev,}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00543}00543     \textcolor{keyword}{const} \textcolor{keywordtype}{void} *preq, \textcolor{keywordtype}{void} **\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}}, uint16\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}},}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00544}00544     uint16\_t \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, uint8\_t *\mbox{\hyperlink{usb__if_8m_a8a16a0091a5793ece040278427496b23}{pstate}})}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00545}00545 \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00546}00546         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__audio__softc}{g\_audio\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00547}00547         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}} = preq;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00548}00548         uint8\_t is\_complete = *\mbox{\hyperlink{usb__if_8m_a8a16a0091a5793ece040278427496b23}{pstate}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00549}00549 }
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00550}00550         \textcolor{keywordflow}{if} (!is\_complete) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00551}00551                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00552}00552                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x82 \textcolor{comment}{/* get min */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00553}00553                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00554}00554                                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}}, 0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00555}00555                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00556}00556                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00557}00557                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00558}00558                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00559}00559                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00560}00560                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00561}00561                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00562}00562                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x83 \textcolor{comment}{/* get max */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00563}00563                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00564}00564                                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}}, 0x2000);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00565}00565                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00566}00566                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00567}00567                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00568}00568                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00569}00569                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00570}00570                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00571}00571                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00572}00572                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x84 \textcolor{comment}{/* get residue */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00573}00573                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00574}00574                                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}}, 1);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00575}00575                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 2;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00576}00576                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a6c088fcf539618163aaabdab41939012}{sc\_volume\_limit}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00577}00577                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00578}00578                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00579}00579                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00580}00580                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00581}00581                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00582}00582                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x81 \textcolor{comment}{/* get value */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00583}00583                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00584}00584                                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}}, 0x2000);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00585}00585                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00586}00586                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00587}00587                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00588}00588                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00589}00589                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00590}00590                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00591}00591                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00592}00592                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x01 \textcolor{comment}{/* set value */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00593}00593                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00594}00594                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00595}00595                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a63f52095f9a995621a8239c82715725a}{sc\_volume\_setting}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00596}00596                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00597}00597                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00598}00598                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00599}00599                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00600}00600                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_ae76333beac1a7e3e2028f9081d1891fe}{UT\_WRITE\_CLASS\_ENDPOINT}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00601}00601                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == 0x01 \textcolor{comment}{/* set value */} )) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00602}00602                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00603}00603                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__audio__softc_a570bfd4aab6a2cd434da8e96b91bcb8e}{sc\_sample\_rate}});}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00604}00604                                 *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = \&sc-\/>\mbox{\hyperlink{structg__audio__softc_a570bfd4aab6a2cd434da8e96b91bcb8e}{sc\_sample\_rate}};}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00605}00605                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00606}00606                                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00607}00607                         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00608}00608                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00609}00609                 \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00610}00610         \}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00611}00611         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* use builtin handler */}}
\DoxyCodeLine{\Hypertarget{g__audio_8c_source_l00612}00612 \}}

\end{DoxyCode}
