/* * u_uac1.h -- interface to USB gadget "ALSA AUDIO" utilities * * Copyright (C) 2008 Bryan Wu <cooloney@kernel.org> * Copyright (C) 2008 Analog Devices, Inc * * Enter bugs at http://blackfin.uclinux.org/ * * Licensed under the GPL-2 or later. */ #ifndef __U_AUDIO_H #define __U_AUDIO_H #include <linux/device.h> #include <linux/err.h> #include <linux/usb/audio.h> #include <linux/usb/composite.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #define FILE_PCM_PLAYBACK "/dev/snd/pcmC0D0p" #define FILE_PCM_CAPTURE "/dev/snd/pcmC0D0c" #define FILE_CONTROL "/dev/snd/controlC0" #define UAC1_OUT_EP_MAX_PACKET_SIZE 200 #define UAC1_REQ_COUNT 256 #define UAC1_AUDIO_BUF_SIZE 48000 /* * This represents the USB side of an audio card device, managed by a USB * function which provides control and stream interfaces. */ struct gaudio_snd_dev { struct gaudio *card; struct file *filp; struct snd_pcm_substream *substream; int access; int format; int channels; int rate; }; struct gaudio { struct usb_function func; struct usb_gadget *gadget; /* ALSA sound device interfaces */ struct gaudio_snd_dev control; struct gaudio_snd_dev playback; struct gaudio_snd_dev capture; /* TODO */ }; struct f_uac1_opts { struct usb_function_instance func_inst; int req_buf_size; int req_count; int audio_buf_size; char *fn_play; char *fn_cap; char *fn_cntl; unsigned bound:1; unsigned fn_play_alloc:1; unsigned fn_cap_alloc:1; unsigned fn_cntl_alloc:1; struct mutex lock; int refcnt; }; int gaudio_setup(struct gaudio *card); void gaudio_cleanup(struct gaudio *the_card); size_t u_audio_playback(struct gaudio *card, void *buf, size_t count); int u_audio_get_playback_channels(struct gaudio *card); int u_audio_get_playback_rate(struct gaudio *card); #endif /* __U_AUDIO_H */ /commit/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/tipc/sysctl.c'> <input type='hidden' name='id' value='0becc0ae5b42828785b589f686725ff5bc3b9b25'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>net</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/tipc?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>tipc</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>sysctl.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='0becc0ae5b42828785b589f686725ff5bc3b9b25'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'> <tr><th>author</th><td>Thomas Gleixner <tglx@linutronix.de></td><td class='right'>2017-01-31 09:37:34 +0100</td></tr> <tr><th>committer</th><td>Thomas Gleixner <tglx@linutronix.de></td><td class='right'>2017-01-31 21:47:58 +0100</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>0becc0ae5b42828785b589f686725ff5bc3b9b25</a> (<a href='/cgit.cgi/linux/net-next.git/patch/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>be6d0e1f37c38ed0a7dd5da2d4b1e93f0fb43101</a> /<a href='/cgit.cgi/linux/net-next.git/tree/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>net/tipc/sysctl.c</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/tipc/sysctl.c?id=24c2503255d35c269b67162c397a1a1c1e02f6ce'>24c2503255d35c269b67162c397a1a1c1e02f6ce</a> (<a href='/cgit.cgi/linux/net-next.git/diff/net/tipc/sysctl.c?id=0becc0ae5b42828785b589f686725ff5bc3b9b25&id2=24c2503255d35c269b67162c397a1a1c1e02f6ce'>diff</a>)</td></tr></table> <div class='commit-subject'>x86/mce: Make timer handling more robust</div><div class='commit-msg'>Erik reported that on a preproduction hardware a CMCI storm triggers the BUG_ON in add_timer_on(). The reason is that the per CPU MCE timer is started by the CMCI logic before the MCE CPU hotplug callback starts the timer with add_timer_on(). So the timer is already queued which triggers the BUG. Using add_timer_on() is pretty pointless in this code because the timer is strictlty per CPU, initialized as pinned and all operations which arm the timer happen on the CPU to which the timer belongs. Simplify the whole machinery by using mod_timer() instead of add_timer_on() which avoids the problem because mod_timer() can handle already queued timers. Use __start_timer() everywhere so the earliest armed expiry time is preserved. Reported-by: Erik Veijola <erik.veijola@intel.com> Tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701310936080.3457@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de> </div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=0becc0ae5b42828785b589f686725ff5bc3b9b25'>Diffstat</a> (limited to 'net/tipc/sysctl.c')</div><table summary='diffstat' class='diffstat'>