diff options
author | Marton Balint <cus@fazekas.hu> | 2009-03-31 18:01:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:14:18 -0400 |
commit | 2325a6b98609b6559ce5da7528fc0f5a6d0d8e9b (patch) | |
tree | b79d217bff24e635081150f2aba0bbe0d9703cdc /drivers/media | |
parent | 083d6f8c81e9a2bd5f71633fb38acda35fb8240c (diff) |
V4L/DVB (11396): cx88: avoid reprogramming every audio register on A2 stereo/mono change
This patch changes cx88_set_stereo to avoid resetting all of the audio
registers on stereo/mono change if the audio standard is A2, and set
only the AUD_CTL register. The benefit of this method is that it
eliminates the annoying clicking noise on setting the audio mode to
stereo or mono.
The driver had used the same method 1.5 years ago (and for FM radio it
still does), but a pretty big cleanup commit changed it to the
"complete audio reset" method, although the reason for this move was
not clear. (If somebody knows why it was necessary, please let me
know!)
The original commit: http://linuxtv.org/hg/v4l-dvb/rev/ffe313541d7d
Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx88/cx88-tvaudio.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index 0a8699fa7292..e8316cf7f32f 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c | |||
@@ -916,20 +916,18 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) | |||
916 | set_audio_standard_A2(core, EN_A2_FORCE_MONO1); | 916 | set_audio_standard_A2(core, EN_A2_FORCE_MONO1); |
917 | } else { | 917 | } else { |
918 | /* TODO: Add A2 autodection */ | 918 | /* TODO: Add A2 autodection */ |
919 | mask = 0x3f; | ||
919 | switch (mode) { | 920 | switch (mode) { |
920 | case V4L2_TUNER_MODE_MONO: | 921 | case V4L2_TUNER_MODE_MONO: |
921 | case V4L2_TUNER_MODE_LANG1: | 922 | case V4L2_TUNER_MODE_LANG1: |
922 | set_audio_standard_A2(core, | 923 | ctl = EN_A2_FORCE_MONO1; |
923 | EN_A2_FORCE_MONO1); | ||
924 | break; | 924 | break; |
925 | case V4L2_TUNER_MODE_LANG2: | 925 | case V4L2_TUNER_MODE_LANG2: |
926 | set_audio_standard_A2(core, | 926 | ctl = EN_A2_FORCE_MONO2; |
927 | EN_A2_FORCE_MONO2); | ||
928 | break; | 927 | break; |
929 | case V4L2_TUNER_MODE_STEREO: | 928 | case V4L2_TUNER_MODE_STEREO: |
930 | case V4L2_TUNER_MODE_LANG1_LANG2: | 929 | case V4L2_TUNER_MODE_LANG1_LANG2: |
931 | set_audio_standard_A2(core, | 930 | ctl = EN_A2_FORCE_STEREO; |
932 | EN_A2_FORCE_STEREO); | ||
933 | break; | 931 | break; |
934 | } | 932 | } |
935 | } | 933 | } |