aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c6
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c21
-rw-r--r--drivers/media/video/saa7134/saa7134-tvaudio.c11
3 files changed, 25 insertions, 13 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 275d06af69d2..c64718aec9cb 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -2515,6 +2515,7 @@ struct saa7134_board saa7134_boards[] = {
2515 .tuner_addr = ADDR_UNSET, 2515 .tuner_addr = ADDR_UNSET,
2516 .radio_addr = ADDR_UNSET, 2516 .radio_addr = ADDR_UNSET,
2517 .mpeg = SAA7134_MPEG_DVB, 2517 .mpeg = SAA7134_MPEG_DVB,
2518 .gpiomask = 1 << 21,
2518 .inputs = {{ 2519 .inputs = {{
2519 .name = name_tv, 2520 .name = name_tv,
2520 .vmux = 1, 2521 .vmux = 1,
@@ -2529,6 +2530,11 @@ struct saa7134_board saa7134_boards[] = {
2529 .vmux = 8, 2530 .vmux = 8,
2530 .amux = LINE1, 2531 .amux = LINE1,
2531 }}, 2532 }},
2533 .radio = {
2534 .name = name_radio,
2535 .amux = TV,
2536 .gpio = 0x0200000,
2537 },
2532 }, 2538 },
2533 [SAA7134_BOARD_MSI_TVATANYWHERE_PLUS] = { 2539 [SAA7134_BOARD_MSI_TVATANYWHERE_PLUS] = {
2534 .name = "MSI TV@Anywhere plus", 2540 .name = "MSI TV@Anywhere plus",
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 3983a6524cac..028904bd94a2 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -31,6 +31,7 @@
31#include <linux/sound.h> 31#include <linux/sound.h>
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/mutex.h>
34 35
35#include "saa7134-reg.h" 36#include "saa7134-reg.h"
36#include "saa7134.h" 37#include "saa7134.h"
@@ -84,7 +85,7 @@ MODULE_PARM_DESC(radio_nr, "radio device number");
84MODULE_PARM_DESC(tuner, "tuner type"); 85MODULE_PARM_DESC(tuner, "tuner type");
85MODULE_PARM_DESC(card, "card type"); 86MODULE_PARM_DESC(card, "card type");
86 87
87static DECLARE_MUTEX(devlist_lock); 88static DEFINE_MUTEX(devlist_lock);
88LIST_HEAD(saa7134_devlist); 89LIST_HEAD(saa7134_devlist);
89static LIST_HEAD(mops_list); 90static LIST_HEAD(mops_list);
90static unsigned int saa7134_devcount; 91static unsigned int saa7134_devcount;
@@ -140,7 +141,7 @@ static int pending_call(struct notifier_block *self, unsigned long state,
140 return NOTIFY_DONE; 141 return NOTIFY_DONE;
141} 142}
142 143
143static int pending_registered=0; 144static int pending_registered;
144static struct notifier_block pending_notifier = { 145static struct notifier_block pending_notifier = {
145 .notifier_call = pending_call, 146 .notifier_call = pending_call,
146}; 147};
@@ -969,13 +970,13 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
969 pci_set_drvdata(pci_dev,dev); 970 pci_set_drvdata(pci_dev,dev);
970 saa7134_devcount++; 971 saa7134_devcount++;
971 972
972 down(&devlist_lock); 973 mutex_lock(&devlist_lock);
973 list_for_each(item,&mops_list) { 974 list_for_each(item,&mops_list) {
974 mops = list_entry(item, struct saa7134_mpeg_ops, next); 975 mops = list_entry(item, struct saa7134_mpeg_ops, next);
975 mpeg_ops_attach(mops, dev); 976 mpeg_ops_attach(mops, dev);
976 } 977 }
977 list_add_tail(&dev->devlist,&saa7134_devlist); 978 list_add_tail(&dev->devlist,&saa7134_devlist);
978 up(&devlist_lock); 979 mutex_unlock(&devlist_lock);
979 980
980 /* check for signal */ 981 /* check for signal */
981 saa7134_irq_video_intl(dev); 982 saa7134_irq_video_intl(dev);
@@ -1031,13 +1032,13 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
1031 saa7134_hwfini(dev); 1032 saa7134_hwfini(dev);
1032 1033
1033 /* unregister */ 1034 /* unregister */
1034 down(&devlist_lock); 1035 mutex_lock(&devlist_lock);
1035 list_del(&dev->devlist); 1036 list_del(&dev->devlist);
1036 list_for_each(item,&mops_list) { 1037 list_for_each(item,&mops_list) {
1037 mops = list_entry(item, struct saa7134_mpeg_ops, next); 1038 mops = list_entry(item, struct saa7134_mpeg_ops, next);
1038 mpeg_ops_detach(mops, dev); 1039 mpeg_ops_detach(mops, dev);
1039 } 1040 }
1040 up(&devlist_lock); 1041 mutex_unlock(&devlist_lock);
1041 saa7134_devcount--; 1042 saa7134_devcount--;
1042 1043
1043 saa7134_i2c_unregister(dev); 1044 saa7134_i2c_unregister(dev);
@@ -1071,13 +1072,13 @@ int saa7134_ts_register(struct saa7134_mpeg_ops *ops)
1071 struct list_head *item; 1072 struct list_head *item;
1072 struct saa7134_dev *dev; 1073 struct saa7134_dev *dev;
1073 1074
1074 down(&devlist_lock); 1075 mutex_lock(&devlist_lock);
1075 list_for_each(item,&saa7134_devlist) { 1076 list_for_each(item,&saa7134_devlist) {
1076 dev = list_entry(item, struct saa7134_dev, devlist); 1077 dev = list_entry(item, struct saa7134_dev, devlist);
1077 mpeg_ops_attach(ops, dev); 1078 mpeg_ops_attach(ops, dev);
1078 } 1079 }
1079 list_add_tail(&ops->next,&mops_list); 1080 list_add_tail(&ops->next,&mops_list);
1080 up(&devlist_lock); 1081 mutex_unlock(&devlist_lock);
1081 return 0; 1082 return 0;
1082} 1083}
1083 1084
@@ -1086,13 +1087,13 @@ void saa7134_ts_unregister(struct saa7134_mpeg_ops *ops)
1086 struct list_head *item; 1087 struct list_head *item;
1087 struct saa7134_dev *dev; 1088 struct saa7134_dev *dev;
1088 1089
1089 down(&devlist_lock); 1090 mutex_lock(&devlist_lock);
1090 list_del(&ops->next); 1091 list_del(&ops->next);
1091 list_for_each(item,&saa7134_devlist) { 1092 list_for_each(item,&saa7134_devlist) {
1092 dev = list_entry(item, struct saa7134_dev, devlist); 1093 dev = list_entry(item, struct saa7134_dev, devlist);
1093 mpeg_ops_detach(ops, dev); 1094 mpeg_ops_detach(ops, dev);
1094 } 1095 }
1095 up(&devlist_lock); 1096 mutex_unlock(&devlist_lock);
1096} 1097}
1097 1098
1098EXPORT_SYMBOL(saa7134_ts_register); 1099EXPORT_SYMBOL(saa7134_ts_register);
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c
index 93268427750d..afa4dcb3f96d 100644
--- a/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -180,8 +180,8 @@ static void tvaudio_init(struct saa7134_dev *dev)
180 saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff); 180 saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff);
181 saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff); 181 saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff);
182 saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff); 182 saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff);
183 // frame locked audio was reported not to be reliable 183 /* frame locked audio is mandatory for NICAM */
184 saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x02); 184 saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x01);
185 185
186 saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14); 186 saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14);
187 saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50); 187 saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50);
@@ -809,7 +809,12 @@ static int tvaudio_thread_ddep(void *data)
809 dprintk("ddep override: %s\n",stdres[audio_ddep]); 809 dprintk("ddep override: %s\n",stdres[audio_ddep]);
810 } else if (&card(dev).radio == dev->input) { 810 } else if (&card(dev).radio == dev->input) {
811 dprintk("FM Radio\n"); 811 dprintk("FM Radio\n");
812 norms = (0x0f << 2) | 0x01; 812 if (dev->tuner_type == TUNER_PHILIPS_TDA8290) {
813 norms = (0x11 << 2) | 0x01;
814 saa_dsp_writel(dev, 0x42c >> 2, 0x729555);
815 } else {
816 norms = (0x0f << 2) | 0x01;
817 }
813 } else { 818 } else {
814 /* (let chip) scan for sound carrier */ 819 /* (let chip) scan for sound carrier */
815 norms = 0; 820 norms = 0;