TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

USB Audio Random Actually Random Now

Discussion in 'Model S' started by Lightmatrix, Jun 12, 2017.

Tags:
  1. KidDoc

    KidDoc Supporting Member

    Joined:
    Aug 6, 2014
    Messages:
    318
    Location:
    College Station, TX
    This is one of the most simple and annoying bugs in my almost 3.5 years of ownership.
     
  2. bob_p

    bob_p Active Member

    Joined:
    Apr 5, 2012
    Messages:
    2,801
    And it should be a simple fix - a rookie programming mistake.
     
  3. animorph

    animorph Active Member

    Joined:
    Apr 1, 2016
    Messages:
    1,520
    Location:
    Scottsdale, AZ
    I've done plenty of random number generation programming. It's surprisingly difficult to do with statistical accuracy, but there are ancient published algorithms to do it properly.
     
  4. thecloud

    thecloud As rhythm raced inside, the ship came alive

    Joined:
    Nov 24, 2014
    Messages:
    1,598
    Location:
    Sunnyvale, CA
    I don't think the problem is generating a random number. The problem is keeping your place in the list that was generated randomly.

    Shuffle algorithms don't randomly pick a number from 1..n every time a new song is selected; they shuffle a collection of items randomly to create a list. After that, it's up to the programmer to remember where in the list you are, reshuffle when the end of the list is reached, and not skip back to the beginning every time the car goes to sleep.
     
  5. bob_p

    bob_p Active Member

    Joined:
    Apr 5, 2012
    Messages:
    2,801
    This is actually a combination of two problems.

    The first problem is that the random sequence is the same, every time the media player starts playing a new set of songs. No matter what song you play first, the second and subsequent songs are always the same - in the same sequence. This can typically be fixed by applying a seed based on the current time (in fractions of a second), which gives the appearance of being truly random.

    The second problem is actually the bigger issue - the media player often forgets which song it is currently playing. This happens when you change to a different source, and then when you change back to USB, it doesn't remember which song you were on - and you have to pick a new song. This also seems to happen periodically if the car has been parked long enough for the car to go into sleep mode, and the media player didn't properly save the USB song status before going to sleep.

    The first problem should be relatively simple to fix - likely one location in the code that needs to be fixed.

    The second problem could be more difficult to fix. The media player was implemented for the first Model S production cars. Sleep mode was added after that - and there may be portions of the media player that weren't designed to recover from sleep mode. So it may require more places in the media player to save the current state.

    Though compared to the complexities of implementing AP, these issues should be relatively simple to fix - if Tesla would just put someone on it (for a day or two?).
     
  6. Matias

    Matias Active Member

    Joined:
    Apr 2, 2014
    Messages:
    2,802
    Location:
    Finland
    [​IMG]
     
    • Like x 1
  7. RodF

    RodF Member

    Joined:
    Dec 28, 2012
    Messages:
    416
    Location:
    Honolulu, Hawaii
    Problem still the same. I am going to try to remove the usb and reboot, and see if that creates a new “ random” shuffle list.
     
  8. bob_p

    bob_p Active Member

    Joined:
    Apr 5, 2012
    Messages:
    2,801
    Confirm that the problem is NOT fixed - we get the same sequence of "random songs" every time

    This is getting pretty old because - we get the same sequence of "random songs" every time

    I've tried to fix this by re-selecting a different song once the random songs start playing, but not sure if that is fixing the problem temporarily, until the media player forgets what song is playing and it asks to start over when - we get the same sequence of "random songs" every time
     
    • Informative x 1
  9. tomas

    tomas Only partially psycho

    Joined:
    Oct 22, 2012
    Messages:
    3,569
    Location:
    Chicago/Montecito
    Bob, as discussed in the USB bugs thread, this is more complex. It Appears fixed for me as of a couple of months ago. Which leads me to believe it is not simply a coding issue but a confluence of a few parameters (eg amount of data on USB device, format of songs, amount of total data in car’s memory). Thus different owners reporting conflicting experiences. OTOH, I’ve downloaded new rls last night do may be FUBARED again LOL
     
  10. bob_p

    bob_p Active Member

    Joined:
    Apr 5, 2012
    Messages:
    2,801
    I briefly thought it was fixed - because I noticed it was playing a different "random" sequence of songs. Don't recall what I changed - it may have been as simple as removing the USB stick and then re-inserting it, or it might have been after a software update.

    If the 44 release adds "chill mode" and "easy entry/exit", and they finally got around to fixing the XM station list bug (still missing the useful station slider removed in 8.0), perhaps we'll be surprised with a fix to the USB problems along with the new features...
     

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC