From patchwork Sun Jul 1 20:15:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 13169 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1SlQYm-0002Lv-8U for patchwork@linuxtv.org; Sun, 01 Jul 2012 22:15:56 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1SlQYl-0007Jt-HV; Sun, 01 Jul 2012 22:15:56 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750858Ab2GAUPx (ORCPT ); Sun, 1 Jul 2012 16:15:53 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:54268 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777Ab2GAUPw (ORCPT ); Sun, 1 Jul 2012 16:15:52 -0400 Received: by qcro28 with SMTP id o28so2600569qcr.19 for ; Sun, 01 Jul 2012 13:15:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SkqFhAgY553ge3qCiZL3g9gos17y/Uhuj8gzqZ4tQbA=; b=gKwYb/BAFSBFQU1J+yM6nAciiIUmpkAw7XHbWgiEFH7eFljMLHuYJHdq8iBYG77eXp A3Hdyu6XJFcIfHc74t/R4jMQ23rKWq2RzbIByO2gQ8jYyPVvjbCAjA0icpt9PD58IeXP Wv9bqaKwEUibzt3UAsLGo5RraH2FitKb4QqZ2xHMTwl+U/7vAU3rxE2buv4C7M/VZIVA JhuvE8W3Yf78OhX5ZafLJTe5b3aMj7G/G1Lj3NRlfxNuLeYpoui4QwnIoqyJH0o+U1iF HrUBc+ulZkyzGNjydRpSwbhaQb34ScveY8liPVucpq+Vr8hnzK4GlyNBbHFFCT5Qdg7R svtw== Received: by 10.224.217.9 with SMTP id hk9mr2399651qab.58.1341173751403; Sun, 01 Jul 2012 13:15:51 -0700 (PDT) Received: from localhost.localdomain (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id cz12sm26276384qab.5.2012.07.01.13.15.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 13:15:50 -0700 (PDT) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller Subject: [PATCH 1/6] cx25840: fix regression in HVR-1800 analog support Date: Sun, 1 Jul 2012 16:15:09 -0400 Message-Id: <1341173714-23627-2-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1341173714-23627-1-git-send-email-dheitmueller@kernellabs.com> References: <1341173714-23627-1-git-send-email-dheitmueller@kernellabs.com> X-Gm-Message-State: ALoCoQmLjn6GO/UhWS+qZM0cUemn2M1dqAdz9jm6+CaDrY8ek6jCN4MJGRrMEzMfsNfuRYW1MZyI Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.7.1.200625 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __OEM_PHRASE 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' The refactoring of the cx25840 driver to support the cx23888 caused breakage with the existing support for cx23885/cx23887 analog support. Rework the routines such that the new code is only used for the 888. Validated with the following boards: HVR-1800 retail (0070:7801) HVR-1800 OEM (0070:7809) HVR_1850 retail (0070:8541) Thanks to Steven Toth and Hauppauge for loaning me various boards to regression test with. Reported-by: Jonathan Thanks-to: Steven Toth Signed-off-by: Devin Heitmueler --- drivers/media/video/cx25840/cx25840-core.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index fc1ff69..a82b704 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -84,7 +84,7 @@ MODULE_PARM_DESC(debug, "Debugging messages [0=Off (default) 1=On]"); /* ----------------------------------------------------------------------- */ -static void cx23885_std_setup(struct i2c_client *client); +static void cx23888_std_setup(struct i2c_client *client); int cx25840_write(struct i2c_client *client, u16 addr, u8 value) { @@ -638,10 +638,13 @@ static void cx23885_initialize(struct i2c_client *client) finish_wait(&state->fw_wait, &wait); destroy_workqueue(q); - /* Call the cx23885 specific std setup func, we no longer rely on + /* Call the cx23888 specific std setup func, we no longer rely on * the generic cx24840 func. */ - cx23885_std_setup(client); + if (is_cx23888(state)) + cx23888_std_setup(client); + else + cx25840_std_setup(client); /* (re)set input */ set_input(client, state->vid_input, state->aud_input); @@ -1298,8 +1301,8 @@ static int set_v4lstd(struct i2c_client *client) } cx25840_and_or(client, 0x400, ~0xf, fmt); cx25840_and_or(client, 0x403, ~0x3, pal_m); - if (is_cx2388x(state)) - cx23885_std_setup(client); + if (is_cx23888(state)) + cx23888_std_setup(client); else cx25840_std_setup(client); if (!is_cx2583x(state)) @@ -1782,8 +1785,8 @@ static int cx25840_s_video_routing(struct v4l2_subdev *sd, struct cx25840_state *state = to_state(sd); struct i2c_client *client = v4l2_get_subdevdata(sd); - if (is_cx2388x(state)) - cx23885_std_setup(client); + if (is_cx23888(state)) + cx23888_std_setup(client); return set_input(client, input, state->aud_input); } @@ -1794,8 +1797,8 @@ static int cx25840_s_audio_routing(struct v4l2_subdev *sd, struct cx25840_state *state = to_state(sd); struct i2c_client *client = v4l2_get_subdevdata(sd); - if (is_cx2388x(state)) - cx23885_std_setup(client); + if (is_cx23888(state)) + cx23888_std_setup(client); return set_input(client, state->vid_input, input); } @@ -4939,7 +4942,7 @@ void cx23885_dif_setup(struct i2c_client *client, u32 ifHz) } } -static void cx23885_std_setup(struct i2c_client *client) +static void cx23888_std_setup(struct i2c_client *client) { struct cx25840_state *state = to_state(i2c_get_clientdata(client)); v4l2_std_id std = state->std;