Skip to content

Commit 1796b50

Browse files
committed
Make the audsel code optional.
This only applies to some cards (driving an off-chip mux to select the audio channel), and it's probably not needed in most use cases for them anyway.
1 parent bfa2107 commit 1796b50

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

cxadc.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#endif
4040

4141
static int latency = -1;
42-
static int audsel = 2;
42+
static int audsel = -1;
4343
static int vmux = 2;
4444
static int level = 16;
4545
static int tenbit;
@@ -661,15 +661,17 @@ static int cxadc_probe(struct pci_dev *pci_dev,
661661
/* set gain of agc but not offset */
662662
cx_write(MO_AGC_GAIN_ADJ3, (0x28<<16)|(0x28<<8)|(0x50<<0));
663663

664-
/*
665-
* Pixelview PlayTVPro Ultracard specific
666-
* select which output is redirected to audio output jack
667-
* GPIO bit 3 is to enable 4052 , bit 0-1 4052's AB
668-
*/
669-
cx_write(MO_GP3_IO, 1<<25); /* use as 24 bit GPIO/GPOE */
670-
cx_write(MO_GP1_IO, 0x0b);
671-
cx_write(MO_GP0_IO, audsel&3);
672-
cx_info("audsel = %d\n", audsel&3);
664+
if (audsel != -1) {
665+
/*
666+
* Pixelview PlayTVPro Ultracard specific
667+
* select which output is redirected to audio output jack
668+
* GPIO bit 3 is to enable 4052 , bit 0-1 4052's AB
669+
*/
670+
cx_write(MO_GP3_IO, 1<<25); /* use as 24 bit GPIO/GPOE */
671+
cx_write(MO_GP1_IO, 0x0b);
672+
cx_write(MO_GP0_IO, audsel&3);
673+
cx_info("audsel = %d\n", audsel&3);
674+
}
673675

674676
/* i2c sda/scl set to high and use software control */
675677
cx_write(MO_I2C, 3);

0 commit comments

Comments
 (0)