[Approved] FM radio signal detection (1 Viewer)

rmeredit

MP Donator
  • Premium Supporter
  • April 10, 2007
    164
    20
    Melbourne
    Home Country
    Just tested the patch out on a single known station and it works a treat. Scanning now to see what stations get picked up (I'm in Melbourne, so should be quite a few).

    Cheers,

    Rob.

    Edit: Seems to be all good. About 15 stations picked up - not everything that it should have, and a couple of stations that got picked up with very poor signals, but looks good. Adding in custom channels for the couple that the scan missed works fine.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Excellent news! :)
    Do you think it missed those stations because of the 0.4MHz jumps (ie. the new'ish behaviour that when a station is found, the scanning skips the next 0.4MHz) or because of something else? I'm not sure I'm a fan of the jumps. Sure it makes scanning a little faster, however some of the stations here are 0.3MHz apart so they get jumped over. I spend just as much time as was saved from the scan adding them manually! At least they can be picked up now...

    Developers: any questions, objections, comments? I'd really like to see this patch get added to MP 1.2.0
     

    rmeredit

    MP Donator
  • Premium Supporter
  • April 10, 2007
    164
    20
    Melbourne
    Home Country
    It could be, but I wouldn't rule out simple reception issues. One of the frequencies it missed was 100.9 I think and there is a station at 101.1, but there was one or two that are just off by themselves like 102.7. In the end I added three channels manually, which I was pretty happy with. Certainly better than nothing at all!

    Thanks for the patch and the work - hope it gets taken up!

    Cheers,

    Rob
     

    cpsarros

    Portal Member
    January 3, 2010
    20
    8
    Home Country
    Greece Greece
    Bravo mm135200!!!

    I can confirm that you solved the Hauppauge HVR-2200 Radio problem
    (Mantis issue 0002445).

    Compiled against 1.2.0 Alpha revision 26781
     

    rmeredit

    MP Donator
  • Premium Supporter
  • April 10, 2007
    164
    20
    Melbourne
    Home Country
    *cough*

    Devs - any love here? This is a patch that fixes a problem with a very common chipset. It's been pending for a loooong time...

    Cheers,

    Rob.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi rmeredit

    I have to say I'm as frustrated as you! :oops:
    This is only a one line code change. Furthermore, the check affected by the change is almost logically equivalent to the check that is currently in place. The DirectShow IAMTuner interface states that a driver should return:

    -1 = signal strength can't be determined
    0 = no signal
    1 = locked

    The code currently assumes lock if the driver returned -1 or 1. With the patch applied it would assume lock if the driver *doesn't* return zero. The same check, just inverted...

    Now I'd be the first one to admit that this change does open the code up to values that are out of spec, which might be something the developers are concerned about. It would be helpful if they would raise this with me so we can discuss it and find a work-around if necessary. I'm reasonably certain that all users with hybrid/analog tuner devices based on the Philips/NXP SAA7160, SAA7162 and SAA7164 PCI-e bridge chipsets will be affected since it is my understanding that Philips/NXP wrote and supported the drivers. As rmeredit says, those chipsets are relatively common. Especially among dual hybrid tuners...

    I'd really welcome the chance to discuss any issues with the patch :)

    P.S. I'd just like to point out to the team that this was the first patch I ever submitted. As a developer, it is *really* disheartening to think that you are contributing something to the community but then have the contribution rejected or ignored without any comment. This is not the way to encourage the community to participate.
     

    woddog

    Portal Pro
    November 28, 2007
    117
    5
    Townsville, QLD
    Home Country
    I've been having the same FM tuning issues with my digital now card. Hopefully the devs have time to look into this patch as I am sure that it affects more than just me and you two.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi woddog

    Have you tried the patch? If not, I'd really appreciate it if you could give it a shot and report back. Perhaps the team are just waiting for more feedback, meaning that your feedback could help to get this patch approved faster ;)
    Even if the patch doesn't work for you I'd be happy to look into the problem/s that you're experiencing...

    Binary version of the patch for 1.2.0a attached to the first post in the thread
    :)
     

    bs123

    MP Donator
  • Premium Supporter
  • March 24, 2007
    18
    3
    Home Country
    United States of America United States of America
    Hi all

    I've been a user of MediaPortal since version 0.2.3, however this is the first time I've submitted a patch so please go easy on me. I have tried to follow all the guidelines so hopefully I've done everything correctly...

    ----------------------------------------------------------------------------------------------------------

    Recently I bought myself two second hand Pinnacle 7010ix 4 in 1 (2xhybrid DVB-T/Analog TV/FM + 2xDVB-S) tuner cards from Ebay Germany. They are fantastic cards and work nicely with MediaPortal except for two issues:
    1. FM radio didn't work correctly
    2. DiSEqC switching doesn't work

    This patch is meant to solve issue 1 (I have a solution for issue 2 as well but I'm still working on the implementation).

    Problem detail:
    I need to be more specific about what I mean when I say FM radio didn't work "correctly". The tuning and playback of FM radio *did* actually work - it is just that the card failed to detect or lock on actual stations. This means that when I did an FM scan, the card would detect random frequencies (90% of which were not real stations - in fact they were usually about as far away from any real station frequency as it was possible to get!). You could successfully tune to the random frequencies picked up by the scan and hear white noise or sometimes "fuzzy" music/speech if the frequency was close to a real station. However you couldn't fix the frequency of one of the random stations or manually add a new station with a real frequency - the tuner just refused to lock.

    Investigation detail:
    It turns out that my card's driver was returning signal strength values outside of the range specified by the DirectShow interface. IAMTuner:: SignalPresent specifies that the driver should return '1' if the tuner is locked, however my card was returning 2, 3, 4 and sometimes even 5 for frequencies where there were real stations. I think the driver probably contains a manufacturer specific implementation of signal strength/quality with 1 being the weakest lock and 5 being the strongest :rolleyes:. Note that the driver does correctly return 0 (meaning 'no signal') when there is really no station present.

    Fix detail:
    The fix is very simple - only one line of code is changed. Instead of determining lock by checking for 'signal present' or 'has-no-signal-strength', I assume lock and check for 'no lock' to determine if the tuner isn't actually locked.

    Okay well hopefully I have given all the information that needs to be given. The patch (which is taken from the SVN HEAD) is attached!
    :)

    [Edit: I meant to also say that perhaps this issue is connected to Mantis issue 0002445. The card is not a Hauppauge, however you never know...]

    ----------------------------------------------------
    Update 2010-11-18
    - Add binary patch for 1.2.0a

    This fixed my radio tuning problem with my hvr2250.
    appears to fix 0002445: Hauppauge HVR-2200 cards don't tune FM properly - MediaPortal Bugtracker
     

    Users who are viewing this thread

    Top Bottom