From patchwork Sun Mar 29 19:36:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 15039 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 n2TJaCOn017026 for ; Sun, 29 Mar 2009 19:36:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751020AbZC2TgM (ORCPT ); Sun, 29 Mar 2009 15:36:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752739AbZC2TgM (ORCPT ); Sun, 29 Mar 2009 15:36:12 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:57892 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbZC2TgK (ORCPT ); Sun, 29 Mar 2009 15:36:10 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 0561C1C00E12; Sun, 29 Mar 2009 21:36:05 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 8621D901BD; Sun, 29 Mar 2009 21:36:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id B5zAPumNQlwW; Sun, 29 Mar 2009 21:36:04 +0200 (CEST) Received: from gauss.x.fun (ppp-88-217-106-141.dynamic.mnet-online.de [88.217.106.141]) by mail.nefkom.net (Postfix) with ESMTP; Sun, 29 Mar 2009 21:36:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gauss.x.fun (Postfix) with ESMTP id 6ADDC67E7; Sun, 29 Mar 2009 21:36:04 +0200 (CEST) From: Matthias Schwarzott To: linux-media@vger.kernel.org Subject: [PATCH] saa7134: Add analog RF tuner support for Avermedia A700 DVB-S Hybrid+FM card Date: Sun, 29 Mar 2009 20:36:02 +0100 User-Agent: KMail/1.9.10 Cc: Mauro Carvalho Chehab , panagonov MIME-Version: 1.0 Message-Id: <200903292136.03369.zzam@gentoo.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi list! The attached patch enables the XC2028 analog tuner used on the Avermedia A700 DVB-S Hybrid+FM card. Regards Matthias saa7134: add analog RF tuner support for Avermedia A700 DVB-S Hybrid+FM card Thanks to panagonov for requesting support and testing patches. Signed-off-by: Matthias Schwarzott Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c =================================================================== --- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-cards.c +++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -4546,12 +4546,17 @@ struct saa7134_board saa7134_boards[] = /* Matthias Schwarzott */ .name = "Avermedia DVB-S Hybrid+FM A700", .audio_clock = 0x00187de7, - .tuner_type = TUNER_ABSENT, /* TUNER_XC2028 */ + .tuner_type = TUNER_XC2028, .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, .mpeg = SAA7134_MPEG_DVB, .inputs = { { + .name = name_tv, + .vmux = 4, + .amux = TV, + .tv = 1, + }, { .name = name_comp, .vmux = 1, .amux = LINE1, @@ -4560,6 +4565,10 @@ struct saa7134_board saa7134_boards[] = .vmux = 6, .amux = LINE1, } }, + .radio = { + .name = name_radio, + .amux = TV, + }, }, [SAA7134_BOARD_BEHOLD_H6] = { /* Igor Kuznetsov */ @@ -5989,6 +5998,11 @@ static int saa7134_xc2028_callback(struc msleep(10); saa7134_set_gpio(dev, 21, 1); break; + case SAA7134_BOARD_AVERMEDIA_A700_HYBRID: + saa7134_set_gpio(dev, 18, 0); + msleep(10); + saa7134_set_gpio(dev, 18, 1); + break; } return 0; } @@ -6361,10 +6375,6 @@ int saa7134_board_init1(struct saa7134_d saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd); break; case SAA7134_BOARD_AVERMEDIA_A700_HYBRID: - printk("%s: %s: hybrid analog/dvb card\n" - "%s: Sorry, of the analog inputs, only analog s-video and composite " - "are supported for now.\n", - dev->name, card(dev).name, dev->name); case SAA7134_BOARD_AVERMEDIA_A700_PRO: /* write windows gpio values */ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100); @@ -6428,6 +6438,7 @@ static void saa7134_tuner_setup(struct s case SAA7134_BOARD_AVERMEDIA_A16D: case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_M103: + case SAA7134_BOARD_AVERMEDIA_A700_HYBRID: ctl.demod = XC3028_FE_ZARLINK456; break; default: