OSDN Git Service

[media] hdpvr: fix two audio bugs
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 16 Jun 2014 12:08:29 +0000 (09:08 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 4 Jul 2014 18:13:02 +0000 (15:13 -0300)
commit3445857b22eafb70a6ac258979e955b116bfd2c6
treebf4dd4981bd2d35d85222812303cbde71abf7b87
parent9249196867803227dfb6b5f01f7683ce9b5572fd
[media] hdpvr: fix two audio bugs

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: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Scott Doty <scott@corp.sonic.net>
Cc: stable@vger.kernel.org # for v3.10 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/hdpvr/hdpvr-video.c