Commit ac19ecc6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds
Browse files

[PATCH] v4l: update for SAA7134 cards



This patch adds support for various SAA7134 cards and brings some fixes.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarFabrice Aeschbacher <fabrice.aeschbacher@laposte.net>
Signed-off-by: default avatarHermann Pitton <hermann.pitton@onlinehome.de&gt;.>
Signed-off-by: default avatarNickolay V Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 56fc08ca
......@@ -22,6 +22,7 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END};
static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
I2C_CLIENT_INSMOD;
MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder");
......@@ -41,16 +42,16 @@ enum saa6752hs_videoformat {
static const struct v4l2_format v4l2_format_table[] =
{
[SAA6752HS_VF_D1] = {
.fmt = { .pix = { .width = 720, .height = 576 }, }, },
[SAA6752HS_VF_2_3_D1] = {
.fmt = { .pix = { .width = 480, .height = 576 }, }, },
[SAA6752HS_VF_1_2_D1] = {
.fmt = { .pix = { .width = 352, .height = 576 }, }, },
[SAA6752HS_VF_SIF] = {
.fmt = { .pix = { .width = 352, .height = 288 }, }, },
[SAA6752HS_VF_UNKNOWN] = {
.fmt = { .pix = { .width = 0, .height = 0 }, }, },
[SAA6752HS_VF_D1] =
{ .fmt = { .pix = { .width = 720, .height = 576 }}},
[SAA6752HS_VF_2_3_D1] =
{ .fmt = { .pix = { .width = 480, .height = 576 }}},
[SAA6752HS_VF_1_2_D1] =
{ .fmt = { .pix = { .width = 352, .height = 576 }}},
[SAA6752HS_VF_SIF] =
{ .fmt = { .pix = { .width = 352, .height = 288 }}},
[SAA6752HS_VF_UNKNOWN] =
{ .fmt = { .pix = { .width = 0, .height = 0}}},
};
struct saa6752hs_state {
......
/*
* $Id: saa7134-cards.c,v 1.54 2005/03/07 12:01:51 kraxel Exp $
* $Id: saa7134-cards.c,v 1.58 2005/06/07 18:05:00 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
......@@ -165,7 +165,7 @@ struct saa7134_board saa7134_boards[] = {
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = LINE2,
.amux = TV,
.tv = 1,
},{
.name = name_comp1,
......@@ -878,7 +878,7 @@ struct saa7134_board saa7134_boards[] = {
},
[SAA7134_BOARD_MANLI_MTV002] = {
/* Ognjen Nastic <ognjen@logosoft.ba> */
.name = "Manli MuchTV M-TV002",
.name = "Manli MuchTV M-TV002/Behold TV 403 FM",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL,
.inputs = {{
......@@ -899,14 +899,10 @@ struct saa7134_board saa7134_boards[] = {
.name = name_radio,
.amux = LINE2,
},
.mute = {
.name = name_mute,
.amux = LINE1,
},
},
[SAA7134_BOARD_MANLI_MTV001] = {
/* Ognjen Nastic <ognjen@logosoft.ba> UNTESTED */
.name = "Manli MuchTV M-TV001",
.name = "Manli MuchTV M-TV001/Behold TV 401",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL,
.inputs = {{
......@@ -923,6 +919,10 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE2,
.tv = 1,
}},
.mute = {
.name = name_mute,
.amux = LINE1,
},
},
[SAA7134_BOARD_TG3000TV] = {
/* TransGear 3000TV */
......@@ -1078,7 +1078,6 @@ struct saa7134_board saa7134_boards[] = {
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1256_IH3,
.tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x3,
.inputs = {{
.name = name_tv,
.vmux = 1,
......@@ -1285,7 +1284,7 @@ struct saa7134_board saa7134_boards[] = {
.gpio =0x8000,
}
},
[SAA7134_BOARD_AVERMEDIA_307] = {
[SAA7134_BOARD_AVERMEDIA_STUDIO_307] = {
/*
Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru>
......@@ -1323,6 +1322,35 @@ struct saa7134_board saa7134_boards[] = {
.gpio = 0x01,
},
},
[SAA7134_BOARD_AVERMEDIA_GO_007_FM] = {
.name = "Avermedia AVerTV GO 007 FM",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.gpiomask = 0x00300003,
// .gpiomask = 0x8c240003,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x01,
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE2,
.gpio = 0x02,
},{
.name = name_svideo,
.vmux = 6,
.amux = LINE2,
.gpio = 0x02,
}},
.radio = {
.name = name_radio,
.amux = LINE1,
.gpio = 0x00300001,
},
},
[SAA7134_BOARD_AVERMEDIA_CARDBUS] = {
/* Jon Westgate <oryn@oryn.fsck.tv> */
.name = "AVerMedia Cardbus TV/Radio",
......@@ -1492,7 +1520,6 @@ struct saa7134_board saa7134_boards[] = {
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FQ1216ME,
.tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x3,
.inputs = {{
.name = name_tv,
.vmux = 1,
......@@ -1546,7 +1573,82 @@ struct saa7134_board saa7134_boards[] = {
// .gpio = 0x4000,
}},
},
};
[SAA7134_BOARD_AVERMEDIA_307] = {
/*
Davydov Vladimir <vladimir@iqmedia.com>
*/
.name = "Avermedia AVerTV 307",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FQ1216ME,
.tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE1,
},{
.name = name_comp2,
.vmux = 3,
.amux = LINE1,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
}},
},
[SAA7134_BOARD_ADS_INSTANT_TV] = {
.name = "ADS Tech Instant TV (saa7135)",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE2,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
}},
},
[SAA7134_BOARD_KWORLD_VSTREAM_XPERT] = {
.name = "Kworld/Tevion V-Stream Xpert TV PVR7134",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_PAL_I,
.gpiomask = 0x0700,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x000,
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.gpio = 0x200, //gpio by DScaler
},{
.name = name_svideo,
.vmux = 0,
.amux = LINE1,
.gpio = 0x200,
}},
.radio = {
.name = name_radio,
.amux = LINE1,
.gpio = 0x100,
},
},
};
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
/* ------------------------------------------------------------------ */
......@@ -1663,7 +1765,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
.driver_data = SAA7134_BOARD_ASUSTeK_TVFM7134,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135,
.subvendor = PCI_VENDOR_ID_ASUSTEK,
.subdevice = 0x4845,
.driver_data = SAA7135_BOARD_ASUSTeK_TVFM7135,
......@@ -1824,6 +1926,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = 0x1461, /* Avermedia Technologies Inc */
.subdevice = 0x9715,
.driver_data = SAA7134_BOARD_AVERMEDIA_STUDIO_307,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = 0x1461, /* Avermedia Technologies Inc */
.subdevice = 0xa70a,
.driver_data = SAA7134_BOARD_AVERMEDIA_307,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
......@@ -1844,6 +1952,26 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x5168,
.subdevice = 0x0306,
.driver_data = SAA7134_BOARD_FLYDVBTDUO,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1461, /* Avermedia Technologies Inc */
.subdevice = 0xf31f,
.driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135,
.subvendor = 0x1421,
.subdevice = 0x0350, /* PCI version */
.driver_data = SAA7134_BOARD_ADS_INSTANT_TV,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135,
.subvendor = 0x1421,
.subdevice = 0x0370, /* cardbus version */
.driver_data = SAA7134_BOARD_ADS_INSTANT_TV,
},{
/* --- boards without eeprom + subsystem ID --- */
......@@ -1954,20 +2082,23 @@ int saa7134_board_init1(struct saa7134_dev *dev)
dev->has_remote = 1;
board_flyvideo(dev);
break;
case SAA7134_BOARD_FLYTVPLATINUM_FM:
case SAA7134_BOARD_FLYTVPLATINUM_FM:
case SAA7134_BOARD_CINERGY400:
case SAA7134_BOARD_CINERGY600:
case SAA7134_BOARD_CINERGY600_MK3:
case SAA7134_BOARD_ECS_TVP3XP:
case SAA7134_BOARD_ECS_TVP3XP_4CB5:
case SAA7134_BOARD_MD2819:
case SAA7134_BOARD_KWORLD_VSTREAM_XPERT:
case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
case SAA7134_BOARD_AVERMEDIA_305:
case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
case SAA7134_BOARD_AVERMEDIA_307:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
// case SAA7134_BOARD_SABRENT_SBTTVFM: /* not finished yet */
case SAA7134_BOARD_VIDEOMATE_TV_PVR:
dev->has_remote = 1;
break;
case SAA7134_BOARD_MANLI_MTV001:
case SAA7134_BOARD_MANLI_MTV002:
case SAA7134_BOARD_AVACSSMARTTV:
dev->has_remote = 1;
break;
......
/*
* $Id: saa7134-core.c,v 1.28 2005/02/22 09:56:29 kraxel Exp $
* $Id: saa7134-core.c,v 1.30 2005/05/22 19:23:39 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
......
/*
* $Id: saa7134-dvb.c,v 1.12 2005/02/18 12:28:29 kraxel Exp $
* $Id: saa7134-dvb.c,v 1.13 2005/06/12 04:19:19 mchehab Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
......
/*
* $Id: saa7134-empress.c,v 1.10 2005/02/03 10:24:33 kraxel Exp $
* $Id: saa7134-empress.c,v 1.11 2005/05/22 19:23:39 nsh Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
......
/*
* $Id: saa7134-i2c.c,v 1.10 2005/01/24 17:37:23 kraxel Exp $
* $Id: saa7134-i2c.c,v 1.11 2005/06/12 01:36:14 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* i2c interface support
......
/*
* $Id: saa7134-input.c,v 1.16 2004/12/10 12:33:39 kraxel Exp $
* $Id: saa7134-input.c,v 1.19 2005/06/07 18:02:26 nsh Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
......@@ -308,6 +308,102 @@ static IR_KEYTAB_TYPE videomate_tv_pvr_codes[IR_KEYTAB_SIZE] = {
[ 32 ] = KEY_LANGUAGE,
[ 33 ] = KEY_SLEEP,
};
/* Michael Tokarev <mjt@tls.msk.ru>
http://www.corpit.ru/mjt/beholdTV/remote_control.jpg
keytable is used by MANLI MTV00[12] and BeholdTV 40[13] at
least, and probably other cards too.
The "ascii-art picture" below (in comments, first row
is the keycode in hex, and subsequent row(s) shows
the button labels (several variants when appropriate)
helps to descide which keycodes to assign to the buttons.
*/
static IR_KEYTAB_TYPE manli_codes[IR_KEYTAB_SIZE] = {
/* 0x1c 0x12 *
* FUNCTION POWER *
* FM (|) *
* */
[ 0x1c ] = KEY_RADIO, /*XXX*/
[ 0x12 ] = KEY_POWER,
/* 0x01 0x02 0x03 *
* 1 2 3 *
* *
* 0x04 0x05 0x06 *
* 4 5 6 *
* *
* 0x07 0x08 0x09 *
* 7 8 9 *
* */
[ 0x01 ] = KEY_KP1,
[ 0x02 ] = KEY_KP2,
[ 0x03 ] = KEY_KP3,
[ 0x04 ] = KEY_KP4,
[ 0x05 ] = KEY_KP5,
[ 0x06 ] = KEY_KP6,
[ 0x07 ] = KEY_KP7,
[ 0x08 ] = KEY_KP8,
[ 0x09 ] = KEY_KP9,
/* 0x0a 0x00 0x17 *
* RECALL 0 +100 *
* PLUS *
* */
[ 0x0a ] = KEY_AGAIN, /*XXX KEY_REWIND? */
[ 0x00 ] = KEY_KP0,
[ 0x17 ] = KEY_DIGITS, /*XXX*/
/* 0x14 0x10 *
* MENU INFO *
* OSD */
[ 0x14 ] = KEY_MENU,
[ 0x10 ] = KEY_INFO,
/* 0x0b *
* Up *
* *
* 0x18 0x16 0x0c *
* Left Ok Right *
* *
* 0x015 *
* Down *
* */
[ 0x0b ] = KEY_UP, /*XXX KEY_SCROLLUP? */
[ 0x18 ] = KEY_LEFT, /*XXX KEY_BACK? */
[ 0x16 ] = KEY_OK, /*XXX KEY_SELECT? KEY_ENTER? */
[ 0x0c ] = KEY_RIGHT, /*XXX KEY_FORWARD? */
[ 0x15 ] = KEY_DOWN, /*XXX KEY_SCROLLDOWN? */
/* 0x11 0x0d *
* TV/AV MODE *
* SOURCE STEREO *
* */
[ 0x11 ] = KEY_TV, /*XXX*/
[ 0x0d ] = KEY_MODE, /*XXX there's no KEY_STEREO */
/* 0x0f 0x1b 0x1a *
* AUDIO Vol+ Chan+ *
* TIMESHIFT??? *
* *
* 0x0e 0x1f 0x1e *
* SLEEP Vol- Chan- *
* */
[ 0x0f ] = KEY_AUDIO,
[ 0x1b ] = KEY_VOLUMEUP,
[ 0x1a ] = KEY_CHANNELUP,
[ 0x0e ] = KEY_SLEEP, /*XXX maybe KEY_PAUSE */
[ 0x1f ] = KEY_VOLUMEDOWN,
[ 0x1e ] = KEY_CHANNELDOWN,
/* 0x13 0x19 *
* MUTE SNAPSHOT*
* */
[ 0x13 ] = KEY_MUTE,
[ 0x19 ] = KEY_RECORD, /*XXX*/
// 0x1d unused ?
};
/* ---------------------------------------------------------------------- */
static int build_key(struct saa7134_dev *dev)
......@@ -379,7 +475,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
switch (dev->board) {
case SAA7134_BOARD_FLYVIDEO2000:
case SAA7134_BOARD_FLYVIDEO3000:
case SAA7134_BOARD_FLYTVPLATINUM_FM:
case SAA7134_BOARD_FLYTVPLATINUM_FM:
ir_codes = flyvideo_codes;
mask_keycode = 0xEC00000;
mask_keydown = 0x0040000;
......@@ -405,8 +501,12 @@ int saa7134_input_init1(struct saa7134_dev *dev)
polling = 50; // ms
break;
case SAA7134_BOARD_MD2819:
case SAA7134_BOARD_KWORLD_VSTREAM_XPERT:
case SAA7134_BOARD_AVERMEDIA_305:
case SAA7134_BOARD_AVERMEDIA_307:
case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
ir_codes = md2819_codes;
mask_keycode = 0x0007C8;
mask_keydown = 0x000010;
......@@ -415,6 +515,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
break;
case SAA7134_BOARD_MANLI_MTV001:
case SAA7134_BOARD_MANLI_MTV002:
ir_codes = manli_codes;
mask_keycode = 0x001f00;
mask_keyup = 0x004000;
mask_keydown = 0x002000;
polling = 50; // ms
break;
case SAA7134_BOARD_VIDEOMATE_TV_PVR:
ir_codes = videomate_tv_pvr_codes;
mask_keycode = 0x00003F;
......
/*
* $Id: saa7134-oss.c,v 1.13 2004/12/10 12:33:39 kraxel Exp $
* $Id: saa7134-oss.c,v 1.14 2005/05/18 22:45:16 hhackmann Exp $
*
* device driver for philips saa7134 based TV cards
* oss dsp interface
......@@ -49,7 +49,6 @@ MODULE_PARM_DESC(oss_rate,"sample rate (valid are: 32000,48000)");
static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks)
{
blksize &= ~0xff;
if (blksize < 0x100)
blksize = 0x100;
if (blksize > 0x10000)
......@@ -57,8 +56,6 @@ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks)
if (blocks < 2)
blocks = 2;
while ((blksize * blocks) & ~PAGE_MASK)
blocks++;
if ((blksize * blocks) > 1024*1024)
blocks = 1024*1024 / blksize;
......@@ -79,7 +76,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev)
BUG();
videobuf_dma_init(&dev->oss.dma);
err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE,
dev->oss.bufsize >> PAGE_SHIFT);
(dev->oss.bufsize + PAGE_SIZE) >> PAGE_SHIFT);
if (0 != err)
return err;
return 0;
......@@ -163,10 +160,11 @@ static int dsp_rec_start(struct saa7134_dev *dev)
fmt |= 0x04;
fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80;
saa_writeb(SAA7134_NUM_SAMPLES0, (dev->oss.blksize & 0x0000ff));
saa_writeb(SAA7134_NUM_SAMPLES1, (dev->oss.blksize & 0x00ff00) >> 8);
saa_writeb(SAA7134_NUM_SAMPLES2, (dev->oss.blksize & 0xff0000) >> 16);
saa_writeb(SAA7134_NUM_SAMPLES0, ((dev->oss.blksize - 1) & 0x0000ff));
saa_writeb(SAA7134_NUM_SAMPLES1, ((dev->oss.blksize - 1) & 0x00ff00) >> 8);
saa_writeb(SAA7134_NUM_SAMPLES2, ((dev->oss.blksize - 1) & 0xff0000) >> 16);
saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt);
break;
case PCI_DEVICE_ID_PHILIPS_SAA7133:
case PCI_DEVICE_ID_PHILIPS_SAA7135:
......@@ -817,7 +815,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status)
reg = SAA7134_RS_BA1(6);
} else {
/* even */
if (0 == (dev->oss.dma_blk & 0x00))
if (1 == (dev->oss.dma_blk & 0x01))
reg = SAA7134_RS_BA2(6);
}
if (0 == reg) {
......
/*
* $Id: saa7134-tvaudio.c,v 1.22 2005/01/07 13:11:19 kraxel Exp $
* $Id: saa7134-tvaudio.c,v 1.25 2005/06/07 19:00:38 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* tv audio decoder (fm stereo, nicam, ...)
......@@ -181,7 +181,8 @@ static void tvaudio_init(struct saa7134_dev *dev)
saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff);
saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff);
saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff);
saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x01);
// frame locked audio was reported not to be reliable
saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x02);
saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14);
saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50);
......@@ -250,6 +251,11 @@ static void mute_input_7134(struct saa7134_dev *dev)
saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, ausel);
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x08, ics);
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x07, ocs);
// for oss, we need to change the clock configuration
if (in->amux == TV)
saa_andorb(SAA7134_SIF_SAMPLE_FREQ, 0x03, 0x00);
else
saa_andorb(SAA7134_SIF_SAMPLE_FREQ, 0x03, 0x01);
/* switch gpio-connected external audio mux */
if (0 == card(dev).gpiomask)
......@@ -439,16 +445,15 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
nicam = saa_readb(SAA7134_NICAM_STATUS);
dprintk("getstereo: nicam=0x%x\n",nicam);
switch (nicam & 0x0b) {
case 0x08:
retval = V4L2_TUNER_SUB_MONO;
break;
case 0x09:
retval = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
break;
case 0x0a:
retval = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
break;
case 0x08:
default:
retval = V4L2_TUNER_SUB_MONO;
break;
}
break;
}
......@@ -572,14 +577,14 @@ static int tvaudio_thread(void *data)
} else if (0 != dev->last_carrier) {
/* no carrier -- try last detected one as fallback */
carrier = dev->last_carrier;
printk(KERN_WARNING "%s/audio: audio carrier scan failed, "
dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, "
"using %d.%03d MHz [last detected]\n",
dev->name, carrier/1000, carrier%1000);
} else {
/* no carrier + no fallback -- use default */
carrier = default_carrier;
printk(KERN_WARNING "%s/audio: audio carrier scan failed, "
dprintk(KERN_WARNING "%s/audio: audio carrier scan failed, "
"using %d.%03d MHz [default]\n",
dev->name, carrier/1000, carrier%1000);
}
......
/*
* $Id: saa7134-vbi.c,v 1.6 2004/12/10 12:33:39 kraxel Exp $
* $Id: saa7134-vbi.c,v 1.7 2005/05/24 23:13:06 nsh Exp $