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

TOMOYO Linux Cross Reference
Linux/sound/ppc/snd_ps3.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 ] ~

Diff markup

Differences between /sound/ppc/snd_ps3.h (Architecture m68k) and /sound/ppc/snd_ps3.h (Architecture sparc64)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Audio support for PS3                            3  * Audio support for PS3
  4  * Copyright (C) 2007 Sony Computer Entertainm      4  * Copyright (C) 2007 Sony Computer Entertainment Inc.
  5  * All rights reserved.                             5  * All rights reserved.
  6  * Copyright 2006, 2007 Sony Corporation            6  * Copyright 2006, 2007 Sony Corporation
  7  */                                                 7  */
  8                                                     8 
  9 #if !defined(_SND_PS3_H_)                           9 #if !defined(_SND_PS3_H_)
 10 #define _SND_PS3_H_                                10 #define _SND_PS3_H_
 11                                                    11 
 12 #include <linux/irqreturn.h>                       12 #include <linux/irqreturn.h>
 13                                                    13 
 14 #define SND_PS3_DRIVER_NAME "snd_ps3"              14 #define SND_PS3_DRIVER_NAME "snd_ps3"
 15                                                    15 
 16 enum snd_ps3_out_channel {                         16 enum snd_ps3_out_channel {
 17         SND_PS3_OUT_SPDIF_0,                       17         SND_PS3_OUT_SPDIF_0,
 18         SND_PS3_OUT_SPDIF_1,                       18         SND_PS3_OUT_SPDIF_1,
 19         SND_PS3_OUT_SERIAL_0,                      19         SND_PS3_OUT_SERIAL_0,
 20         SND_PS3_OUT_DEVS                           20         SND_PS3_OUT_DEVS
 21 };                                                 21 };
 22                                                    22 
 23 enum snd_ps3_dma_filltype {                        23 enum snd_ps3_dma_filltype {
 24         SND_PS3_DMA_FILLTYPE_FIRSTFILL,            24         SND_PS3_DMA_FILLTYPE_FIRSTFILL,
 25         SND_PS3_DMA_FILLTYPE_RUNNING,              25         SND_PS3_DMA_FILLTYPE_RUNNING,
 26         SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL,     26         SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL,
 27         SND_PS3_DMA_FILLTYPE_SILENT_RUNNING        27         SND_PS3_DMA_FILLTYPE_SILENT_RUNNING
 28 };                                                 28 };
 29                                                    29 
 30 enum snd_ps3_ch {                                  30 enum snd_ps3_ch {
 31         SND_PS3_CH_L = 0,                          31         SND_PS3_CH_L = 0,
 32         SND_PS3_CH_R = 1,                          32         SND_PS3_CH_R = 1,
 33         SND_PS3_CH_MAX = 2                         33         SND_PS3_CH_MAX = 2
 34 };                                                 34 };
 35                                                    35 
 36 struct snd_ps3_avsetting_info {                    36 struct snd_ps3_avsetting_info {
 37         uint32_t avs_audio_ch;     /* fixed */     37         uint32_t avs_audio_ch;     /* fixed */
 38         uint32_t avs_audio_rate;                   38         uint32_t avs_audio_rate;
 39         uint32_t avs_audio_width;                  39         uint32_t avs_audio_width;
 40         uint32_t avs_audio_format; /* fixed */     40         uint32_t avs_audio_format; /* fixed */
 41         uint32_t avs_audio_source; /* fixed */     41         uint32_t avs_audio_source; /* fixed */
 42         unsigned char avs_cs_info[8];              42         unsigned char avs_cs_info[8];
 43 };                                                 43 };
 44 /*                                                 44 /*
 45  * PS3 audio 'card' instance                       45  * PS3 audio 'card' instance
 46  * there should be only ONE hardware.              46  * there should be only ONE hardware.
 47  */                                                47  */
 48 struct snd_ps3_card_info {                         48 struct snd_ps3_card_info {
 49         struct ps3_system_bus_device *ps3_dev;     49         struct ps3_system_bus_device *ps3_dev;
 50         struct snd_card *card;                     50         struct snd_card *card;
 51                                                    51 
 52         struct snd_pcm *pcm;                       52         struct snd_pcm *pcm;
 53         struct snd_pcm_substream *substream;       53         struct snd_pcm_substream *substream;
 54                                                    54 
 55         /* hvc info */                             55         /* hvc info */
 56         u64 audio_lpar_addr;                       56         u64 audio_lpar_addr;
 57         u64 audio_lpar_size;                       57         u64 audio_lpar_size;
 58                                                    58 
 59         /* registers */                            59         /* registers */
 60         void __iomem *mapped_mmio_vaddr;           60         void __iomem *mapped_mmio_vaddr;
 61                                                    61 
 62         /* irq */                                  62         /* irq */
 63         u64 audio_irq_outlet;                      63         u64 audio_irq_outlet;
 64         unsigned int irq_no;                       64         unsigned int irq_no;
 65                                                    65 
 66         /* remember avsetting */                   66         /* remember avsetting */
 67         struct snd_ps3_avsetting_info avs;         67         struct snd_ps3_avsetting_info avs;
 68                                                    68 
 69         /* dma buffer management */                69         /* dma buffer management */
 70         spinlock_t dma_lock;                       70         spinlock_t dma_lock;
 71                 /* dma_lock start */               71                 /* dma_lock start */
 72                 void * dma_start_vaddr[2]; /*      72                 void * dma_start_vaddr[2]; /* 0 for L, 1 for R */
 73                 dma_addr_t dma_start_bus_addr[     73                 dma_addr_t dma_start_bus_addr[2];
 74                 size_t dma_buffer_size;            74                 size_t dma_buffer_size;
 75                 void * dma_last_transfer_vaddr     75                 void * dma_last_transfer_vaddr[2];
 76                 void * dma_next_transfer_vaddr     76                 void * dma_next_transfer_vaddr[2];
 77                 int    silent;                     77                 int    silent;
 78                 /* dma_lock end */                 78                 /* dma_lock end */
 79                                                    79 
 80         int running;                               80         int running;
 81                                                    81 
 82         /* null buffer */                          82         /* null buffer */
 83         void *null_buffer_start_vaddr;             83         void *null_buffer_start_vaddr;
 84         dma_addr_t null_buffer_start_dma_addr;     84         dma_addr_t null_buffer_start_dma_addr;
 85                                                    85 
 86         /* start delay */                          86         /* start delay */
 87         unsigned int start_delay;                  87         unsigned int start_delay;
 88                                                    88 
 89 };                                                 89 };
 90                                                    90 
 91                                                    91 
 92 /* PS3 audio DMAC block size in bytes */           92 /* PS3 audio DMAC block size in bytes */
 93 #define PS3_AUDIO_DMAC_BLOCK_SIZE (128)            93 #define PS3_AUDIO_DMAC_BLOCK_SIZE (128)
 94 /* one stage (stereo)  of audio FIFO in bytes      94 /* one stage (stereo)  of audio FIFO in bytes */
 95 #define PS3_AUDIO_FIFO_STAGE_SIZE (256)            95 #define PS3_AUDIO_FIFO_STAGE_SIZE (256)
 96 /* how many stages the fifo have */                96 /* how many stages the fifo have */
 97 #define PS3_AUDIO_FIFO_STAGE_COUNT (8)             97 #define PS3_AUDIO_FIFO_STAGE_COUNT (8)
 98 /* fifo size 128 bytes * 8 stages * stereo (2c     98 /* fifo size 128 bytes * 8 stages * stereo (2ch) */
 99 #define PS3_AUDIO_FIFO_SIZE \                      99 #define PS3_AUDIO_FIFO_SIZE \
100         (PS3_AUDIO_FIFO_STAGE_SIZE * PS3_AUDIO    100         (PS3_AUDIO_FIFO_STAGE_SIZE * PS3_AUDIO_FIFO_STAGE_COUNT)
101                                                   101 
102 /* PS3 audio DMAC max block count in one dma s    102 /* PS3 audio DMAC max block count in one dma shot = 128 (0x80) blocks*/
103 #define PS3_AUDIO_DMAC_MAX_BLOCKS  (PS3_AUDIO_    103 #define PS3_AUDIO_DMAC_MAX_BLOCKS  (PS3_AUDIO_DMASIZE_BLOCKS_MASK + 1)
104                                                   104 
105 #define PS3_AUDIO_NORMAL_DMA_START_CH (0)         105 #define PS3_AUDIO_NORMAL_DMA_START_CH (0)
106 #define PS3_AUDIO_NORMAL_DMA_COUNT    (8)         106 #define PS3_AUDIO_NORMAL_DMA_COUNT    (8)
107 #define PS3_AUDIO_NULL_DMA_START_CH \             107 #define PS3_AUDIO_NULL_DMA_START_CH \
108         (PS3_AUDIO_NORMAL_DMA_START_CH + PS3_A    108         (PS3_AUDIO_NORMAL_DMA_START_CH + PS3_AUDIO_NORMAL_DMA_COUNT)
109 #define PS3_AUDIO_NULL_DMA_COUNT      (2)         109 #define PS3_AUDIO_NULL_DMA_COUNT      (2)
110                                                   110 
111 #define SND_PS3_MAX_VOL (0x0F)                    111 #define SND_PS3_MAX_VOL (0x0F)
112 #define SND_PS3_MIN_VOL (0x00)                    112 #define SND_PS3_MIN_VOL (0x00)
113 #define SND_PS3_MIN_ATT SND_PS3_MIN_VOL           113 #define SND_PS3_MIN_ATT SND_PS3_MIN_VOL
114 #define SND_PS3_MAX_ATT SND_PS3_MAX_VOL           114 #define SND_PS3_MAX_ATT SND_PS3_MAX_VOL
115                                                   115 
116 #define SND_PS3_PCM_PREALLOC_SIZE \               116 #define SND_PS3_PCM_PREALLOC_SIZE \
117         (PS3_AUDIO_DMAC_BLOCK_SIZE * PS3_AUDIO    117         (PS3_AUDIO_DMAC_BLOCK_SIZE * PS3_AUDIO_DMAC_MAX_BLOCKS * 4)
118                                                   118 
119 #define SND_PS3_DMA_REGION_SIZE \                 119 #define SND_PS3_DMA_REGION_SIZE \
120         (SND_PS3_PCM_PREALLOC_SIZE + PAGE_SIZE    120         (SND_PS3_PCM_PREALLOC_SIZE + PAGE_SIZE)
121                                                   121 
122 #define PS3_AUDIO_IOID       (1UL)                122 #define PS3_AUDIO_IOID       (1UL)
123                                                   123 
124 #endif /* _SND_PS3_H_ */                          124 #endif /* _SND_PS3_H_ */
125                                                   125 

~ [ 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