bttv msp3400 2.6.15.6 - > 2.6.16 stereo stop working
- From: Hans Verkuil <hverkuil (at) xs4all.nl>
- Date: Wed, 29 Mar 2006 00:36:26 +0200
On Wednesday 29 March 2006 00:22, Hans Verkuil wrote:
> On Wednesday 29 March 2006 00:03, Daniel Smolik wrote:
> > Hans Verkuil napsal(a):
> > > On Tuesday 28 March 2006 23:38, Daniel Smolik wrote:
> > >>I have another question. Is it possible corrupt some EEPROM in
> > >> Temic PAL tuner ? My tuner doesn't tune to cable channels now.
> > >> Switching to another kernel or power off doesn't help. I found
> > >> this after yesterday testing.
> > >
> > > I've never heard of such a thing. I consider it unlikely, but I'm
> > > no expert on that.
> >
> > It doesn't matter.
> >
> > I applied patch as you described in previous mail.
> > There is a results :
> >
> > 1) MSP3400 works no lockup
>
> Yeah!
>
> > 2) xawtv still shows mono
>
> Boo!
>
> > In log a see when I switch to mono,stereo,lang1,2 but I don't hear
> > any difference in sound. May it is my feeling.
>
> You need a music channel like MTV or something. On most other channel
> it is often very hard to detect stereo.
>
> Can you make another log with the debug parameter of msp3400 set at 1
> with this version?
Never mind, I've found the bug (msp3400c specific).
Please apply the attached patch to msp3400-kthreads.c and let me know if
this fixes the problems.
Hans
diff -r 7335623cb520 linux/drivers/media/video/msp3400-kthreads.c
--- a/linux/drivers/media/video/msp3400-kthreads.c Tue Mar 28 23:32:52 2006 +0200
+++ b/linux/drivers/media/video/msp3400-kthreads.c Wed Mar 29 00:35:23 2006 +0200
(at) (at) -234,6 +234,7 (at) (at) static void msp3400c_set_audmode(struct
char *modestr = (state->audmode >= 0 && state->audmode < 5) ?
strmode[state->audmode] : "unknown";
int src = 0; /* channel source: FM/AM, nicam or SCART */
+ int audmode = state->audmode;
if (state->opmode == OPMODE_AUTOSELECT) {
/* this method would break everything, let's make sure
(at) (at) -244,12 +245,23 (at) (at) static void msp3400c_set_audmode(struct
state->audmode);
return;
}
+
+ /* If no second language is available, switch to the first language */
+ if ((audmode == V4L2_TUNER_MODE_LANG2 ||
+ audmode == V4L2_TUNER_MODE_LANG1_LANG2) &&
+ !(state->rxsubchans & V4L2_TUNER_SUB_LANG2))
+ audmode = V4L2_TUNER_MODE_LANG1;
+ /* switch to stereo for stereo transmission, otherwise
+ keep first language */
+ if (audmode == V4L2_TUNER_MODE_LANG1 &&
+ (state->rxsubchans & V4L2_TUNER_SUB_STEREO))
+ audmode = V4L2_TUNER_MODE_STEREO;
/* switch demodulator */
switch (state->mode) {
case MSP_MODE_FM_TERRA:
v4l_dbg(1, msp_debug, client, "FM set_audmode: %s\n", modestr);
- switch (state->audmode) {
+ switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
msp_write_dsp(client, 0x000e, 0x3001);
break;
(at) (at) -263,7 +275,7 (at) (at) static void msp3400c_set_audmode(struct
break;
case MSP_MODE_FM_SAT:
v4l_dbg(1, msp_debug, client, "SAT set_audmode: %s\n", modestr);
- switch (state->audmode) {
+ switch (audmode) {
case V4L2_TUNER_MODE_MONO:
msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5));
break;
(at) (at) -302,7 +314,7 (at) (at) static void msp3400c_set_audmode(struct
}
/* switch audio */
- switch (state->audmode) {
+ switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
case V4L2_TUNER_MODE_LANG1_LANG2:
src |= 0x0020;
(at) (at) -320,10 +332,6 (at) (at) static void msp3400c_set_audmode(struct
src = 0x0030;
break;
case V4L2_TUNER_MODE_LANG1:
- /* switch to stereo for stereo transmission, otherwise
- keep first language */
- if (state->rxsubchans & V4L2_TUNER_SUB_STEREO)
- src |= 0x0020;
break;
case V4L2_TUNER_MODE_LANG2:
src |= 0x0010;
(at) (at) -625,9 +633,9 (at) (at) int msp3400c_thread(void *data)
if (msp_sleep(state, 1000))
goto restart;
while (state->watch_stereo) {
+ watch_stereo(client);
if (msp_sleep(state, 5000))
goto restart;
- watch_stereo(client);
}
}
v4l_dbg(1, msp_debug, client, "thread: exit\n");
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list