/* * Linux driver for TerraTec DMX 6Fire USB * * Author: Torsten Schenk * Created: Jan 01, 2011 * Copyright: (C) Torsten Schenk * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef USB6FIRE_PCM_H #define USB6FIRE_PCM_H #include #include #include "common.h" enum /* settings for pcm */ { /* maximum of EP_W_MAX_PACKET_SIZE[] (see firmware.c) */ PCM_N_URBS = 16, PCM_N_PACKETS_PER_URB = 8, PCM_MAX_PACKET_SIZE = 604 }; struct pcm_urb { struct sfire_chip *chip; /* BEGIN DO NOT SEPARATE */ struct urb instance; struct usb_iso_packet_descriptor packets[PCM_N_PACKETS_PER_URB]; /* END DO NOT SEPARATE */ u8 *buffer; struct pcm_urb *peer; }; struct pcm_substream { spinlock_t lock; struct snd_pcm_substream *instance; bool active; snd_pcm_uframes_t dma_off; /* current position in alsa dma_area */ snd_pcm_uframes_t period_off; /* current position in current period */ }; struct pcm_runtime { struct sfire_chip *chip; struct snd_pcm *instance; struct pcm_substream playback; struct pcm_substream capture; bool panic; /* if set driver won't do anymore pcm on device */ struct pcm_urb in_urbs[PCM_N_URBS]; struct pcm_urb out_urbs[PCM_N_URBS]; int in_packet_size; int out_packet_size; int in_n_analog; /* number of analog channels soundcard sends */ int out_n_analog; /* number of analog channels soundcard receives */ struct mutex stream_mutex; u8 stream_state; /* one of STREAM_XXX (pcm.c) */ u8 rate; /* one of PCM_RATE_XXX */ wait_queue_head_t stream_wait_queue; bool stream_wait_cond; }; int usb6fire_pcm_init(struct sfire_chip *chip); void usb6fire_pcm_abort(struct sfire_chip *chip); void usb6fire_pcm_destroy(struct sfire_chip *chip); #endif /* USB6FIRE_PCM_H */ it.cgi/linux/net-next.git/commit/drivers/usb/phy/phy-ulpi-viewport.c?id=35609502ac5dea2b149ec0368791d9c0e246bd65'>commitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-01 09:22:08 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-01 09:22:08 -0800
commit35609502ac5dea2b149ec0368791d9c0e246bd65 (patch)
tree6819f6bc5b8c3585b7a19cc0d8d25d703a1bc57c /drivers/usb/phy/phy-ulpi-viewport.c
parentc325b3533730016ca5cdaf902d62550b4243fe43 (diff)
parent91539eb1fda2d530d3b268eef542c5414e54bf1a (diff)
Merge tag 'dmaengine-fix-4.10-rc7' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fixes from Vinod Koul: "A couple of fixes showed up late in the cycle so sending them up and sending early in the week and not on Friday :). They fix a double lock in pl330 driver and runtime pm fixes for cppi driver" * tag 'dmaengine-fix-4.10-rc7' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: pl330: fix double lock dmaengine: cppi41: Clean up pointless warnings dmaengine: cppi41: Fix oops in cppi41_runtime_resume dmaengine: cppi41: Fix runtime PM timeouts with USB mass storage
Diffstat (limited to 'drivers/usb/phy/phy-ulpi-viewport.c')