From patchwork Tue Mar 31 22:01:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 15509 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2VMElLO020578 for ; Tue, 31 Mar 2009 22:14:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756403AbZCaWOs (ORCPT ); Tue, 31 Mar 2009 18:14:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756310AbZCaWOs (ORCPT ); Tue, 31 Mar 2009 18:14:48 -0400 Received: from cinke.fazekas.hu ([195.199.244.225]:36410 "EHLO cinke.fazekas.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754811AbZCaWOq (ORCPT ); Tue, 31 Mar 2009 18:14:46 -0400 Received: from localhost (localhost [127.0.0.1]) by cinke.fazekas.hu (Postfix) with ESMTP id E69E033CC3; Wed, 1 Apr 2009 00:04:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at fazekas.hu Received: from cinke.fazekas.hu ([127.0.0.1]) by localhost (cinke.fazekas.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3vSF4m79pigM; Wed, 1 Apr 2009 00:04:36 +0200 (CEST) Received: from roadrunner.athome (cinke.fazekas.hu [195.199.244.225]) by cinke.fazekas.hu (Postfix) with ESMTP id 5F44933CC8; Wed, 1 Apr 2009 00:04:36 +0200 (CEST) MIME-Version: 1.0 Subject: [PATCH 3 of 3] cx88: avoid reprogramming every audio register on A2 stereo/mono change X-Mercurial-Node: 119acaa1dee387960325ba637c6257af2b0fd3af Message-Id: <119acaa1dee387960325.1238536913@roadrunner.athome> In-Reply-To: Date: Wed, 01 Apr 2009 00:01:53 +0200 From: Marton Balint To: linux-media@vger.kernel.org Cc: mchehab@infradead.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org # HG changeset patch # User Marton Balint # Date 1238535357 -7200 # Node ID 119acaa1dee387960325ba637c6257af2b0fd3af # Parent d2cbecf047e8f45f49f20bd19b95dfd86c134e33 cx88: avoid reprogramming every audio register on A2 stereo/mono change From: Marton Balint 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 Priority: normal Signed-off-by: Marton Balint --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r d2cbecf047e8 -r 119acaa1dee3 linux/drivers/media/video/cx88/cx88-tvaudio.c --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c Tue Mar 31 03:21:56 2009 +0200 +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c Tue Mar 31 23:35:57 2009 +0200 @@ -938,20 +938,18 @@ set_audio_standard_A2(core, EN_A2_FORCE_MONO1); } else { /* TODO: Add A2 autodection */ + mask = 0x3f; switch (mode) { case V4L2_TUNER_MODE_MONO: case V4L2_TUNER_MODE_LANG1: - set_audio_standard_A2(core, - EN_A2_FORCE_MONO1); + ctl = EN_A2_FORCE_MONO1; break; case V4L2_TUNER_MODE_LANG2: - set_audio_standard_A2(core, - EN_A2_FORCE_MONO2); + ctl = EN_A2_FORCE_MONO2; break; case V4L2_TUNER_MODE_STEREO: case V4L2_TUNER_MODE_LANG1_LANG2: - set_audio_standard_A2(core, - EN_A2_FORCE_STEREO); + ctl = EN_A2_FORCE_STEREO; break; } }