• Matthieu Rogez's avatar
    [media] em28xx: fix Terratec Grabby AC97 codec detection · 0899f62f
    Matthieu Rogez authored
    EMP202 chip inside Terratec Grabby (hw rev 2) seems to require some time
    before accessing reliably its registers. Otherwise it returns some values
    previously put on the I2C bus.
    
    To account for that period, we delay card setup until we have a proof that
    accessing AC97 registers is reliable. We get this proof by polling
    AC97_RESET until the expected value is read. We also check that unrelated
    registers don't return the same value. This second check handles the case
    where the expected value is constantly returned no matter which register
    is accessed.
    Signed-off-by: default avatarMatthieu Rogez <matthieu.rogez@gmail.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    0899f62f
em28xx-cards.c 109 KB