From patchwork Thu Jan 22 04:45:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 3527 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 n0M4eovD015800 for ; Wed, 21 Jan 2009 20:40:51 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755639AbZAVEpL (ORCPT ); Wed, 21 Jan 2009 23:45:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755968AbZAVEpL (ORCPT ); Wed, 21 Jan 2009 23:45:11 -0500 Received: from mail-qy0-f11.google.com ([209.85.221.11]:48325 "EHLO mail-qy0-f11.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755639AbZAVEpK (ORCPT ); Wed, 21 Jan 2009 23:45:10 -0500 Received: by qyk4 with SMTP id 4so4409639qyk.13 for ; Wed, 21 Jan 2009 20:45:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=9JXtjdCDN1RQf8ZywlNGttxaouniF/yLZiJZb88BSGk=; b=arhqC8caiuIMZc2qegCuFNcWRw4RM69gfs71vJcPdZg5/Z05vK7O8hXha9vB6TD9k9 k3uS3Vp2otCk7Ffjy3mOa+biTRicdUt0OREvOo6oUnBZPIDAdAsBjEtk29OdLjq8Laqa og69aqplbkAlre6XfAiS4gfgPHDiTPo66+Bbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=WZdzWhG3M2fLNXbhDL/MWMBadnKaFy9uX+S4f8Tz3GVo0/D613R/+dgfNKkabPzZTp 8PbnPDYWS2p5xZe++XqEoMfQQoHeAYL6qspeuE0+uOoOENWiir1W46bKRsYonDphqEpa +cIJ8gq/2b5/VyBtJ1mp0AAhEwndJu2hi13v0= MIME-Version: 1.0 Received: by 10.214.243.18 with SMTP id q18mr5901558qah.362.1232599502791; Wed, 21 Jan 2009 20:45:02 -0800 (PST) Date: Wed, 21 Jan 2009 23:45:02 -0500 Message-ID: <412bdbff0901212045t1287a403h57ba05cbd71d5224@mail.gmail.com> Subject: [RFC] Need testers for s5h1409 tuning fix From: Devin Heitmueller To: "linux-media@vger.kernel.org" Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The attached patch significantly improves tuning lock times for all three s5h1409 based devices I have tested with so far. However, because of the large number of devices affected, I would like to solicit people with products that use the s5h1409 to test the patch and report back any problems before it gets committed. To test the patch, check out the latest v4l-dvb and apply the patch: hg clone http://linuxtv.org/hg/v4l-dvb cd v4l-dvb patch -p1 < s5h1409_tuning_speedup.patch make make install make unload reboot Based on the data collected thus far, this patch should address some long-standing issues with long times to reach tuning lock and intermittent lock failures. Comments welcome. Thanks, Devin s5h1409: Perform s5h1409 soft reset after tuning From: Devin Heitmueller Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it to know that the tuner has been told to change frequencies. This change changes the behavior from "random tuning times between 500ms to complete tuning lock failures" to "tuning lock consistently within 700ms". Thanks to Robert Krakora for doing initial testing of the patch on the KWorld 330U. Signed-off-by: Devin Heitmueller diff -r 4a06b5c3344f linux/drivers/media/dvb/frontends/s5h1409.c --- a/linux/drivers/media/dvb/frontends/s5h1409.c Mon Dec 29 22:17:09 2008 -0500 +++ b/linux/drivers/media/dvb/frontends/s5h1409.c Mon Jan 19 19:50:29 2009 -0500 @@ -545,9 +545,6 @@ s5h1409_enable_modulation(fe, p->u.vsb.modulation); - /* Allow the demod to settle */ - msleep(100); - if (fe->ops.tuner_ops.set_params) { if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); @@ -561,6 +558,10 @@ s5h1409_set_qam_amhum_mode(fe); s5h1409_set_qam_interleave_mode(fe); } + + /* Issue a reset to the demod so it knows to resync against the + newly tuned frequency */ + s5h1409_softreset(fe); return 0; }