V4L/DVB (6828): cx88-blackbird: audio improvements

This patch should fix the 'muted audio' and 'raspy audio' problem for
mpeg2 streams out of cx88-blackbird devices.

Especially mythtv users would find that the audio would often sound bad
(aliased, or 'raspy'), mainly related to channel changes, many (all?)
other users would find that there was no audio at all in the mpeg data
from the encoder chip, unless the audio was manually unmuted.

The patch includes the following modifications:

Don't actually start the mpeg2 encoder until the device is read from
by the application.

Wait until the audio is stable for at least 400ms before starting the
mpeg encoder.

Mute/Unmute the audio when starting/stopping the mpeg encoder.

Stop the mpeg encoder when changing parameters and when changing tuner
frequency.

Add a variable 'mpeg_active' to struct cx8802_dev to allow tracking of
whether or not the mpeg2 encoder is active.

Load the firmware on cx88-blackbird driver load.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2 files changed