Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14857
b: refs/heads/master
c: 53a7338
h: refs/heads/master
i:
  14855: febf2f7
v: v3
  • Loading branch information
Ian Pickworth authored and Linus Torvalds committed Dec 1, 2005
1 parent cdce430 commit b0626e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ca0ea980697d3b3c3d5c13ba7e525ed6c434756
refs/heads/master: 53a7338af60689817e81114d42cfa2ab4bb95516
25 changes: 10 additions & 15 deletions trunk/drivers/media/video/cx88/cx88-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,10 @@ static void set_audio_registers(struct cx88_core *core, const struct rlist *l)

static void set_audio_start(struct cx88_core *core, u32 mode)
{
// mute
/* mute */
cx_write(AUD_VOL_CTL, (1 << 6));

// start programming
cx_write(MO_AUD_DMACNTRL, 0x0000);
msleep(100);
//cx_write(AUD_CTL, 0x0000);
/* start programming */
cx_write(AUD_INIT, mode);
cx_write(AUD_INIT_LD, 0x0001);
cx_write(AUD_SOFT_RESET, 0x0001);
Expand All @@ -135,25 +132,25 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
{
u32 volume;

cx_write(AUD_RATE_THRES_DMD, 0x000000C0);

if (cx88_boards[core->board].blackbird) {
// sets sound input from external adc
/* sets sound input from external adc */
cx_set(AUD_CTL, EN_I2SIN_ENABLE);
//cx_write(AUD_I2SINPUTCNTL, 0);
cx_write(AUD_I2SINPUTCNTL, 4);
cx_write(AUD_BAUDRATE, 1);
// 'pass-thru mode': this enables the i2s output to the mpeg encoder
/* 'pass-thru mode': this enables the i2s output to the mpeg encoder */
cx_set(AUD_CTL, EN_I2SOUT_ENABLE);
cx_write(AUD_I2SOUTPUTCNTL, 1);
cx_write(AUD_I2SCNTL, 0);
//cx_write(AUD_APB_IN_RATE_ADJ, 0);
/* cx_write(AUD_APB_IN_RATE_ADJ, 0); */
} else {
ctl |= EN_DAC_ENABLE;
cx_write(AUD_CTL, ctl);
}

/* finish programming */
cx_write(AUD_SOFT_RESET, 0x0000);
cx_write(MO_AUD_DMACNTRL, 0x0003);

/* unmute */
volume = cx_sread(SHADOW_AUD_VOL_CTL);
Expand Down Expand Up @@ -313,7 +310,6 @@ static void set_audio_standard_NICAM(struct cx88_core *core, u32 mode)
{AUD_RATE_ADJ3, 0x00000100},
{AUD_RATE_ADJ4, 0x00000400},
{AUD_RATE_ADJ5, 0x00001000},
//{ AUD_DMD_RA_DDS, 0x00c0d5ce },
{AUD_ERRLOGPERIOD_R, 0x00000fff},
{AUD_ERRINTRPTTHSHLD1_R, 0x000003ff},
{AUD_ERRINTRPTTHSHLD2_R, 0x000000ff},
Expand Down Expand Up @@ -351,12 +347,12 @@ static void set_audio_standard_NICAM(struct cx88_core *core, u32 mode)
set_audio_registers(core, nicam_l);
break;
case WW_I:
dprintk("%s PAL-I NICAM (status: devel)\n", __FUNCTION__);
dprintk("%s PAL-I NICAM (status: known-good)\n", __FUNCTION__);
set_audio_registers(core, nicam_bgdki_common);
set_audio_registers(core, nicam_i);
break;
default:
dprintk("%s PAL-BGDK NICAM (status: unknown)\n", __FUNCTION__);
dprintk("%s PAL-BGDK NICAM (status: known-good)\n", __FUNCTION__);
set_audio_registers(core, nicam_bgdki_common);
set_audio_registers(core, nicam_default);
break;
Expand Down Expand Up @@ -715,8 +711,7 @@ int cx88_detect_nicam(struct cx88_core *core)
/* if bit1=1 then nicam is detected */
j += ((cx_read(AUD_NICAM_STATUS2) & 0x02) >> 1);

/* 3x detected: absolutly sure now */
if (j == 3) {
if (j == 1) {
dprintk("nicam is detected.\n");
return 1;
}
Expand Down

0 comments on commit b0626e2

Please sign in to comment.