From patchwork Wed Sep 19 13:31:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alfredo_Jes=C3=BAs_Delaiti?= X-Patchwork-Id: 14517 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TEKPE-0007QR-U1 for patchwork@linuxtv.org; Wed, 19 Sep 2012 15:33:32 +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-4) with esmtp for id 1TEKPD-000686-CX; Wed, 19 Sep 2012 15:33:32 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755545Ab2ISNd3 (ORCPT ); Wed, 19 Sep 2012 09:33:29 -0400 Received: from imr-da02.mx.aol.com ([205.188.105.144]:44107 "EHLO imr-da02.mx.aol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872Ab2ISNd2 (ORCPT ); Wed, 19 Sep 2012 09:33:28 -0400 Received: from mtaout-mb03.r1000.mx.aol.com (mtaout-mb03.r1000.mx.aol.com [172.29.41.67]) by imr-da02.mx.aol.com (8.14.1/8.14.1) with ESMTP id q8JDX9AQ031088; Wed, 19 Sep 2012 09:33:09 -0400 Received: from [192.168.1.35] (unknown [190.50.41.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mtaout-mb03.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 1523BE000107; Wed, 19 Sep 2012 09:33:07 -0400 (EDT) Message-ID: <5059C949.6010808@netscape.net> Date: Wed, 19 Sep 2012 10:31:53 -0300 From: =?ISO-8859-1?Q?Alfredo_Jes=FAs_Delaiti?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 MIME-Version: 1.0 To: linux-media@vger.kernel.org CC: Mauro Carvalho Chehab Subject: Re: [PATCH] Mygica X8507 audio for YPbPr, AV and S-Video References: <50450FB5.3090503@netscape.net> <50589E52.5050602@redhat.com> In-Reply-To: <50589E52.5050602@redhat.com> x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:487591296:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d29435059c9934641 X-AOL-IP: 190.50.41.151 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.9.19.132415 X-PMX-Spam: Gauge=X, Probability=10%, Report=' HASHBUSTER_BLOCK_V2 0.5, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, ECARD_WORD 0, FROM_NAME_PHRASE 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, WEBMAIL_X_AOL_IP 0, WEBMAIL_X_IP_HDR 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY 0, __FRAUD_MONEY_VALUE 0, __HASHBUSTER_BLOCK_V2_1 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __INT_PROD_TV 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NS , __USER_AGENT 0' El 18/09/12 13:16, Mauro Carvalho Chehab escribió: > Em 03-09-2012 17:14, Alfredo Jesús Delaiti escreveu: >> Hi >> >> This patch add audio support for input YPbPr, AV and S-Video for Mygica X8507 card. >> I tried it with the 3.4 and 3.5 kernel >> >> Remains to be done: IR, FM and ISDBT >> >> Sorry if I sent the patch improperly. >> >> Signed-off-by: Alfredo J. Delaiti >> >> >> >> diff --git a/media/video/cx23885/cx23885-cards.c b/media/video/cx23885/cx23885-cards.c >> index 080e111..17e2576 100644 >> --- a/media/video/cx23885/cx23885-cards.c >> +++ b/media/video/cx23885/cx23885-cards.c > Wrong format... the "drivers/" is missing. > > Well, the location also changed to drivers/media/pci, but my scripts can > fix it. > >> @@ -541,11 +541,13 @@ struct cx23885_board cx23885_boards[] = { >> { >> .type = CX23885_VMUX_COMPOSITE1, >> .vmux = CX25840_COMPOSITE8, >> + .amux = CX25840_AUDIO7, > Didn't apply well. It seems it conflicted with some other patch. > > Please, re-generate it against the very latest tree. > > Also, when doing diffs for the boards entries, it is wise to have > more context lines, in order that a patch made for one driver would > be badly applied at some other board entry. > > The easiest way to do that is to do: > > $ git diff -U10 > or > $ git show -U10 > (if you've merged the patch at your local copy) > > (if you're generating the patch against the main media-tree.git) > > Where "10" is just an arbitrary large number that will allow to > see the board name that will be modified, like: > > --- a/drivers/media/pci/cx23885/cx23885-cards.c > +++ b/drivers/media/pci/cx23885/cx23885-cards.c > @@ -531,20 +531,21 @@ struct cx23885_board cx23885_boards[] = { > .name = "Mygica X8507", > .tuner_type = TUNER_XC5000, > .tuner_addr = 0x61, > .tuner_bus = 1, > .porta = CX23885_ANALOG_VIDEO, > .input = { > { > .type = CX23885_VMUX_TELEVISION, > .vmux = CX25840_COMPOSITE2, > .amux = CX25840_AUDIO8, > + /* Some foo addition - just for testing */ > }, > { > .type = CX23885_VMUX_COMPOSITE1, > .vmux = CX25840_COMPOSITE8, > }, > { > .type = CX23885_VMUX_SVIDEO, > .vmux = CX25840_SVIDEO_LUMA3 | > CX25840_SVIDEO_CHROMA4, > }, > > > Thanks, > Mauro Hi Thanks for the advice. I resubmit the patch with the advice given. I apologize, but git and diff, still " aren't my friends" Thanks Signed-off-by: Alfredo J. Delaiti { diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c index d889bd2..cb5f847 100644 --- a/drivers/media/pci/cx23885/cx23885-cards.c +++ b/drivers/media/pci/cx23885/cx23885-cards.c @@ -530,42 +530,45 @@ struct cx23885_board cx23885_boards[] = { [CX23885_BOARD_MYGICA_X8507] = { .name = "Mygica X8507", .tuner_type = TUNER_XC5000, .tuner_addr = 0x61, .tuner_bus = 1, .porta = CX23885_ANALOG_VIDEO, .input = { { .type = CX23885_VMUX_TELEVISION, .vmux = CX25840_COMPOSITE2, .amux = CX25840_AUDIO8, }, { .type = CX23885_VMUX_COMPOSITE1, .vmux = CX25840_COMPOSITE8, + .amux = CX25840_AUDIO7, }, { .type = CX23885_VMUX_SVIDEO, .vmux = CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4, + .amux = CX25840_AUDIO7, }, { .type = CX23885_VMUX_COMPONENT, .vmux = CX25840_COMPONENT_ON | CX25840_VIN1_CH1 | CX25840_VIN6_CH2 | CX25840_VIN7_CH3, + .amux = CX25840_AUDIO7, }, }, }, [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL] = { .name = "TerraTec Cinergy T PCIe Dual", .portb = CX23885_MPEG_DVB, .portc = CX23885_MPEG_DVB, }, [CX23885_BOARD_TEVII_S471] = { .name = "TeVii S471", .portb = CX23885_MPEG_DVB, } }; const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 22f8e7f..fcb3f22 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -496,31 +496,32 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input) dev->board == CX23885_BOARD_MYGICA_X8507) { /* Select Analog TV */ if (INPUT(input)->type == CX23885_VMUX_TELEVISION) cx23885_gpio_clear(dev, GPIO_0); } /* Tell the internal A/V decoder */ v4l2_subdev_call(dev->sd_cx25840, video, s_routing, INPUT(input)->vmux, 0, 0); if ((dev->board == CX23885_BOARD_HAUPPAUGE_HVR1800) || (dev->board == CX23885_BOARD_MPX885) || (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1250) || (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255) || (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255_22111) || - (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1850)) { + (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1850) || + (dev->board == CX23885_BOARD_MYGICA_X8507)) { /* Configure audio routing */ v4l2_subdev_call(dev->sd_cx25840, audio, s_routing, INPUT(input)->amux, 0, 0); if (INPUT(input)->amux == CX25840_AUDIO7) cx23885_flatiron_mux(dev, 1); else if (INPUT(input)->amux == CX25840_AUDIO6) cx23885_flatiron_mux(dev, 2); } return 0; } static int cx23885_audio_mux(struct cx23885_dev *dev, unsigned int input)