/* * linux/sound/arm/pxa2xx-pcm.c -- ALSA PCM interface for the Intel PXA2xx chip * * Author: Nicolas Pitre * Created: Nov 30, 2004 * Copyright: (C) 2004 MontaVista Software, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include "pxa2xx-pcm.h" static int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) { struct pxa2xx_pcm_client *client = substream->private_data; __pxa2xx_pcm_prepare(substream); return client->prepare(substream); } static int pxa2xx_pcm_open(struct snd_pcm_substream *substream) { struct pxa2xx_pcm_client *client = substream->private_data; struct snd_pcm_runtime *runtime = substream->runtime; struct pxa2xx_runtime_data *rtd; int ret; ret = __pxa2xx_pcm_open(substream); if (ret) goto out; rtd = runtime->private_data; rtd->params = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? client->playback_params : client->capture_params; ret = client->startup(substream); if (!ret) goto err2; return 0; err2: __pxa2xx_pcm_close(substream); out: return ret; } static int pxa2xx_pcm_close(struct snd_pcm_substream *substream) { struct pxa2xx_pcm_client *client = substream->private_data; client->shutdown(substream); return __pxa2xx_pcm_close(substream); } static struct snd_pcm_ops pxa2xx_pcm_ops = { .open = pxa2xx_pcm_open, .close = pxa2xx_pcm_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = __pxa2xx_pcm_hw_params, .hw_free = __pxa2xx_pcm_hw_free, .prepare = pxa2xx_pcm_prepare, .trigger = pxa2xx_pcm_trigger, .pointer = pxa2xx_pcm_pointer, .mmap = pxa2xx_pcm_mmap, }; int pxa2xx_pcm_new(struct snd_card *card, struct pxa2xx_pcm_client *client, struct snd_pcm **rpcm) { struct snd_pcm *pcm; int play = client->playback_params ? 1 : 0; int capt = client->capture_params ? 1 : 0; int ret; ret = snd_pcm_new(card, "PXA2xx-PCM", 0, play, capt, &pcm); if (ret) goto out; pcm->private_data = client; pcm->private_free = pxa2xx_pcm_free_dma_buffers; ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); if (ret) goto out; if (play) { int stream = SNDRV_PCM_STREAM_PLAYBACK; snd_pcm_set_ops(pcm, stream, &pxa2xx_pcm_ops); ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, stream); if (ret) goto out; } if (capt) { int stream = SNDRV_PCM_STREAM_CAPTURE; snd_pcm_set_ops(pcm, stream, &pxa2xx_pcm_ops); ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, stream); if (ret) goto out; } if (rpcm) *rpcm = pcm; ret = 0; out: return ret; } EXPORT_SYMBOL(pxa2xx_pcm_new); MODULE_AUTHOR("Nicolas Pitre"); MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module"); MODULE_LICENSE("GPL"); lass='path'>path: root/drivers/usb/chipidea/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
commit8b1b41ee74f9712c355d66dc105bbea663ae0afd (patch)
tree4c3f410f3cb01c7b00b474e376a60f27a7ff99a8 /drivers/usb/chipidea/Makefile
parentf7d6040aa45df6ffd9e891114125dc919f18b96b (diff)
parentbfb34527a32a1a576d9bfb7026d3ab0369a6cd60 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "None of these are showstoppers for 4.10 and could wait for 4.11 merge window, but they are low enough risk for this late in the cycle and the fixes have waiting users . They have received a build success notification from the 0day robot, pass the latest ndctl unit tests, and appeared in next: - Fix a crash that can result when SIGINT is sent to a process that is awaiting completion of an address range scrub command. We were not properly cleaning up the workqueue after wait_event_interruptible(). - Fix a memory hotplug failure condition that results from not reserving enough space out of persistent memory for the memmap. By default we align to 2M allocations that the memory hotplug code assumes, but if the administrator specifies a non-default 4K-alignment then we can fail to correctly size the reservation. - A one line fix to improve the predictability of libnvdimm block device names. A common operation is to reconfigure /dev/pmem0 into a different mode. For example, a reconfiguration might set a new mode that reserves some of the capacity for a struct page memmap array. It surprises users if the device name changes to "/dev/pmem0.1" after the mode change and then back to /dev/pmem0 after a reboot. - Add 'const' to some function pointer tables" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pfn: fix memmap reservation size versus 4K alignment acpi, nfit: fix acpi_nfit_flush_probe() crash libnvdimm, namespace: do not delete namespace-id 0 nvdimm: constify device_type structures
Diffstat (limited to 'drivers/usb/chipidea/Makefile')