Commit e5f10621 authored by Leonid V. Fedorenchik's avatar Leonid V. Fedorenchik Committed by Mauro Carvalho Chehab

[media] cx25821-alsa.c: Change line endings

Change obscure line endings to less obscure ones. (improve readability)
Signed-off-by: default avatarLeonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4d9304c6
...@@ -176,8 +176,7 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip) ...@@ -176,8 +176,7 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)
/* Set the input mode to 16-bit */ /* Set the input mode to 16-bit */
tmp = cx_read(AUD_A_CFG); tmp = cx_read(AUD_A_CFG);
cx_write(AUD_A_CFG, cx_write(AUD_A_CFG, tmp | FLD_AUD_DST_PK_MODE | FLD_AUD_DST_ENABLE |
tmp | FLD_AUD_DST_PK_MODE | FLD_AUD_DST_ENABLE |
FLD_AUD_CLK_ENABLE); FLD_AUD_CLK_ENABLE);
/* /*
...@@ -188,9 +187,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip) ...@@ -188,9 +187,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)
*/ */
/* Enables corresponding bits at AUD_INT_STAT */ /* Enables corresponding bits at AUD_INT_STAT */
cx_write(AUD_A_INT_MSK, cx_write(AUD_A_INT_MSK, FLD_AUD_DST_RISCI1 | FLD_AUD_DST_OF |
FLD_AUD_DST_RISCI1 | FLD_AUD_DST_OF | FLD_AUD_DST_SYNC | FLD_AUD_DST_SYNC | FLD_AUD_DST_OPC_ERR);
FLD_AUD_DST_OPC_ERR);
/* Clean any pending interrupt bits already set */ /* Clean any pending interrupt bits already set */
cx_write(AUD_A_INT_STAT, ~0); cx_write(AUD_A_INT_STAT, ~0);
...@@ -200,8 +198,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip) ...@@ -200,8 +198,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)
/* Turn on audio downstream fifo and risc enable 0x101 */ /* Turn on audio downstream fifo and risc enable 0x101 */
tmp = cx_read(AUD_INT_DMA_CTL); tmp = cx_read(AUD_INT_DMA_CTL);
cx_set(AUD_INT_DMA_CTL, cx_set(AUD_INT_DMA_CTL, tmp |
tmp | (FLD_AUD_DST_A_RISC_EN | FLD_AUD_DST_A_FIFO_EN)); (FLD_AUD_DST_A_RISC_EN | FLD_AUD_DST_A_FIFO_EN));
mdelay(100); mdelay(100);
return 0; return 0;
...@@ -220,9 +218,8 @@ static int _cx25821_stop_audio_dma(struct cx25821_audio_dev *chip) ...@@ -220,9 +218,8 @@ static int _cx25821_stop_audio_dma(struct cx25821_audio_dev *chip)
/* disable irqs */ /* disable irqs */
cx_clear(PCI_INT_MSK, PCI_MSK_AUD_INT); cx_clear(PCI_INT_MSK, PCI_MSK_AUD_INT);
cx_clear(AUD_A_INT_MSK, cx_clear(AUD_A_INT_MSK, AUD_INT_OPC_ERR | AUD_INT_DN_SYNC |
AUD_INT_OPC_ERR | AUD_INT_DN_SYNC | AUD_INT_DN_RISCI2 | AUD_INT_DN_RISCI2 | AUD_INT_DN_RISCI1);
AUD_INT_DN_RISCI1);
return 0; return 0;
} }
...@@ -258,10 +255,8 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status, ...@@ -258,10 +255,8 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status,
cx_write(AUD_A_INT_STAT, status); cx_write(AUD_A_INT_STAT, status);
if (debug > 1 || (status & mask & ~0xff)) if (debug > 1 || (status & mask & ~0xff))
cx25821_print_irqbits(dev->name, "irq aud", cx25821_print_irqbits(dev->name, "irq aud", cx25821_aud_irqs,
cx25821_aud_irqs, ARRAY_SIZE(cx25821_aud_irqs), status, mask);
ARRAY_SIZE(cx25821_aud_irqs), status,
mask);
/* risc op code error */ /* risc op code error */
if (status & AUD_INT_OPC_ERR) { if (status & AUD_INT_OPC_ERR) {
...@@ -270,8 +265,7 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status, ...@@ -270,8 +265,7 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status,
cx_clear(AUD_INT_DMA_CTL, cx_clear(AUD_INT_DMA_CTL,
FLD_AUD_DST_A_RISC_EN | FLD_AUD_DST_A_FIFO_EN); FLD_AUD_DST_A_RISC_EN | FLD_AUD_DST_A_FIFO_EN);
cx25821_sram_channel_dump_audio(dev, cx25821_sram_channel_dump_audio(dev,
&cx25821_sram_channels &cx25821_sram_channels[AUDIO_SRAM_CHANNEL]);
[AUDIO_SRAM_CHANNEL]);
} }
if (status & AUD_INT_DN_SYNC) { if (status & AUD_INT_DN_SYNC) {
pr_warn("WARNING %s: Downstream sync error!\n", dev->name); pr_warn("WARNING %s: Downstream sync error!\n", dev->name);
...@@ -362,9 +356,8 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip) ...@@ -362,9 +356,8 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip)
*/ */
#define DEFAULT_FIFO_SIZE 384 #define DEFAULT_FIFO_SIZE 384
static struct snd_pcm_hardware snd_cx25821_digital_hw = { static struct snd_pcm_hardware snd_cx25821_digital_hw = {
.info = SNDRV_PCM_INFO_MMAP | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID,
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
.rates = SNDRV_PCM_RATE_48000, .rates = SNDRV_PCM_RATE_48000,
...@@ -397,8 +390,8 @@ static int snd_cx25821_pcm_open(struct snd_pcm_substream *substream) ...@@ -397,8 +390,8 @@ static int snd_cx25821_pcm_open(struct snd_pcm_substream *substream)
return -ENODEV; return -ENODEV;
} }
err = err = snd_pcm_hw_constraint_pow2(runtime, 0,
snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS); SNDRV_PCM_HW_PARAM_PERIODS);
if (err < 0) if (err < 0)
goto _error; goto _error;
...@@ -469,8 +462,7 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream, ...@@ -469,8 +462,7 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream,
dma = &buf->dma; dma = &buf->dma;
videobuf_dma_init(dma); videobuf_dma_init(dma);
ret = videobuf_dma_init_kernel(dma, PCI_DMA_FROMDEVICE, ret = videobuf_dma_init_kernel(dma, PCI_DMA_FROMDEVICE,
(PAGE_ALIGN(chip->dma_size) >> (PAGE_ALIGN(chip->dma_size) >> PAGE_SHIFT));
PAGE_SHIFT));
if (ret < 0) if (ret < 0)
goto error; goto error;
...@@ -478,10 +470,8 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream, ...@@ -478,10 +470,8 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream,
if (ret < 0) if (ret < 0)
goto error; goto error;
ret = ret = cx25821_risc_databuffer_audio(chip->pci, &buf->risc, dma->sglist,
cx25821_risc_databuffer_audio(chip->pci, &buf->risc, dma->sglist, chip->period_size, chip->num_periods, 1);
chip->period_size, chip->num_periods,
1);
if (ret < 0) { if (ret < 0) {
pr_info("DEBUG: ERROR after cx25821_risc_databuffer_audio()\n"); pr_info("DEBUG: ERROR after cx25821_risc_databuffer_audio()\n");
goto error; goto error;
...@@ -712,8 +702,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) ...@@ -712,8 +702,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
IRQF_SHARED, chip->dev->name, chip); IRQF_SHARED, chip->dev->name, chip);
if (err < 0) { if (err < 0) {
pr_err("ERROR %s: can't get IRQ %d for ALSA\n", pr_err("ERROR %s: can't get IRQ %d for ALSA\n", chip->dev->name,
chip->dev->name, dev->pci->irq); dev->pci->irq);
goto error; goto error;
} }
...@@ -731,8 +721,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) ...@@ -731,8 +721,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
chip->iobase, chip->irq); chip->iobase, chip->irq);
strcpy(card->mixername, "CX25821"); strcpy(card->mixername, "CX25821");
pr_info("%s/%i: ALSA support for cx25821 boards\n", pr_info("%s/%i: ALSA support for cx25821 boards\n", card->driver,
card->driver, devno); devno);
err = snd_card_register(card); err = snd_card_register(card);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment