aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 10:39:01 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-10 10:52:55 -0400
commit112ac808eb8a953dd356bbbc8322fdd6861e2c75 (patch)
tree6aaf5d79a7c7d4b9ce919e51051be97c4994e2cc /sound
parent07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff)
ALSA: sound/ps3: Fix checkpatch issues
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/ppc/snd_ps3.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index f361c26506aa..d660b0f6bcae 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -165,8 +165,7 @@ static const struct snd_pcm_hardware snd_ps3_pcm_hw = {
165 .fifo_size = PS3_AUDIO_FIFO_SIZE 165 .fifo_size = PS3_AUDIO_FIFO_SIZE
166}; 166};
167 167
168static struct snd_pcm_ops snd_ps3_pcm_spdif_ops = 168static struct snd_pcm_ops snd_ps3_pcm_spdif_ops = {
169{
170 .open = snd_ps3_pcm_open, 169 .open = snd_ps3_pcm_open,
171 .close = snd_ps3_pcm_close, 170 .close = snd_ps3_pcm_close,
172 .prepare = snd_ps3_pcm_prepare, 171 .prepare = snd_ps3_pcm_prepare,
@@ -183,7 +182,7 @@ static int snd_ps3_verify_dma_stop(struct snd_ps3_card_info *card,
183 int dma_ch, done, retries, stop_forced = 0; 182 int dma_ch, done, retries, stop_forced = 0;
184 uint32_t status; 183 uint32_t status;
185 184
186 for (dma_ch = 0; dma_ch < 8; dma_ch ++) { 185 for (dma_ch = 0; dma_ch < 8; dma_ch++) {
187 retries = count; 186 retries = count;
188 do { 187 do {
189 status = read_reg(PS3_AUDIO_KICK(dma_ch)) & 188 status = read_reg(PS3_AUDIO_KICK(dma_ch)) &
@@ -259,9 +258,7 @@ static void snd_ps3_kick_dma(struct snd_ps3_card_info *card)
259/* 258/*
260 * convert virtual addr to ioif bus addr. 259 * convert virtual addr to ioif bus addr.
261 */ 260 */
262static dma_addr_t v_to_bus(struct snd_ps3_card_info *card, 261static dma_addr_t v_to_bus(struct snd_ps3_card_info *card, void *paddr, int ch)
263 void * paddr,
264 int ch)
265{ 262{
266 return card->dma_start_bus_addr[ch] + 263 return card->dma_start_bus_addr[ch] +
267 (paddr - card->dma_start_vaddr[ch]); 264 (paddr - card->dma_start_vaddr[ch]);
@@ -321,7 +318,7 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
321 spin_lock_irqsave(&card->dma_lock, irqsave); 318 spin_lock_irqsave(&card->dma_lock, irqsave);
322 for (ch = 0; ch < 2; ch++) { 319 for (ch = 0; ch < 2; ch++) {
323 start_vaddr = card->dma_next_transfer_vaddr[0]; 320 start_vaddr = card->dma_next_transfer_vaddr[0];
324 for (stage = 0; stage < fill_stages; stage ++) { 321 for (stage = 0; stage < fill_stages; stage++) {
325 dma_ch = stage * 2 + ch; 322 dma_ch = stage * 2 + ch;
326 if (silent) 323 if (silent)
327 dma_addr = card->null_buffer_start_dma_addr; 324 dma_addr = card->null_buffer_start_dma_addr;
@@ -619,7 +616,7 @@ static int snd_ps3_change_avsetting(struct snd_ps3_card_info *card)
619 PS3_AUDIO_AO_3WMCTRL_ASOEN(2) | 616 PS3_AUDIO_AO_3WMCTRL_ASOEN(2) |
620 PS3_AUDIO_AO_3WMCTRL_ASOEN(3)), 617 PS3_AUDIO_AO_3WMCTRL_ASOEN(3)),
621 0); 618 0);
622 wmb(); /* ensure the hardware sees the change */ 619 wmb(); /* ensure the hardware sees the change */
623 /* wait for actually stopped */ 620 /* wait for actually stopped */
624 retries = 1000; 621 retries = 1000;
625 while ((read_reg(PS3_AUDIO_AO_3WMCTRL) & 622 while ((read_reg(PS3_AUDIO_AO_3WMCTRL) &
@@ -798,20 +795,20 @@ static struct snd_kcontrol_new spdif_ctls[] = {
798 { 795 {
799 .access = SNDRV_CTL_ELEM_ACCESS_READ, 796 .access = SNDRV_CTL_ELEM_ACCESS_READ,
800 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 797 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
801 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), 798 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, CON_MASK),
802 .info = snd_ps3_spdif_mask_info, 799 .info = snd_ps3_spdif_mask_info,
803 .get = snd_ps3_spdif_cmask_get, 800 .get = snd_ps3_spdif_cmask_get,
804 }, 801 },
805 { 802 {
806 .access = SNDRV_CTL_ELEM_ACCESS_READ, 803 .access = SNDRV_CTL_ELEM_ACCESS_READ,
807 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 804 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
808 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PRO_MASK), 805 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PRO_MASK),
809 .info = snd_ps3_spdif_mask_info, 806 .info = snd_ps3_spdif_mask_info,
810 .get = snd_ps3_spdif_pmask_get, 807 .get = snd_ps3_spdif_pmask_get,
811 }, 808 },
812 { 809 {
813 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 810 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
814 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 811 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
815 .info = snd_ps3_spdif_mask_info, 812 .info = snd_ps3_spdif_mask_info,
816 .get = snd_ps3_spdif_default_get, 813 .get = snd_ps3_spdif_default_get,
817 .put = snd_ps3_spdif_default_put, 814 .put = snd_ps3_spdif_default_put,
@@ -1020,11 +1017,12 @@ static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
1020 * its size should be lager than PS3_AUDIO_FIFO_STAGE_SIZE * 2 1017 * its size should be lager than PS3_AUDIO_FIFO_STAGE_SIZE * 2
1021 * PAGE_SIZE is enogh 1018 * PAGE_SIZE is enogh
1022 */ 1019 */
1023 if (!(the_card.null_buffer_start_vaddr = 1020 the_card.null_buffer_start_vaddr =
1024 dma_alloc_coherent(&the_card.ps3_dev->core, 1021 dma_alloc_coherent(&the_card.ps3_dev->core,
1025 PAGE_SIZE, 1022 PAGE_SIZE,
1026 &the_card.null_buffer_start_dma_addr, 1023 &the_card.null_buffer_start_dma_addr,
1027 GFP_KERNEL))) { 1024 GFP_KERNEL);
1025 if (!the_card.null_buffer_start_vaddr) {
1028 pr_info("%s: nullbuffer alloc failed\n", __func__); 1026 pr_info("%s: nullbuffer alloc failed\n", __func__);
1029 goto clean_preallocate; 1027 goto clean_preallocate;
1030 } 1028 }
@@ -1148,7 +1146,7 @@ static irqreturn_t snd_ps3_interrupt(int irq, void *dev_id)
1148 SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL : 1146 SND_PS3_DMA_FILLTYPE_SILENT_FIRSTFILL :
1149 SND_PS3_DMA_FILLTYPE_SILENT_RUNNING); 1147 SND_PS3_DMA_FILLTYPE_SILENT_RUNNING);
1150 snd_ps3_kick_dma(card); 1148 snd_ps3_kick_dma(card);
1151 card->silent --; 1149 card->silent--;
1152 } else { 1150 } else {
1153 snd_ps3_program_dma(card, 1151 snd_ps3_program_dma(card,
1154 (underflow_occured) ? 1152 (underflow_occured) ?