Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • testing radio stereo on tda9887 -hbbwas -hbbTDA9887

    5 answers - 3156 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Thanks, Hermann and Ian
    So the current results are:
    1. MK3 tuners stereo detection differs from old tuners stereo detection. So tuner_stereo function need take care about both cases.
    2. Really we should add cAudioGain6 in stereo mode. Datasheet also says about that, so it should be safe. Btw, hermann, what do you tnink about uploading available datasheets to linuxtv? I have ones for mk3, saa7134 and tda9987.
    Fixes implemented in following patch
    The reason of noise on Ian's card is still unknow, we should investigate it further. Probably we've fogotten mute something, I don't know.
    diff -upr video4linux/tda9887.c video4linux.new/tda9887.c
    video4linux/tda9887.cThu Jun 9 11:45:24 2005
    video4linux.new/tda9887.cFri Jun 10 13:43:06 2005
    @@ -222,11 +222,22 @@ static struct tvnorm tvnorms[] = {
    }
    };
    -static struct tvnorm radio = {
    -.name = "radio",
    +static struct tvnorm radio_stereo = {
    +.name = "Radio Stereo",
    .b = ( cFmRadio |
    cQSS ),
    -.c = ( cDFF ),
    +.c = ( cDFF |
    + cAudioGain6 ),
    +.e = ( cAudioIF_5_5 |
    + cRadioIF_38_90 ),
    +};
    +
    +static struct tvnorm radio_mono = {
    +.name = "Radio Mono",
    +.b = ( cFmRadio |
    + cQSS ),
    +.c = ( cDN |
    + cDeemphasis50),
    .e = ( cAudioIF_5_5 |
    cRadioIF_38_90 ),
    };
    @@ -363,7 +374,10 @@ static int tda9887_set_tvnorm(struct tda
    int i;
    if (t->radio) {
    -norm = &radio;
    +if (t->radio_mode == V4L2_TUNER_MDE_MN)
    +norm = &radio_mono;
    +else
    + norm = &radio_stereo;
    } else {
    for (i = 0; i < ARRAY_SIZE(tvnorms); i++) {
    if (tvnorms[i].std & t->std) {
    @@ -558,10 +572,6 @@ static int tda9887_configure(struct tda9
    buf[1] |= Port1Inactive;
    buf[1] |= Port2Inactive;
    -if (t->radio && t->radio_mode == V4L2_TUNER_MDE_MN) {
    -buf [2] = (cDN | cDeemphasis50);
    -}
    -
    if (UNSET != t->pinnacle_id) {
    tda9887_set_pinnacle(t,buf);
    }
    diff -upr video4linux/tuner-simple.c video4linux.new/tuner-simple.c
    video4linux/tuner-simple.cThu Jun 9 11:45:24 2005
    video4linux.new/tuner-simple.cFri Jun 10 13:35:36 2005
    @@ -247,7 +247,8 @@ static int tuner_getstatus(struct i2c_cl
    #define TUNER_MDE 0x38
    #define TUNER_AFC 0x07
    -#define TUNER_STERE 0x04 /* radio mode */
    +#define TUNER_STERE 0x10 /* radio mode */
    +#define TUNER_STEREMK3 0x04 /* radio mode */
    #define TUNER_SIGNAL 0x07 /* radio mode */
    static int tuner_signal(struct i2c_client *c)
    @@ -257,7 +258,22 @@ static int tuner_signal(struct i2c_clien
    static int tuner_stereo(struct i2c_client *c)
    {
    -return ((tuner_getstatus (c) & TUNER_SIGNAL) == TUNER_STERE);
    +int stereo, status;
    +struct tuner *t = i2c_get_clientdata(c);
    +
    +status = tuner_getstatus (c);
    +
    +switch (t->type) {
    + case TUNER_PHILIPS_FM1216ME_MK3:
    + case TUNER_PHILIPS_FM1236_MK3:
    +case TUNER_PHILIPS_FM1256_IH3:
    +stereo = ((status & TUNER_SIGNAL) == TUNER_STEREMK3);
    +break;
    +default:
    +stereo = status & TUNER_STERE;
    +}
    +
    +return stereo;
    }
    #if 0 /* unused */
  • No.1 | | 1292 bytes | |

    Nickolay V. Shmyrev wrote:
    Thanks, Hermann and Ian

    So the current results are:

    1. MK3 tuners stereo detection differs from old tuners stereo
    detection. So tuner_stereo function need take care about both cases.

    2. Really we should add cAudioGain6 in stereo mode. Datasheet also
    says about that, so it should be safe. Btw, hermann, what do you
    tnink about uploading available datasheets to linuxtv? I have ones
    for mk3, saa7134 and tda9987.

    Fixes implemented in following patch

    The reason of noise on Ian's card is still unknow, we should
    investigate it further. Probably we've fogotten mute something, I
    don't know.

    Many thanks for the new patch.
    I have applied it to the CVS copies taken at 19:00 BST 10th June,
    rebuilt and installed.

    Result is that the louder crackling noise I was hearing previously has
    now gone.

    What is left is a very faint crackle in the background, and this is
    definitely linked to the TV aerial - if I unplug the TV aerial the faint
    crackle disappears.

    I would guess that your hunch about something not being muted is
    correct. If you want to throw me some options to try I'd be more than
    happy to help try and isolate it.

    Regards
    Ian
  • No.2 | | 4087 bytes | |

    Am Fr, den 10.06.2005 schrieb Nickolay V. Shmyrev um 18:39:
    Thanks, Hermann and Ian

    So the current results are:

    1. MK3 tuners stereo detection differs from old tuners stereo detection. So tuner_stereo function need take care about both cases.

    Yep, don't know what is the reference tuner for 0x10, but the old NTSC
    FM1236 at http://v3tv.sourceforge.net should be similar to mine.

    2. Really we should add cAudioGain6 in stereo mode. Datasheet also says about that, so it should be safe. Btw, hermann, what do you tnink about uploading available datasheets to linuxtv? I have ones for mk3, saa7134 and tda9987.

    Yes, should be added then.

    I'm no lawyer, but guess you would have to ask for permission as always.
    Philips/LG/YMEC/Tena/TCL etc have much stuff on servers available now
    for public and I have no other, also no programming instructions for
    saa7134, might be better so :)

    The MK3 stuff could depend on the conditions it was handed over, but it
    is already on ivtv since quite a while and announced to the list.

    Fixes implemented in following patch

    That is the right thing! Already tested on the older tuners.

    The reason of noise on Ian's card is still unknow, we should investigate it further. Probably we've fogotten mute something, I don't know.

    If ports 0/1 doesn't help and all what Hartmut has, no idea.
    Is the cx88 clean in FM stereo? I don't know offhand.

    We have a major progress here.

    Thanks to all contributors so far.

    Hermann

    diff -upr video4linux/tda9887.c video4linux.new/tda9887.c
    video4linux/tda9887.cThu Jun 9 11:45:24 2005
    video4linux.new/tda9887.cFri Jun 10 13:43:06 2005
    @@ -222,11 +222,22 @@ static struct tvnorm tvnorms[] = {
    }
    };
    -static struct tvnorm radio = {
    -.name = "radio",
    +static struct tvnorm radio_stereo = {
    +.name = "Radio Stereo",
    .b = ( cFmRadio |
    cQSS ),
    -.c = ( cDFF ),
    +.c = ( cDFF |
    + cAudioGain6 ),
    +.e = ( cAudioIF_5_5 |
    + cRadioIF_38_90 ),
    +};
    +
    +static struct tvnorm radio_mono = {
    +.name = "Radio Mono",
    +.b = ( cFmRadio |
    + cQSS ),
    +.c = ( cDN |
    + cDeemphasis50),
    .e = ( cAudioIF_5_5 |
    cRadioIF_38_90 ),
    };
    @@ -363,7 +374,10 @@ static int tda9887_set_tvnorm(struct tda
    int i;

    if (t->radio) {
    -norm = &radio;
    +if (t->radio_mode == V4L2_TUNER_MDE_MN)
    +norm = &radio_mono;
    +else
    + norm = &radio_stereo;
    } else {
    for (i = 0; i < ARRAY_SIZE(tvnorms); i++) {
    if (tvnorms[i].std & t->std) {
    @@ -558,10 +572,6 @@ static int tda9887_configure(struct tda9
    buf[1] |= Port1Inactive;
    buf[1] |= Port2Inactive;
    -if (t->radio && t->radio_mode == V4L2_TUNER_MDE_MN) {
    -buf [2] = (cDN | cDeemphasis50);
    -}
    -
    if (UNSET != t->pinnacle_id) {
    tda9887_set_pinnacle(t,buf);
    }
    diff -upr video4linux/tuner-simple.c video4linux.new/tuner-simple.c
    video4linux/tuner-simple.cThu Jun 9 11:45:24 2005
    video4linux.new/tuner-simple.cFri Jun 10 13:35:36 2005
    @@ -247,7 +247,8 @@ static int tuner_getstatus(struct i2c_cl
    #define TUNER_MDE 0x38
    #define TUNER_AFC 0x07
    -#define TUNER_STERE 0x04 /* radio mode */
    +#define TUNER_STERE 0x10 /* radio mode */
    +#define TUNER_STEREMK3 0x04 /* radio mode */
    #define TUNER_SIGNAL 0x07 /* radio mode */

    static int tuner_signal(struct i2c_client *c)
    @@ -257,7 +258,22 @@ static int tuner_signal(struct i2c_clien

    static int tuner_stereo(struct i2c_client *c)
    {
    -return ((tuner_getstatus (c) & TUNER_SIGNAL) == TUNER_STERE);
    +int stereo, status;
    +struct tuner *t = i2c_get_clientdata(c);
    +
    +status = tuner_getstatus (c);
    +
    +switch (t->type) {
    + case TUNER_PHILIPS_FM1216ME_MK3:
    + case TUNER_PHILIPS_FM1236_MK3:
    +case TUNER_PHILIPS_FM1256_IH3:
    +stereo = ((status & TUNER_SIGNAL) == TUNER_STEREMK3);
    +break;
    +default:
    +stereo = status & TUNER_STERE;
    +}
    +
    +return stereo;
    }

    #if 0 /* unused */
  • No.3 | | 1250 bytes | |

    hermann pitton wrote:
    Am Fr, den 10.06.2005 schrieb Nickolay V. Shmyrev um 18:39:

    >Fixes implemented in following patch


    That is the right thing! Already tested on the older tuners.


    >The reason of noise on Ian's card is still unknow, we should
    >investigate it further. Probably we've fogotten mute something, I
    >don't know.
    >


    If ports 0/1 doesn't help and all what Hartmut has, no idea. Is the
    cx88 clean in FM stereo? I don't know offhand.

    I apologize if I mix up the chips involved - I'm afraid I have no clear
    picture of who does what between cx88 and tda9887 :-(.

    Perhaps it may be worth starting a separate thread for cx88/tda9887 FM
    radio? Although I can start the radio, and tune to different stations,
    any application calls to v4lctl (eg mute, set mono, set stereo) have no
    effect at all. Also, the applications (radio and gnomeradio in my case)
    cannot mute radio when asked to.

    If Torsten is listening he may know if dscaler has got the cx88/tda9887
    combination working for FM radio - there may be some missing bits we can
    learn from.

    Regards
    Ian
  • No.4 | | 1052 bytes | |

    Perhaps it may be worth starting a separate thread for cx88/tda9887 FM
    radio? Although I can start the radio, and tune to different stations,
    any application calls to v4lctl (eg mute, set mono, set stereo) have no
    effect at all. Also, the applications (radio and gnomeradio in my case)
    cannot mute radio when asked to.

    There is generic problems with muting radio. The reason for them is the
    following:

    many cards, like cx88 or my AverTV Studio 307 there is internal
    switcher managed by gpio. In radio mode sound goes directly from tda
    while in tv mode it's taken from saa7134. Current implementation of mute
    only mutes saa7134/conexant chip, but does nothing with gpio, so there
    is still sound.

    To test it you can do the following.

    1. Start gnomeradio and enable mute on exit.
    2. Start tvtime
    3. Close gnomeradio - sound from tv will be muted.

    Probably we should remember last switcher state and turn it for tv on
    mute and return back on unmute.

    Patches are welcome :)
  • No.5 | | 1480 bytes | |

    If Torsten is listening he may know if dscaler has got the cx88/tda9887
    combination working for FM radio - there may be some missing bits we can
    learn from.

    Yes, I'm listening. :)

    Unfortunate I can't help in that direction. My hauppauge card I own is
    without fm radio support and I have no reports about fm radio on cx2388x
    chip. The project I'm normaly working stands only for deinterlacing and
    scaling video.

    Maybe it is off topic but I wish the others let to known that Ian helped me
    a *lot* to get my first Linux machine running and I have to thank him a lot.
    Without Ian's help I have not had any chance to get my machine fine running.

    Now I can confirm things you are talking about on the list. But things
    around me are very new and programming on DScaler is very different compared
    to v4l2. I'm unable to understand the whole code from v4l2 project - it is
    simply to much. I have a lot of questions and if I may I would like to post
    them next time if things are sorted out. I now own a book with more than
    1.200 pages, a lot to read (and to understand). ;)

    To my surprise today I got an new distro for free from an german computer
    magazine called "CT". It is an double sided DVD-Rom including Suse 9.3
    Personal Edition. My next step is now to install that new one because my
    older distro seems me to not-up-to-date.

    [sorry for my bad english writing]
    Torsten

Re: testing radio stereo on tda9887 -hbbwas -hbbTDA9887


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Linux"

EMSDN.COM