Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: v4l2-mc: get rid of global pad indexes

Now that all drivers are using pad signal types, we can get
rid of the global static definition, as routes are stablished
using the pad signal type.

The tuner and IF-PLL pads are now used only by the tuner core,
so move the definitions to be there.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

+48 -77
+48 -1
drivers/media/v4l2-core/tuner-core.c
··· 94 94 } while (0) 95 95 96 96 /* 97 - * Internal struct used inside the driver 97 + * Internal enums/struct used inside the driver 98 98 */ 99 + 100 + /** 101 + * enum tuner_pad_index - tuner pad index for MEDIA_ENT_F_TUNER 102 + * 103 + * @TUNER_PAD_RF_INPUT: 104 + * Radiofrequency (RF) sink pad, usually linked to a RF connector entity. 105 + * @TUNER_PAD_OUTPUT: 106 + * tuner video output source pad. Contains the video chrominance 107 + * and luminance or the hole bandwidth of the signal converted to 108 + * an Intermediate Frequency (IF) or to baseband (on zero-IF tuners). 109 + * @TUNER_PAD_AUD_OUT: 110 + * Tuner audio output source pad. Tuners used to decode analog TV 111 + * signals have an extra pad for audio output. Old tuners use an 112 + * analog stage with a saw filter for the audio IF frequency. The 113 + * output of the pad is, in this case, the audio IF, with should be 114 + * decoded either by the bridge chipset (that's the case of cx2388x 115 + * chipsets) or may require an external IF sound processor, like 116 + * msp34xx. On modern silicon tuners, the audio IF decoder is usually 117 + * incorporated at the tuner. On such case, the output of this pad 118 + * is an audio sampled data. 119 + * @TUNER_NUM_PADS: 120 + * Number of pads of the tuner. 121 + */ 122 + enum tuner_pad_index { 123 + TUNER_PAD_RF_INPUT, 124 + TUNER_PAD_OUTPUT, 125 + TUNER_PAD_AUD_OUT, 126 + TUNER_NUM_PADS 127 + }; 128 + 129 + /** 130 + * enum if_vid_dec_pad_index - video IF-PLL pad index 131 + * for MEDIA_ENT_F_IF_VID_DECODER 132 + * 133 + * @IF_VID_DEC_PAD_IF_INPUT: 134 + * video Intermediate Frequency (IF) sink pad 135 + * @IF_VID_DEC_PAD_OUT: 136 + * IF-PLL video output source pad. Contains the video chrominance 137 + * and luminance IF signals. 138 + * @IF_VID_DEC_PAD_NUM_PADS: 139 + * Number of pads of the video IF-PLL. 140 + */ 141 + enum if_vid_dec_pad_index { 142 + IF_VID_DEC_PAD_IF_INPUT, 143 + IF_VID_DEC_PAD_OUT, 144 + IF_VID_DEC_PAD_NUM_PADS 145 + }; 99 146 100 147 struct tuner { 101 148 /* device */
-76
include/media/v4l2-mc.h
··· 23 23 #include <media/v4l2-dev.h> 24 24 #include <linux/types.h> 25 25 26 - /** 27 - * enum tuner_pad_index - tuner pad index for MEDIA_ENT_F_TUNER 28 - * 29 - * @TUNER_PAD_RF_INPUT: Radiofrequency (RF) sink pad, usually linked to a 30 - * RF connector entity. 31 - * @TUNER_PAD_OUTPUT: Tuner video output source pad. Contains the video 32 - * chrominance and luminance or the hole bandwidth 33 - * of the signal converted to an Intermediate Frequency 34 - * (IF) or to baseband (on zero-IF tuners). 35 - * @TUNER_PAD_AUD_OUT: Tuner audio output source pad. Tuners used to decode 36 - * analog TV signals have an extra pad for audio output. 37 - * Old tuners use an analog stage with a saw filter for 38 - * the audio IF frequency. The output of the pad is, in 39 - * this case, the audio IF, with should be decoded either 40 - * by the bridge chipset (that's the case of cx2388x 41 - * chipsets) or may require an external IF sound 42 - * processor, like msp34xx. On modern silicon tuners, 43 - * the audio IF decoder is usually incorporated at the 44 - * tuner. On such case, the output of this pad is an 45 - * audio sampled data. 46 - * @TUNER_NUM_PADS: Number of pads of the tuner. 47 - */ 48 - enum tuner_pad_index { 49 - TUNER_PAD_RF_INPUT, 50 - TUNER_PAD_OUTPUT, 51 - TUNER_PAD_AUD_OUT, 52 - TUNER_NUM_PADS 53 - }; 54 - 55 - /** 56 - * enum if_vid_dec_pad_index - video IF-PLL pad index for 57 - * MEDIA_ENT_F_IF_VID_DECODER 58 - * 59 - * @IF_VID_DEC_PAD_IF_INPUT: video Intermediate Frequency (IF) sink pad 60 - * @IF_VID_DEC_PAD_OUT: IF-PLL video output source pad. Contains the 61 - * video chrominance and luminance IF signals. 62 - * @IF_VID_DEC_PAD_NUM_PADS: Number of pads of the video IF-PLL. 63 - */ 64 - enum if_vid_dec_pad_index { 65 - IF_VID_DEC_PAD_IF_INPUT, 66 - IF_VID_DEC_PAD_OUT, 67 - IF_VID_DEC_PAD_NUM_PADS 68 - }; 69 - 70 - /** 71 - * enum if_aud_dec_pad_index - audio/sound IF-PLL pad index for 72 - * MEDIA_ENT_F_IF_AUD_DECODER 73 - * 74 - * @IF_AUD_DEC_PAD_IF_INPUT: audio Intermediate Frequency (IF) sink pad 75 - * @IF_AUD_DEC_PAD_OUT: IF-PLL audio output source pad. Contains the 76 - * audio sampled stream data, usually connected 77 - * to the bridge bus via an Inter-IC Sound (I2S) 78 - * bus. 79 - * @IF_AUD_DEC_PAD_NUM_PADS: Number of pads of the audio IF-PLL. 80 - */ 81 - enum if_aud_dec_pad_index { 82 - IF_AUD_DEC_PAD_IF_INPUT, 83 - IF_AUD_DEC_PAD_OUT, 84 - IF_AUD_DEC_PAD_NUM_PADS 85 - }; 86 - 87 - /** 88 - * enum demod_pad_index - analog TV pad index for MEDIA_ENT_F_ATV_DECODER 89 - * 90 - * @DEMOD_PAD_IF_INPUT: IF input sink pad. 91 - * @DEMOD_PAD_VID_OUT: Video output source pad. 92 - * @DEMOD_PAD_AUDIO_OUT: Audio output source pad. 93 - * @DEMOD_NUM_PADS: Maximum number of output pads. 94 - */ 95 - enum demod_pad_index { 96 - DEMOD_PAD_IF_INPUT, 97 - DEMOD_PAD_VID_OUT, 98 - DEMOD_PAD_AUDIO_OUT, 99 - DEMOD_NUM_PADS 100 - }; 101 - 102 26 /* We don't need to include pci.h or usb.h here */ 103 27 struct pci_dev; 104 28 struct usb_device;