From patchwork Thu Aug 4 07:14:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1034182 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p747F2mt032294 for ; Thu, 4 Aug 2011 07:15:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752308Ab1HDHPA (ORCPT ); Thu, 4 Aug 2011 03:15:00 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:50333 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102Ab1HDHOb (ORCPT ); Thu, 4 Aug 2011 03:14:31 -0400 Received: from localhost (p548E06E4.dip0.t-ipconnect.de [84.142.6.228]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MCucZ-1Qfpav3gR9-009Ycl; Thu, 04 Aug 2011 09:14:31 +0200 From: Thierry Reding To: linux-media@vger.kernel.org Subject: [PATCH 21/21] [staging] tm6000: Remove unnecessary workaround. Date: Thu, 4 Aug 2011 09:14:19 +0200 Message-Id: <1312442059-23935-22-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> References: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:9GhgVtE3geOAYXryGFHnLovB7768nCxghWsnpSKrZY6 PsEePuCU6p3JMm3cgILZ7pz7LIL1cxgh4REc12MBHcb4yZdA2C jc/zuceblTxzEdNI1u1gi4ChAEa/mjyJ2VCgruQurZJaaPgz0g 2FeOzMoa30avl2F5cloARW4xNaK4j0SXtn4J9q9VQa9wnPRKuq PX1nBgEir4yxCHe0pkXLinplWaE9e9fYsImz20cdMg= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 04 Aug 2011 07:15:02 +0000 (UTC) Implicitly setting the tuner frequency each time the device is opened seems no longer necessary, so it is removed. This speeds up opening the device by about 120 ms. It also avoids excessive firmware reloads because the default will load the BASE and F8MHZ type firmwares independent of which device, video or radio, is opened. Before this patch opening the radio device would automatically trigger a BASE and F8MHZ firmware load only to immediately replace them by the FM firmware. --- drivers/staging/tm6000/tm6000-core.c | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 58c1399..7bb1d37 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -264,8 +264,6 @@ static void tm6000_set_vbi(struct tm6000_core *dev) int tm6000_init_analog_mode(struct tm6000_core *dev) { - struct v4l2_frequency f; - if (dev->dev_type == TM6010) { u8 active = TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE; @@ -304,24 +302,7 @@ int tm6000_init_analog_mode(struct tm6000_core *dev) /* Disables soft reset */ tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x00); } - msleep(20); - - /* Tuner firmware can now be loaded */ - - /* - * FIXME: This is a hack! xc3028 "sleeps" when no channel is detected - * for more than a few seconds. Not sure why, as this behavior does - * not happen on other devices with xc3028. So, I suspect that it - * is yet another bug at tm6000. After start sleeping, decoding - * doesn't start automatically. Instead, it requires some - * I2C commands to wake it up. As we want to have image at the - * beginning, we needed to add this hack. The better would be to - * discover some way to make tm6000 to wake up without this hack. - */ - f.frequency = dev->freq; - v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f); - msleep(100); tm6000_set_standard(dev); tm6000_set_vbi(dev); tm6000_set_audio_bitrate(dev, 48000);