Skip to contentSkip to conversation

Mygica X8507 audio for YPbPr, AV and S-Video

PATCH In review Alfredo Jesús Delaiti 2 participants 5 messages Sep 3, 2012 – Sep 21, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Mygica X8507 audio for YPbPr, AV and S-Video

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.

media/video/cx23885/cx23885-cards.c +3 -0
index 080e111..17e2576 100644
@@ -541,11 +541,13 @@ struct cx23885_board cx23885_boards[] = {
                        {
                                .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,
@@ -553,6 +555,7 @@ struct cx23885_board cx23885_boards[] = {
                                        CX25840_VIN1_CH1 |
                                        CX25840_VIN6_CH2 |
                                        CX25840_VIN7_CH3,
+                               .amux   = CX25840_AUDIO7,
                        },
                },
        },
media/video/cx23885/cx23885-video.c +2 -1
index 22f8e7f..fcb3f22 100644
@@ -508,7 +508,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
                (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);
Signature · 2 lines
Dona tu voz
http://www.voxforge.org/es
#1 lore raw

Em 03-09-2012 17:14, Alfredo Jesús Delaiti escreveu:

media/video/cx23885/cx23885-cards.c

Quoted 17 lines

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.

media/video/cx23885/cx23885-cards.c +0 -0
index 080e111..17e2576 100644

Wrong format... the "drivers/" is missing.

Well, the location also changed to drivers/media/pci, but my scripts can fix it.

media/video/cx23885/cx23885-cards.c struct cx23885_board cx23885_boards[] = { · line 544

Quoted 5 lines
media/video/cx23885/cx23885-cards.c +1 -0
@@ -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:

drivers/media/pci/cx23885/cx23885-cards.c +1 -0
@@ -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

#2 lore raw
Quoted 74 lines · Mauro Carvalho Chehab

Em 03-09-2012 17:14, Alfredo Jesús Delaiti escreveu:

media/video/cx23885/cx23885-cards.c

Quoted 17 lines

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.

media/video/cx23885/cx23885-cards.c +0 -0
index 080e111..17e2576 100644

Wrong format... the "drivers/" is missing.

Well, the location also changed to drivers/media/pci, but my scripts can fix it.

media/video/cx23885/cx23885-cards.c struct cx23885_board cx23885_boards[] = { · line 544

Quoted 5 lines
media/video/cx23885/cx23885-cards.c +1 -0
@@ -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:

drivers/media/pci/cx23885/cx23885-cards.c +1 -0
@@ -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,
                         },
Quoted 2 lines

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

drivers/media/pci/cx23885/cx23885-cards.c +1 -0
index d889bd2..cb5f847 100644
@@ -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);

drivers/media/pci/cx23885/cx23885-video.c +2 -1
index 22f8e7f..fcb3f22 100644
@@ -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)
 {
Signature · 2 lines
Dona tu voz
http://www.voxforge.org/es
#3 lore raw

Em 19-09-2012 10:31, Alfredo Jesús Delaiti escreveu:

Quoted 105 lines · Mauro Carvalho Chehab
Quoted 74 lines

Em 03-09-2012 17:14, Alfredo Jesús Delaiti escreveu:

media/video/cx23885/cx23885-cards.c

Quoted 17 lines

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.

media/video/cx23885/cx23885-cards.c +0 -0
index 080e111..17e2576 100644

Wrong format... the "drivers/" is missing.

Well, the location also changed to drivers/media/pci, but my scripts can fix it.

media/video/cx23885/cx23885-cards.c struct cx23885_board cx23885_boards[] = { · line 544

Quoted 5 lines
media/video/cx23885/cx23885-cards.c +1 -0
@@ -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:

drivers/media/pci/cx23885/cx23885-cards.c +1 -0
@@ -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,
                         },
Quoted 2 lines

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

drivers/media/pci/cx23885/cx23885-cards.c +0 -0
index d889bd2..cb5f847 100644
@@ -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,

drivers/media/pci/cx23885/cx23885-cards.c struct cx23885_board cx23885_boards[] = { · line 550

Quoted 10 lines
drivers/media/pci/cx23885/cx23885-cards.c +1 -0
                        },
                        {
                                .type   = CX23885_VMUX_COMPOSITE1,
                                .vmux   = CX25840_COMPOSITE8,
+                               .amux   = CX25840_AUDIO7,
                        },
                        {
                                .type   = CX23885_VMUX_SVIDEO,
                                .vmux   = CX25840_SVIDEO_LUMA3 |
 CX25840_SVIDEO_CHROMA4,

It seems that your emailer is not your friend too - it broke your patch ;)

Please, be sure to not let your email break long lines like that, or the patch won't apply.

IMO, the better is to submit patches with git send-email. There are some examples at git-send-email manpage on how to use it with an smart host, if your sendmail is not configured for that.

Regards,
Mauro.

#4 lore raw

Hi

Quoted 14 lines · Mauro Carvalho Chehab

Em 19-09-2012 10:31, Alfredo Jesús Delaiti escreveu:

Quoted 13 lines · Mauro Carvalho Chehab
Quoted 12 lines

Em 03-09-2012 17:14, Alfredo Jesús Delaiti escreveu:

Quoted 11 lines

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.

....

Quoted 29 lines
Quoted 29 lines

I resubmit the patch with the advice given.
I apologize, but git and diff, still " aren't my friends"

Thanks

drivers/media/pci/cx23885/cx23885-cards.c +0 -0
index d889bd2..cb5f847 100644
@@ -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,
Quoted 8 lines

drivers/media/pci/cx23885/cx23885-cards.c struct cx23885_board cx23885_boards[] = { · line 550

Quoted 6 lines
drivers/media/pci/cx23885/cx23885-cards.c +1 -0
+                               .amux   = CX25840_AUDIO7,
                        },
                        {
                                .type   = CX23885_VMUX_SVIDEO,
                                .vmux   = CX25840_SVIDEO_LUMA3 |
 CX25840_SVIDEO_CHROMA4,

It seems that your emailer is not your friend too - it broke your patch ;)

Grrr. You are right, mail setup is wron
I applied this change:/usr/src/linux/Documentation/email-clients.txt., again I proved before send email and is ok.

Quoted 11 lines

Please, be sure to not let your email break long lines like that, or the patch won't apply.

IMO, the better is to submit patches with git send-email. There are some examples at git-send-email manpage on how to use it with an smart host, if your sendmail is not configured for that.

Regards,
Mauro.

drivers/media/pci/cx23885/cx23885-cards.c +3 -0
index d889bd2..cb5f847 100644
@@ -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);
 
drivers/media/pci/cx23885/cx23885-video.c +2 -1
index 22f8e7f..fcb3f22 100644
@@ -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)
 {
Signature · 2 lines
Dona tu voz
http://www.voxforge.org/es