Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14861
b: refs/heads/master
c: 6f502b8
h: refs/heads/master
i:
  14859: aa83a61
v: v3
  • Loading branch information
Mauro Carvalho Chehab authored and Linus Torvalds committed Dec 1, 2005
1 parent f89ac08 commit 434380a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c87c948ebd75525df4d67dd5b40e6ea81859cc17
refs/heads/master: 6f502b8a7858ecfa7d2a0762f7663b8b3d0808fc
32 changes: 32 additions & 0 deletions trunk/drivers/media/video/cx88/cx88-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,29 @@ static int set_pll(struct cx88_core *core, int prescale, u32 ofreq)
return -1;
}

int cx88_start_audio_dma(struct cx88_core *core)
{
/* setup fifo + format */
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0);
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0);

cx_write(MO_AUDD_LNGTH, 128); /* fifo bpl size */
cx_write(MO_AUDR_LNGTH, 128); /* fifo bpl size */

/* start dma */
cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */

return 0;
}

int cx88_stop_audio_dma(struct cx88_core *core)
{
/* stop dma */
cx_write(MO_AUD_DMACNTRL, 0x0000);

return 0;
}

static int set_tvaudio(struct cx88_core *core)
{
struct cx88_tvnorm *norm = core->tvnorm;
Expand Down Expand Up @@ -877,9 +900,16 @@ static int set_tvaudio(struct cx88_core *core)
cx88_set_tvaudio(core);
/* cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO); */

/*
This should be needed only on cx88-alsa. It seems that some cx88 chips have
bugs and does require DMA enabled for it to work.
*/
cx88_start_audio_dma(core);
return 0;
}



int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
{
u32 fsc8;
Expand Down Expand Up @@ -1201,6 +1231,8 @@ EXPORT_SYMBOL(cx88_set_scale);
EXPORT_SYMBOL(cx88_vdev_init);
EXPORT_SYMBOL(cx88_core_get);
EXPORT_SYMBOL(cx88_core_put);
EXPORT_SYMBOL(cx88_start_audio_dma);
EXPORT_SYMBOL(cx88_stop_audio_dma);

/*
* Local variables:
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/cx88/cx88-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
{
u32 volume;

/* restart dma; This avoids buzz in NICAM and is good in others */
cx88_stop_audio_dma(core);
cx_write(AUD_RATE_THRES_DMD, 0x000000C0);
cx88_start_audio_dma(core);

if (cx88_boards[core->board].blackbird) {
/* sets sound input from external adc */
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ extern struct cx88_core* cx88_core_get(struct pci_dev *pci);
extern void cx88_core_put(struct cx88_core *core,
struct pci_dev *pci);

extern int cx88_start_audio_dma(struct cx88_core *core);
extern int cx88_stop_audio_dma(struct cx88_core *core);


/* ----------------------------------------------------------- */
/* cx88-vbi.c */

Expand Down

0 comments on commit 434380a

Please sign in to comment.