~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/fsl/mpc5200_dma.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Freescale MPC5200 Audio DMA driver
  4  */
  5 
  6 #ifndef __SOUND_SOC_FSL_MPC5200_DMA_H__
  7 #define __SOUND_SOC_FSL_MPC5200_DMA_H__
  8 
  9 #define PSC_STREAM_NAME_LEN 32
 10 
 11 /**
 12  * psc_ac97_stream - Data specific to a single stream (playback or capture)
 13  * @active:             flag indicating if the stream is active
 14  * @psc_dma:            pointer back to parent psc_dma data structure
 15  * @bcom_task:          bestcomm task structure
 16  * @irq:                irq number for bestcomm task
 17  * @period_end:         physical address of end of DMA region
 18  * @period_next_pt:     physical address of next DMA buffer to enqueue
 19  * @period_bytes:       size of DMA period in bytes
 20  * @ac97_slot_bits:     Enable bits for turning on the correct AC97 slot
 21  */
 22 struct psc_dma_stream {
 23         struct snd_pcm_runtime *runtime;
 24         int active;
 25         struct psc_dma *psc_dma;
 26         struct bcom_task *bcom_task;
 27         int irq;
 28         struct snd_pcm_substream *stream;
 29         int period_next;
 30         int period_current;
 31         int period_bytes;
 32         int period_count;
 33 
 34         /* AC97 state */
 35         u32 ac97_slot_bits;
 36 };
 37 
 38 /**
 39  * psc_dma - Private driver data
 40  * @name: short name for this device ("PSC0", "PSC1", etc)
 41  * @psc_regs: pointer to the PSC's registers
 42  * @fifo_regs: pointer to the PSC's FIFO registers
 43  * @irq: IRQ of this PSC
 44  * @dev: struct device pointer
 45  * @dai: the CPU DAI for this device
 46  * @sicr: Base value used in serial interface control register; mode is ORed
 47  *        with this value.
 48  * @playback: Playback stream context data
 49  * @capture: Capture stream context data
 50  */
 51 struct psc_dma {
 52         char name[32];
 53         struct mpc52xx_psc __iomem *psc_regs;
 54         struct mpc52xx_psc_fifo __iomem *fifo_regs;
 55         unsigned int irq;
 56         struct device *dev;
 57         spinlock_t lock;
 58         struct mutex mutex;
 59         u32 sicr;
 60         uint sysclk;
 61         int imr;
 62         int id;
 63         unsigned int slots;
 64 
 65         /* per-stream data */
 66         struct psc_dma_stream playback;
 67         struct psc_dma_stream capture;
 68 
 69         /* Statistics */
 70         struct {
 71                 unsigned long overrun_count;
 72                 unsigned long underrun_count;
 73         } stats;
 74 };
 75 
 76 /* Utility for retrieving psc_dma_stream structure from a substream */
 77 static inline struct psc_dma_stream *
 78 to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
 79 {
 80         if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
 81                 return &psc_dma->capture;
 82         return &psc_dma->playback;
 83 }
 84 
 85 int mpc5200_audio_dma_create(struct platform_device *op);
 86 int mpc5200_audio_dma_destroy(struct platform_device *op);
 87 
 88 #endif /* __SOUND_SOC_FSL_MPC5200_DMA_H__ */
 89 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php