Commit 0f6040e8 authored by Stefan Ringel's avatar Stefan Ringel Committed by Mauro Carvalho Chehab

[media] tm6000: change input control

change input control
Signed-off-by: default avatarStefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b8f7bd87
...@@ -327,7 +327,7 @@ int tm6000_init_analog_mode(struct tm6000_core *dev) ...@@ -327,7 +327,7 @@ int tm6000_init_analog_mode(struct tm6000_core *dev)
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f); v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f);
msleep(100); msleep(100);
tm6000_set_standard(dev, &dev->norm); tm6000_set_standard(dev);
tm6000_set_vbi(dev); tm6000_set_vbi(dev);
tm6000_set_audio_bitrate(dev, 48000); tm6000_set_audio_bitrate(dev, 48000);
...@@ -489,14 +489,6 @@ struct reg_init tm6010_init_tab[] = { ...@@ -489,14 +489,6 @@ struct reg_init tm6010_init_tab[] = {
{ TM6010_REQ08_REB_SIF_GAIN_CTRL, 0xf0 }, { TM6010_REQ08_REB_SIF_GAIN_CTRL, 0xf0 },
{ TM6010_REQ08_REC_REVERSE_YC_CTRL, 0xc2 }, { TM6010_REQ08_REC_REVERSE_YC_CTRL, 0xc2 },
{ TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG, 0x60 }, { TM6010_REQ08_RF0_DAUDIO_INPUT_CONFIG, 0x60 },
{ TM6010_REQ08_R03_A_AUTO_GAIN_CTRL, 0x00},
{ TM6010_REQ08_R04_A_SIF_AMP_CTRL, 0x80},
{ TM6010_REQ08_R0C_A_ASD_THRES2, 0x0a},
{ TM6010_REQ08_R0D_A_AMD_THRES, 0x40},
{ TM6010_REQ08_R1A_A_NICAM_SER_MAX, 0x64},
{ TM6010_REQ08_R1B_A_NICAM_SER_MIN, 0x20},
{ TM6010_REQ08_R16_A_AGC_GAIN_MAX, 0xfe},
{ TM6010_REQ08_R17_A_AGC_GAIN_MIN, 0x01},
{ TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfc }, { TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfc },
{ TM6010_REQ07_R3F_RESET, 0x01 }, { TM6010_REQ07_R3F_RESET, 0x01 },
...@@ -657,7 +649,7 @@ int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate) ...@@ -657,7 +649,7 @@ int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate)
} }
EXPORT_SYMBOL_GPL(tm6000_set_audio_bitrate); EXPORT_SYMBOL_GPL(tm6000_set_audio_bitrate);
int tm6000_set_audio_input(struct tm6000_core *dev, enum tm6000_inaudio ainp) int tm6000_set_audio_rinput(struct tm6000_core *dev)
{ {
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
/* Audio crossbar setting, default SIF1 */ /* Audio crossbar setting, default SIF1 */
......
This diff is collapsed.
...@@ -1271,6 +1271,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, ...@@ -1271,6 +1271,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
dprintk(dev, 3, "audio mode: %x\n", t->audmode); dprintk(dev, 3, "audio mode: %x\n", t->audmode);
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t); v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
return 0; return 0;
} }
...@@ -1537,16 +1538,12 @@ static int tm6000_open(struct file *file) ...@@ -1537,16 +1538,12 @@ static int tm6000_open(struct file *file)
if (fh->radio) { if (fh->radio) {
dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n"); dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n");
tm6000_set_audio_input(dev, dev->aradio); dev->input = 5;
tm6000_set_volume(dev, dev->ctl_volume); tm6000_set_audio_rinput(dev);
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_radio); v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_radio);
tm6000_prepare_isoc(dev); tm6000_prepare_isoc(dev);
tm6000_start_thread(dev); tm6000_start_thread(dev);
} }
else {
tm6000_set_audio_input(dev, dev->avideo);
tm6000_set_volume(dev, dev->ctl_volume);
}
return 0; return 0;
} }
......
...@@ -320,7 +320,7 @@ int tm6000_init(struct tm6000_core *dev); ...@@ -320,7 +320,7 @@ int tm6000_init(struct tm6000_core *dev);
int tm6000_init_analog_mode(struct tm6000_core *dev); int tm6000_init_analog_mode(struct tm6000_core *dev);
int tm6000_init_digital_mode(struct tm6000_core *dev); int tm6000_init_digital_mode(struct tm6000_core *dev);
int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate); int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate);
int tm6000_set_audio_input(struct tm6000_core *dev, enum tm6000_inaudio ainp); int tm6000_set_audio_rinput(struct tm6000_core *dev);
int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 mute); int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 mute);
void tm6000_set_volume(struct tm6000_core *dev, int vol); void tm6000_set_volume(struct tm6000_core *dev, int vol);
...@@ -341,7 +341,7 @@ int tm6000_call_fillbuf(struct tm6000_core *dev, enum tm6000_ops_type type, ...@@ -341,7 +341,7 @@ int tm6000_call_fillbuf(struct tm6000_core *dev, enum tm6000_ops_type type,
/* In tm6000-stds.c */ /* In tm6000-stds.c */
void tm6000_get_std_res(struct tm6000_core *dev); void tm6000_get_std_res(struct tm6000_core *dev);
int tm6000_set_standard(struct tm6000_core *dev, v4l2_std_id *norm); int tm6000_set_standard(struct tm6000_core *dev);
/* In tm6000-i2c.c */ /* In tm6000-i2c.c */
int tm6000_i2c_register(struct tm6000_core *dev); int tm6000_i2c_register(struct tm6000_core *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment