#include <linux/module.h> #include <sound/soc.h> #include <asm/mach-types.h> #include "../codecs/wm8940.h" #include "pxa2xx-i2s.h" static int imote2_asoc_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; unsigned int clk = 0; int ret; switch (params_rate(params)) { case 8000: case 16000: case 48000: case 96000: clk = 12288000; break; case 11025: case 22050: case 44100: clk = 11289600; break; } ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk, SND_SOC_CLOCK_IN); if (ret < 0) return ret; /* set the I2S system clock as input (unused) */ ret = snd_soc_dai_set_sysclk(cpu_dai, PXA2XX_I2S_SYSCLK, clk, SND_SOC_CLOCK_OUT); return ret; } static struct snd_soc_ops imote2_asoc_ops = { .hw_params = imote2_asoc_hw_params, }; static struct snd_soc_dai_link imote2_dai = { .name = "WM8940", .stream_name = "WM8940", .cpu_dai_name = "pxa2xx-i2s", .codec_dai_name = "wm8940-hifi", .platform_name = "pxa-pcm-audio", .codec_name = "wm8940-codec.0-0034", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &imote2_asoc_ops, }; static struct snd_soc_card imote2 = { .name = "Imote2", .owner = THIS_MODULE, .dai_link = &imote2_dai, .num_links = 1, }; static int imote2_probe(struct platform_device *pdev) { struct snd_soc_card *card = &imote2; int ret; card->dev = &pdev->dev; ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); return ret; } static struct platform_driver imote2_driver = { .driver = { .name = "imote2-audio", .pm = &snd_soc_pm_ops, }, .probe = imote2_probe, }; module_platform_driver(imote2_driver); MODULE_AUTHOR("Jonathan Cameron"); MODULE_DESCRIPTION("ALSA SoC Imote 2"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:imote2-audio"); 7289526eed96541a0654'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/wireless/lib80211_crypt_ccmp.c'> <input type='hidden' name='id' value='7a7b5df84b6b4e5d599c7289526eed96541a0654'/><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=7a7b5df84b6b4e5d599c7289526eed96541a0654'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>net</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/wireless?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>wireless</a>/<a href='/cgit.cgi/linux/net-next.git/commit/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>lib80211_crypt_ccmp.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='7a7b5df84b6b4e5d599c7289526eed96541a0654'/><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>Johan Hovold <johan@kernel.org></td><td class='right'>2017-01-30 11:26:38 +0100</td></tr> <tr><th>committer</th><td>Jiri Kosina <jkosina@suse.cz></td><td class='right'>2017-01-31 12:59:32 +0100</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>7a7b5df84b6b4e5d599c7289526eed96541a0654</a> (<a href='/cgit.cgi/linux/net-next.git/patch/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>cf7514c7ddf4410fe37ca9099a2785e1cf08fa7d</a> /<a href='/cgit.cgi/linux/net-next.git/tree/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>net/wireless/lib80211_crypt_ccmp.c</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/net/wireless/lib80211_crypt_ccmp.c?id=877a021e08ccb6434718c0cc781fdf943c884cc0'>877a021e08ccb6434718c0cc781fdf943c884cc0</a> (<a href='/cgit.cgi/linux/net-next.git/diff/net/wireless/lib80211_crypt_ccmp.c?id=7a7b5df84b6b4e5d599c7289526eed96541a0654&id2=877a021e08ccb6434718c0cc781fdf943c884cc0'>diff</a>)</td></tr></table> <div class='commit-subject'>HID: cp2112: fix sleep-while-atomic</div><div class='commit-msg'>A recent commit fixing DMA-buffers on stack added a shared transfer buffer protected by a spinlock. This is broken as the USB HID request callbacks can sleep. Fix this up by replacing the spinlock with a mutex. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> </div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=7a7b5df84b6b4e5d599c7289526eed96541a0654'>Diffstat</a> (limited to 'net/wireless/lib80211_crypt_ccmp.c')</div><table summary='diffstat' class='diffstat'>