• Hans Verkuil's avatar
    media: hdpvr: fix two audio bugs · 926a693a
    Hans Verkuil authored
    commit 3445857b22eafb70a6ac258979e955b116bfd2c6 upstream.
    
    When the audio encoding is changed the driver calls hdpvr_set_audio
    with the current opt->audio_input value. However, that should have
    been opt->audio_input + 1. So changing the audio encoding inadvertently
    changes the input as well. This bug has always been there.
    
    The second bug was introduced in kernel 3.10 and that broke the
    default_audio_input module option handling: the audio encoding was
    never switched to AC3 if default_audio_input was set to 2 (SPDIF input).
    
    In addition, since starting with 3.10 the audio encoding is always set
    at the start the first bug now always happens when the driver is loaded.
    In the past this bug would only surface if the user would change the
    audio encoding after the driver was loaded.
    
    Also fixes a small trivial typo (bufffer -> buffer).
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Reported-by: default avatarScott Doty <scott@corp.sonic.net>
    Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    926a693a
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
hdpvr-control.c Loading commit data...
hdpvr-core.c Loading commit data...
hdpvr-i2c.c Loading commit data...
hdpvr-video.c Loading commit data...
hdpvr.h Loading commit data...