diff options
Diffstat (limited to 'drivers/media/video/saa7164')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-api.c | 122 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-buffer.c | 4 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-bus.c | 22 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-cmd.c | 14 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-core.c | 36 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-encoder.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-types.h | 176 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164.h | 32 |
9 files changed, 196 insertions, 214 deletions
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 045d9094d9ad..d1cd0f1741a3 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "saa7164.h" | 25 | #include "saa7164.h" |
26 | 26 | ||
27 | int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i) | 27 | int saa7164_api_get_load_info(struct saa7164_dev *dev, struct tmFwInfoStruct *i) |
28 | { | 28 | { |
29 | int ret; | 29 | int ret; |
30 | 30 | ||
@@ -39,7 +39,7 @@ int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i) | |||
39 | i->status = 0; | 39 | i->status = 0; |
40 | 40 | ||
41 | ret = saa7164_cmd_send(dev, 0, GET_CUR, | 41 | ret = saa7164_cmd_send(dev, 0, GET_CUR, |
42 | GET_FW_STATUS_CONTROL, sizeof(tmFwInfoStruct_t), i); | 42 | GET_FW_STATUS_CONTROL, sizeof(struct tmFwInfoStruct), i); |
43 | if (ret != SAA_OK) { | 43 | if (ret != SAA_OK) { |
44 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 44 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
45 | } | 45 | } |
@@ -51,7 +51,7 @@ int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i) | |||
51 | 51 | ||
52 | int saa7164_api_collect_debug(struct saa7164_dev *dev) | 52 | int saa7164_api_collect_debug(struct saa7164_dev *dev) |
53 | { | 53 | { |
54 | tmComResDebugGetData_t d; | 54 | struct tmComResDebugGetData d; |
55 | u8 more = 255; | 55 | u8 more = 255; |
56 | int ret; | 56 | int ret; |
57 | 57 | ||
@@ -78,7 +78,7 @@ int saa7164_api_collect_debug(struct saa7164_dev *dev) | |||
78 | 78 | ||
79 | int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level) | 79 | int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level) |
80 | { | 80 | { |
81 | tmComResDebugSetLevel_t lvl; | 81 | struct tmComResDebugSetLevel lvl; |
82 | int ret; | 82 | int ret; |
83 | 83 | ||
84 | dprintk(DBGLVL_API, "%s(level=%d)\n", __func__, level); | 84 | dprintk(DBGLVL_API, "%s(level=%d)\n", __func__, level); |
@@ -106,7 +106,7 @@ int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level) | |||
106 | int saa7164_api_set_vbi_format(struct saa7164_port *port) | 106 | int saa7164_api_set_vbi_format(struct saa7164_port *port) |
107 | { | 107 | { |
108 | struct saa7164_dev *dev = port->dev; | 108 | struct saa7164_dev *dev = port->dev; |
109 | tmComResProbeCommit_t fmt, rsp; | 109 | struct tmComResProbeCommit fmt, rsp; |
110 | int ret; | 110 | int ret; |
111 | 111 | ||
112 | dprintk(DBGLVL_API, "%s(nr=%d, unitid=0x%x)\n", __func__, | 112 | dprintk(DBGLVL_API, "%s(nr=%d, unitid=0x%x)\n", __func__, |
@@ -167,7 +167,7 @@ int saa7164_api_set_vbi_format(struct saa7164_port *port) | |||
167 | int saa7164_api_set_gop_size(struct saa7164_port *port) | 167 | int saa7164_api_set_gop_size(struct saa7164_port *port) |
168 | { | 168 | { |
169 | struct saa7164_dev *dev = port->dev; | 169 | struct saa7164_dev *dev = port->dev; |
170 | tmComResEncVideoGopStructure_t gs; | 170 | struct tmComResEncVideoGopStructure gs; |
171 | int ret; | 171 | int ret; |
172 | 172 | ||
173 | dprintk(DBGLVL_ENC, "%s()\n", __func__); | 173 | dprintk(DBGLVL_ENC, "%s()\n", __func__); |
@@ -186,8 +186,8 @@ int saa7164_api_set_gop_size(struct saa7164_port *port) | |||
186 | int saa7164_api_set_encoder(struct saa7164_port *port) | 186 | int saa7164_api_set_encoder(struct saa7164_port *port) |
187 | { | 187 | { |
188 | struct saa7164_dev *dev = port->dev; | 188 | struct saa7164_dev *dev = port->dev; |
189 | tmComResEncVideoBitRate_t vb; | 189 | struct tmComResEncVideoBitRate vb; |
190 | tmComResEncAudioBitRate_t ab; | 190 | struct tmComResEncAudioBitRate ab; |
191 | int ret; | 191 | int ret; |
192 | 192 | ||
193 | dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, | 193 | dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, |
@@ -217,7 +217,7 @@ int saa7164_api_set_encoder(struct saa7164_port *port) | |||
217 | vb.dwVideoBitRate = port->encoder_params.bitrate; | 217 | vb.dwVideoBitRate = port->encoder_params.bitrate; |
218 | vb.dwVideoBitRatePeak = port->encoder_params.bitrate_peak; | 218 | vb.dwVideoBitRatePeak = port->encoder_params.bitrate_peak; |
219 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, | 219 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, |
220 | EU_VIDEO_BIT_RATE_CONTROL, sizeof(tmComResEncVideoBitRate_t), &vb); | 220 | EU_VIDEO_BIT_RATE_CONTROL, sizeof(struct tmComResEncVideoBitRate), &vb); |
221 | if (ret != SAA_OK) | 221 | if (ret != SAA_OK) |
222 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 222 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
223 | 223 | ||
@@ -226,7 +226,7 @@ int saa7164_api_set_encoder(struct saa7164_port *port) | |||
226 | ab.dwAudioBitRate = 384000; | 226 | ab.dwAudioBitRate = 384000; |
227 | ab.dwAudioBitRatePeak = ab.dwAudioBitRate; | 227 | ab.dwAudioBitRatePeak = ab.dwAudioBitRate; |
228 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, | 228 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, |
229 | EU_AUDIO_BIT_RATE_CONTROL, sizeof(tmComResEncAudioBitRate_t), &ab); | 229 | EU_AUDIO_BIT_RATE_CONTROL, sizeof(struct tmComResEncAudioBitRate), &ab); |
230 | if (ret != SAA_OK) | 230 | if (ret != SAA_OK) |
231 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 231 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
232 | 232 | ||
@@ -239,9 +239,9 @@ int saa7164_api_set_encoder(struct saa7164_port *port) | |||
239 | int saa7164_api_get_encoder(struct saa7164_port *port) | 239 | int saa7164_api_get_encoder(struct saa7164_port *port) |
240 | { | 240 | { |
241 | struct saa7164_dev *dev = port->dev; | 241 | struct saa7164_dev *dev = port->dev; |
242 | tmComResEncVideoBitRate_t v; | 242 | struct tmComResEncVideoBitRate v; |
243 | tmComResEncAudioBitRate_t a; | 243 | struct tmComResEncAudioBitRate a; |
244 | tmComResEncVideoInputAspectRatio_t ar; | 244 | struct tmComResEncVideoInputAspectRatio ar; |
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, port->hwcfg.sourceid); | 247 | dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, port->hwcfg.sourceid); |
@@ -286,7 +286,7 @@ int saa7164_api_get_encoder(struct saa7164_port *port) | |||
286 | ar.height = 0; | 286 | ar.height = 0; |
287 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, GET_CUR, | 287 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, GET_CUR, |
288 | EU_VIDEO_INPUT_ASPECT_CONTROL, | 288 | EU_VIDEO_INPUT_ASPECT_CONTROL, |
289 | sizeof(tmComResEncVideoInputAspectRatio_t), &ar); | 289 | sizeof(struct tmComResEncVideoInputAspectRatio), &ar); |
290 | if (ret != SAA_OK) | 290 | if (ret != SAA_OK) |
291 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 291 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
292 | 292 | ||
@@ -308,7 +308,7 @@ int saa7164_api_get_encoder(struct saa7164_port *port) | |||
308 | int saa7164_api_set_aspect_ratio(struct saa7164_port *port) | 308 | int saa7164_api_set_aspect_ratio(struct saa7164_port *port) |
309 | { | 309 | { |
310 | struct saa7164_dev *dev = port->dev; | 310 | struct saa7164_dev *dev = port->dev; |
311 | tmComResEncVideoInputAspectRatio_t ar; | 311 | struct tmComResEncVideoInputAspectRatio ar; |
312 | int ret; | 312 | int ret; |
313 | 313 | ||
314 | dprintk(DBGLVL_ENC, "%s(%d)\n", __func__, | 314 | dprintk(DBGLVL_ENC, "%s(%d)\n", __func__, |
@@ -342,7 +342,7 @@ int saa7164_api_set_aspect_ratio(struct saa7164_port *port) | |||
342 | /* Aspect Ratio */ | 342 | /* Aspect Ratio */ |
343 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, | 343 | ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, |
344 | EU_VIDEO_INPUT_ASPECT_CONTROL, | 344 | EU_VIDEO_INPUT_ASPECT_CONTROL, |
345 | sizeof(tmComResEncVideoInputAspectRatio_t), &ar); | 345 | sizeof(struct tmComResEncVideoInputAspectRatio), &ar); |
346 | if (ret != SAA_OK) | 346 | if (ret != SAA_OK) |
347 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 347 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
348 | 348 | ||
@@ -525,8 +525,8 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level) | |||
525 | int saa7164_api_set_audio_std(struct saa7164_port *port) | 525 | int saa7164_api_set_audio_std(struct saa7164_port *port) |
526 | { | 526 | { |
527 | struct saa7164_dev *dev = port->dev; | 527 | struct saa7164_dev *dev = port->dev; |
528 | tmComResAudioDefaults_t lvl; | 528 | struct tmComResAudioDefaults lvl; |
529 | tmComResTunerStandard_t tvaudio; | 529 | struct tmComResTunerStandard tvaudio; |
530 | int ret; | 530 | int ret; |
531 | 531 | ||
532 | dprintk(DBGLVL_API, "%s()\n", __func__); | 532 | dprintk(DBGLVL_API, "%s()\n", __func__); |
@@ -539,7 +539,7 @@ int saa7164_api_set_audio_std(struct saa7164_port *port) | |||
539 | lvl.ucSAP_Level = TMHW_LEV_ADJ_SAPLEV_DEFAULT; | 539 | lvl.ucSAP_Level = TMHW_LEV_ADJ_SAPLEV_DEFAULT; |
540 | lvl.ucADC_Level = TMHW_LEV_ADJ_ADCLEV_DEFAULT; | 540 | lvl.ucADC_Level = TMHW_LEV_ADJ_ADCLEV_DEFAULT; |
541 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, | 541 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, |
542 | AUDIO_DEFAULT_CONTROL, sizeof(tmComResAudioDefaults_t), &lvl); | 542 | AUDIO_DEFAULT_CONTROL, sizeof(struct tmComResAudioDefaults), &lvl); |
543 | if (ret != SAA_OK) | 543 | if (ret != SAA_OK) |
544 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 544 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
545 | 545 | ||
@@ -562,7 +562,7 @@ int saa7164_api_set_audio_std(struct saa7164_port *port) | |||
562 | int saa7164_api_set_audio_detection(struct saa7164_port *port, int autodetect) | 562 | int saa7164_api_set_audio_detection(struct saa7164_port *port, int autodetect) |
563 | { | 563 | { |
564 | struct saa7164_dev *dev = port->dev; | 564 | struct saa7164_dev *dev = port->dev; |
565 | tmComResTunerStandardAuto_t p; | 565 | struct tmComResTunerStandardAuto p; |
566 | int ret; | 566 | int ret; |
567 | 567 | ||
568 | dprintk(DBGLVL_API, "%s(%d)\n", __func__, autodetect); | 568 | dprintk(DBGLVL_API, "%s(%d)\n", __func__, autodetect); |
@@ -800,7 +800,7 @@ int saa7164_api_read_eeprom(struct saa7164_dev *dev, u8 *buf, int buflen) | |||
800 | int saa7164_api_configure_port_vbi(struct saa7164_dev *dev, | 800 | int saa7164_api_configure_port_vbi(struct saa7164_dev *dev, |
801 | struct saa7164_port *port) | 801 | struct saa7164_port *port) |
802 | { | 802 | { |
803 | tmComResVBIFormatDescrHeader_t *fmt = &port->vbi_fmt_ntsc; | 803 | struct tmComResVBIFormatDescrHeader *fmt = &port->vbi_fmt_ntsc; |
804 | 804 | ||
805 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", fmt->bFormatIndex); | 805 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", fmt->bFormatIndex); |
806 | dprintk(DBGLVL_API, " VideoStandard = 0x%x\n", fmt->VideoStandard); | 806 | dprintk(DBGLVL_API, " VideoStandard = 0x%x\n", fmt->VideoStandard); |
@@ -835,7 +835,7 @@ int saa7164_api_configure_port_vbi(struct saa7164_dev *dev, | |||
835 | 835 | ||
836 | int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev, | 836 | int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev, |
837 | struct saa7164_port *port, | 837 | struct saa7164_port *port, |
838 | tmComResTSFormatDescrHeader_t *tsfmt) | 838 | struct tmComResTSFormatDescrHeader *tsfmt) |
839 | { | 839 | { |
840 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", tsfmt->bFormatIndex); | 840 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", tsfmt->bFormatIndex); |
841 | dprintk(DBGLVL_API, " bDataOffset = 0x%x\n", tsfmt->bDataOffset); | 841 | dprintk(DBGLVL_API, " bDataOffset = 0x%x\n", tsfmt->bDataOffset); |
@@ -869,7 +869,7 @@ int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev, | |||
869 | 869 | ||
870 | int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev, | 870 | int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev, |
871 | struct saa7164_port *port, | 871 | struct saa7164_port *port, |
872 | tmComResPSFormatDescrHeader_t *fmt) | 872 | struct tmComResPSFormatDescrHeader *fmt) |
873 | { | 873 | { |
874 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", fmt->bFormatIndex); | 874 | dprintk(DBGLVL_API, " bFormatIndex = 0x%x\n", fmt->bFormatIndex); |
875 | dprintk(DBGLVL_API, " wPacketLength= 0x%x\n", fmt->wPacketLength); | 875 | dprintk(DBGLVL_API, " wPacketLength= 0x%x\n", fmt->wPacketLength); |
@@ -907,28 +907,28 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
907 | struct saa7164_port *vbiport = 0; | 907 | struct saa7164_port *vbiport = 0; |
908 | u32 idx, next_offset; | 908 | u32 idx, next_offset; |
909 | int i; | 909 | int i; |
910 | tmComResDescrHeader_t *hdr, *t; | 910 | struct tmComResDescrHeader *hdr, *t; |
911 | tmComResExtDevDescrHeader_t *exthdr; | 911 | struct tmComResExtDevDescrHeader *exthdr; |
912 | tmComResPathDescrHeader_t *pathhdr; | 912 | struct tmComResPathDescrHeader *pathhdr; |
913 | tmComResAntTermDescrHeader_t *anttermhdr; | 913 | struct tmComResAntTermDescrHeader *anttermhdr; |
914 | tmComResTunerDescrHeader_t *tunerunithdr; | 914 | struct tmComResTunerDescrHeader *tunerunithdr; |
915 | tmComResDMATermDescrHeader_t *vcoutputtermhdr; | 915 | struct tmComResDMATermDescrHeader *vcoutputtermhdr; |
916 | tmComResTSFormatDescrHeader_t *tsfmt; | 916 | struct tmComResTSFormatDescrHeader *tsfmt; |
917 | tmComResPSFormatDescrHeader_t *psfmt; | 917 | struct tmComResPSFormatDescrHeader *psfmt; |
918 | tmComResSelDescrHeader_t *psel; | 918 | struct tmComResSelDescrHeader *psel; |
919 | tmComResProcDescrHeader_t *pdh; | 919 | struct tmComResProcDescrHeader *pdh; |
920 | tmComResAFeatureDescrHeader_t *afd; | 920 | struct tmComResAFeatureDescrHeader *afd; |
921 | tmComResEncoderDescrHeader_t *edh; | 921 | struct tmComResEncoderDescrHeader *edh; |
922 | tmComResVBIFormatDescrHeader_t *vbifmt; | 922 | struct tmComResVBIFormatDescrHeader *vbifmt; |
923 | u32 currpath = 0; | 923 | u32 currpath = 0; |
924 | 924 | ||
925 | dprintk(DBGLVL_API, | 925 | dprintk(DBGLVL_API, |
926 | "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %d bytes\n", | 926 | "%s(?,?,%d) sizeof(struct tmComResDescrHeader) = %d bytes\n", |
927 | __func__, len, (u32)sizeof(tmComResDescrHeader_t)); | 927 | __func__, len, (u32)sizeof(struct tmComResDescrHeader)); |
928 | 928 | ||
929 | for (idx = 0; idx < (len - sizeof(tmComResDescrHeader_t)); ) { | 929 | for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader)); ) { |
930 | 930 | ||
931 | hdr = (tmComResDescrHeader_t *)(buf + idx); | 931 | hdr = (struct tmComResDescrHeader *)(buf + idx); |
932 | 932 | ||
933 | if (hdr->type != CS_INTERFACE) | 933 | if (hdr->type != CS_INTERFACE) |
934 | return SAA_ERR_NOT_SUPPORTED; | 934 | return SAA_ERR_NOT_SUPPORTED; |
@@ -940,7 +940,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
940 | break; | 940 | break; |
941 | case VC_TUNER_PATH: | 941 | case VC_TUNER_PATH: |
942 | dprintk(DBGLVL_API, " VC_TUNER_PATH\n"); | 942 | dprintk(DBGLVL_API, " VC_TUNER_PATH\n"); |
943 | pathhdr = (tmComResPathDescrHeader_t *)(buf + idx); | 943 | pathhdr = (struct tmComResPathDescrHeader *)(buf + idx); |
944 | dprintk(DBGLVL_API, " pathid = 0x%x\n", | 944 | dprintk(DBGLVL_API, " pathid = 0x%x\n", |
945 | pathhdr->pathid); | 945 | pathhdr->pathid); |
946 | currpath = pathhdr->pathid; | 946 | currpath = pathhdr->pathid; |
@@ -948,7 +948,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
948 | case VC_INPUT_TERMINAL: | 948 | case VC_INPUT_TERMINAL: |
949 | dprintk(DBGLVL_API, " VC_INPUT_TERMINAL\n"); | 949 | dprintk(DBGLVL_API, " VC_INPUT_TERMINAL\n"); |
950 | anttermhdr = | 950 | anttermhdr = |
951 | (tmComResAntTermDescrHeader_t *)(buf + idx); | 951 | (struct tmComResAntTermDescrHeader *)(buf + idx); |
952 | dprintk(DBGLVL_API, " terminalid = 0x%x\n", | 952 | dprintk(DBGLVL_API, " terminalid = 0x%x\n", |
953 | anttermhdr->terminalid); | 953 | anttermhdr->terminalid); |
954 | dprintk(DBGLVL_API, " terminaltype = 0x%x\n", | 954 | dprintk(DBGLVL_API, " terminaltype = 0x%x\n", |
@@ -991,7 +991,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
991 | case VC_OUTPUT_TERMINAL: | 991 | case VC_OUTPUT_TERMINAL: |
992 | dprintk(DBGLVL_API, " VC_OUTPUT_TERMINAL\n"); | 992 | dprintk(DBGLVL_API, " VC_OUTPUT_TERMINAL\n"); |
993 | vcoutputtermhdr = | 993 | vcoutputtermhdr = |
994 | (tmComResDMATermDescrHeader_t *)(buf + idx); | 994 | (struct tmComResDMATermDescrHeader *)(buf + idx); |
995 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 995 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
996 | vcoutputtermhdr->unitid); | 996 | vcoutputtermhdr->unitid); |
997 | dprintk(DBGLVL_API, " terminaltype = 0x%x\n", | 997 | dprintk(DBGLVL_API, " terminaltype = 0x%x\n", |
@@ -1045,16 +1045,16 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1045 | dprintk(DBGLVL_API, " numformats = 0x%x\n", | 1045 | dprintk(DBGLVL_API, " numformats = 0x%x\n", |
1046 | vcoutputtermhdr->numformats); | 1046 | vcoutputtermhdr->numformats); |
1047 | 1047 | ||
1048 | t = (tmComResDescrHeader_t *) | 1048 | t = (struct tmComResDescrHeader *) |
1049 | ((tmComResDMATermDescrHeader_t *)(buf + idx)); | 1049 | ((struct tmComResDMATermDescrHeader *)(buf + idx)); |
1050 | next_offset = idx + (vcoutputtermhdr->len); | 1050 | next_offset = idx + (vcoutputtermhdr->len); |
1051 | for (i = 0; i < vcoutputtermhdr->numformats; i++) { | 1051 | for (i = 0; i < vcoutputtermhdr->numformats; i++) { |
1052 | t = (tmComResDescrHeader_t *) | 1052 | t = (struct tmComResDescrHeader *) |
1053 | (buf + next_offset); | 1053 | (buf + next_offset); |
1054 | switch (t->subtype) { | 1054 | switch (t->subtype) { |
1055 | case VS_FORMAT_MPEG2TS: | 1055 | case VS_FORMAT_MPEG2TS: |
1056 | tsfmt = | 1056 | tsfmt = |
1057 | (tmComResTSFormatDescrHeader_t *)t; | 1057 | (struct tmComResTSFormatDescrHeader *)t; |
1058 | if (currpath == 1) | 1058 | if (currpath == 1) |
1059 | tsport = &dev->ports[ SAA7164_PORT_TS1 ]; | 1059 | tsport = &dev->ports[ SAA7164_PORT_TS1 ]; |
1060 | else | 1060 | else |
@@ -1066,7 +1066,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1066 | break; | 1066 | break; |
1067 | case VS_FORMAT_MPEG2PS: | 1067 | case VS_FORMAT_MPEG2PS: |
1068 | psfmt = | 1068 | psfmt = |
1069 | (tmComResPSFormatDescrHeader_t *)t; | 1069 | (struct tmComResPSFormatDescrHeader *)t; |
1070 | if (currpath == 1) | 1070 | if (currpath == 1) |
1071 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1071 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; |
1072 | else | 1072 | else |
@@ -1078,7 +1078,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1078 | break; | 1078 | break; |
1079 | case VS_FORMAT_VBI: | 1079 | case VS_FORMAT_VBI: |
1080 | vbifmt = | 1080 | vbifmt = |
1081 | (tmComResVBIFormatDescrHeader_t *)t; | 1081 | (struct tmComResVBIFormatDescrHeader *)t; |
1082 | if (currpath == 1) | 1082 | if (currpath == 1) |
1083 | vbiport = &dev->ports[ SAA7164_PORT_VBI1 ]; | 1083 | vbiport = &dev->ports[ SAA7164_PORT_VBI1 ]; |
1084 | else | 1084 | else |
@@ -1113,7 +1113,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1113 | case TUNER_UNIT: | 1113 | case TUNER_UNIT: |
1114 | dprintk(DBGLVL_API, " TUNER_UNIT\n"); | 1114 | dprintk(DBGLVL_API, " TUNER_UNIT\n"); |
1115 | tunerunithdr = | 1115 | tunerunithdr = |
1116 | (tmComResTunerDescrHeader_t *)(buf + idx); | 1116 | (struct tmComResTunerDescrHeader *)(buf + idx); |
1117 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 1117 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
1118 | tunerunithdr->unitid); | 1118 | tunerunithdr->unitid); |
1119 | dprintk(DBGLVL_API, " sourceid = 0x%x\n", | 1119 | dprintk(DBGLVL_API, " sourceid = 0x%x\n", |
@@ -1133,12 +1133,12 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1133 | else | 1133 | else |
1134 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1134 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; |
1135 | memcpy(&encport->tunerunit, tunerunithdr, | 1135 | memcpy(&encport->tunerunit, tunerunithdr, |
1136 | sizeof(tmComResTunerDescrHeader_t)); | 1136 | sizeof(struct tmComResTunerDescrHeader)); |
1137 | dprintk(DBGLVL_API, " (becomes dev->enc[%d] tuner)\n", encport->nr); | 1137 | dprintk(DBGLVL_API, " (becomes dev->enc[%d] tuner)\n", encport->nr); |
1138 | } | 1138 | } |
1139 | break; | 1139 | break; |
1140 | case VC_SELECTOR_UNIT: | 1140 | case VC_SELECTOR_UNIT: |
1141 | psel = (tmComResSelDescrHeader_t *)(buf + idx); | 1141 | psel = (struct tmComResSelDescrHeader *)(buf + idx); |
1142 | dprintk(DBGLVL_API, " VC_SELECTOR_UNIT\n"); | 1142 | dprintk(DBGLVL_API, " VC_SELECTOR_UNIT\n"); |
1143 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 1143 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
1144 | psel->unitid); | 1144 | psel->unitid); |
@@ -1148,7 +1148,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1148 | psel->sourceid); | 1148 | psel->sourceid); |
1149 | break; | 1149 | break; |
1150 | case VC_PROCESSING_UNIT: | 1150 | case VC_PROCESSING_UNIT: |
1151 | pdh = (tmComResProcDescrHeader_t *)(buf + idx); | 1151 | pdh = (struct tmComResProcDescrHeader *)(buf + idx); |
1152 | dprintk(DBGLVL_API, " VC_PROCESSING_UNIT\n"); | 1152 | dprintk(DBGLVL_API, " VC_PROCESSING_UNIT\n"); |
1153 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 1153 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
1154 | pdh->unitid); | 1154 | pdh->unitid); |
@@ -1162,12 +1162,12 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1162 | else | 1162 | else |
1163 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1163 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; |
1164 | memcpy(&encport->vidproc, pdh, | 1164 | memcpy(&encport->vidproc, pdh, |
1165 | sizeof(tmComResProcDescrHeader_t)); | 1165 | sizeof(struct tmComResProcDescrHeader)); |
1166 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1166 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); |
1167 | } | 1167 | } |
1168 | break; | 1168 | break; |
1169 | case FEATURE_UNIT: | 1169 | case FEATURE_UNIT: |
1170 | afd = (tmComResAFeatureDescrHeader_t *)(buf + idx); | 1170 | afd = (struct tmComResAFeatureDescrHeader *)(buf + idx); |
1171 | dprintk(DBGLVL_API, " FEATURE_UNIT\n"); | 1171 | dprintk(DBGLVL_API, " FEATURE_UNIT\n"); |
1172 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 1172 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
1173 | afd->unitid); | 1173 | afd->unitid); |
@@ -1180,11 +1180,11 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1180 | else | 1180 | else |
1181 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1181 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; |
1182 | memcpy(&encport->audfeat, afd, | 1182 | memcpy(&encport->audfeat, afd, |
1183 | sizeof(tmComResAFeatureDescrHeader_t)); | 1183 | sizeof(struct tmComResAFeatureDescrHeader)); |
1184 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1184 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); |
1185 | break; | 1185 | break; |
1186 | case ENCODER_UNIT: | 1186 | case ENCODER_UNIT: |
1187 | edh = (tmComResEncoderDescrHeader_t *)(buf + idx); | 1187 | edh = (struct tmComResEncoderDescrHeader *)(buf + idx); |
1188 | dprintk(DBGLVL_API, " ENCODER_UNIT\n"); | 1188 | dprintk(DBGLVL_API, " ENCODER_UNIT\n"); |
1189 | dprintk(DBGLVL_API, " subtype = 0x%x\n", edh->subtype); | 1189 | dprintk(DBGLVL_API, " subtype = 0x%x\n", edh->subtype); |
1190 | dprintk(DBGLVL_API, " unitid = 0x%x\n", edh->unitid); | 1190 | dprintk(DBGLVL_API, " unitid = 0x%x\n", edh->unitid); |
@@ -1197,13 +1197,13 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1197 | else | 1197 | else |
1198 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1198 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; |
1199 | memcpy(&encport->encunit, edh, | 1199 | memcpy(&encport->encunit, edh, |
1200 | sizeof(tmComResEncoderDescrHeader_t)); | 1200 | sizeof(struct tmComResEncoderDescrHeader)); |
1201 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1201 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); |
1202 | } | 1202 | } |
1203 | break; | 1203 | break; |
1204 | case EXTENSION_UNIT: | 1204 | case EXTENSION_UNIT: |
1205 | dprintk(DBGLVL_API, " EXTENSION_UNIT\n"); | 1205 | dprintk(DBGLVL_API, " EXTENSION_UNIT\n"); |
1206 | exthdr = (tmComResExtDevDescrHeader_t *)(buf + idx); | 1206 | exthdr = (struct tmComResExtDevDescrHeader *)(buf + idx); |
1207 | dprintk(DBGLVL_API, " unitid = 0x%x\n", | 1207 | dprintk(DBGLVL_API, " unitid = 0x%x\n", |
1208 | exthdr->unitid); | 1208 | exthdr->unitid); |
1209 | dprintk(DBGLVL_API, " deviceid = 0x%x\n", | 1209 | dprintk(DBGLVL_API, " deviceid = 0x%x\n", |
@@ -1261,7 +1261,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1261 | else | 1261 | else |
1262 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1262 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; |
1263 | memcpy(&encport->ifunit, exthdr, | 1263 | memcpy(&encport->ifunit, exthdr, |
1264 | sizeof(tmComResExtDevDescrHeader_t)); | 1264 | sizeof(struct tmComResExtDevDescrHeader)); |
1265 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1265 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); |
1266 | } | 1266 | } |
1267 | break; | 1267 | break; |
@@ -1464,7 +1464,7 @@ int saa7164_api_modify_gpio(struct saa7164_dev *dev, u8 unitid, | |||
1464 | u8 pin, u8 state) | 1464 | u8 pin, u8 state) |
1465 | { | 1465 | { |
1466 | int ret; | 1466 | int ret; |
1467 | tmComResGPIO_t t; | 1467 | struct tmComResGPIO t; |
1468 | 1468 | ||
1469 | dprintk(DBGLVL_API, "%s(0x%x, %d, %d)\n", | 1469 | dprintk(DBGLVL_API, "%s(0x%x, %d, %d)\n", |
1470 | __func__, unitid, pin, state); | 1470 | __func__, unitid, pin, state); |
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c index 2afe9f1a6c87..7230912acc7d 100644 --- a/drivers/media/video/saa7164/saa7164-buffer.c +++ b/drivers/media/video/saa7164/saa7164-buffer.c | |||
@@ -92,7 +92,7 @@ void saa7164_buffer_display(struct saa7164_buffer *buf) | |||
92 | struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port, | 92 | struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port, |
93 | u32 len) | 93 | u32 len) |
94 | { | 94 | { |
95 | tmHWStreamParameters_t *params = &port->hw_streamingparams; | 95 | struct tmHWStreamParameters *params = &port->hw_streamingparams; |
96 | struct saa7164_buffer *buf = 0; | 96 | struct saa7164_buffer *buf = 0; |
97 | struct saa7164_dev *dev = port->dev; | 97 | struct saa7164_dev *dev = port->dev; |
98 | int i; | 98 | int i; |
@@ -234,7 +234,7 @@ int saa7164_buffer_activate(struct saa7164_buffer *buf, int i) | |||
234 | 234 | ||
235 | int saa7164_buffer_cfg_port(struct saa7164_port *port) | 235 | int saa7164_buffer_cfg_port(struct saa7164_port *port) |
236 | { | 236 | { |
237 | tmHWStreamParameters_t *params = &port->hw_streamingparams; | 237 | struct tmHWStreamParameters *params = &port->hw_streamingparams; |
238 | struct saa7164_dev *dev = port->dev; | 238 | struct saa7164_dev *dev = port->dev; |
239 | struct saa7164_buffer *buf; | 239 | struct saa7164_buffer *buf; |
240 | struct list_head *c, *n; | 240 | struct list_head *c, *n; |
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c index 78ccf1acdc5c..30d5283da41e 100644 --- a/drivers/media/video/saa7164/saa7164-bus.c +++ b/drivers/media/video/saa7164/saa7164-bus.c | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | int saa7164_bus_setup(struct saa7164_dev *dev) | 27 | int saa7164_bus_setup(struct saa7164_dev *dev) |
28 | { | 28 | { |
29 | tmComResBusInfo_t *b = &dev->bus; | 29 | struct tmComResBusInfo *b = &dev->bus; |
30 | 30 | ||
31 | mutex_init(&b->lock); | 31 | mutex_init(&b->lock); |
32 | 32 | ||
@@ -54,7 +54,7 @@ int saa7164_bus_setup(struct saa7164_dev *dev) | |||
54 | 54 | ||
55 | void saa7164_bus_dump(struct saa7164_dev *dev) | 55 | void saa7164_bus_dump(struct saa7164_dev *dev) |
56 | { | 56 | { |
57 | tmComResBusInfo_t *b = &dev->bus; | 57 | struct tmComResBusInfo *b = &dev->bus; |
58 | 58 | ||
59 | dprintk(DBGLVL_BUS, "Dumping the bus structure:\n"); | 59 | dprintk(DBGLVL_BUS, "Dumping the bus structure:\n"); |
60 | dprintk(DBGLVL_BUS, " .type = %d\n", b->Type); | 60 | dprintk(DBGLVL_BUS, " .type = %d\n", b->Type); |
@@ -82,7 +82,7 @@ void saa7164_bus_dump(struct saa7164_dev *dev) | |||
82 | /* Intensionally throw a BUG() if the state of the message bus looks corrupt */ | 82 | /* Intensionally throw a BUG() if the state of the message bus looks corrupt */ |
83 | void saa7164_bus_verify(struct saa7164_dev *dev) | 83 | void saa7164_bus_verify(struct saa7164_dev *dev) |
84 | { | 84 | { |
85 | tmComResBusInfo_t *b = &dev->bus; | 85 | struct tmComResBusInfo *b = &dev->bus; |
86 | int bug = 0; | 86 | int bug = 0; |
87 | 87 | ||
88 | if (saa7164_readl(b->m_dwSetReadPos) > b->m_dwSizeSetRing) | 88 | if (saa7164_readl(b->m_dwSetReadPos) > b->m_dwSizeSetRing) |
@@ -105,7 +105,7 @@ void saa7164_bus_verify(struct saa7164_dev *dev) | |||
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
108 | void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf) | 108 | void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m, void *buf) |
109 | { | 109 | { |
110 | dprintk(DBGLVL_BUS, "Dumping msg structure:\n"); | 110 | dprintk(DBGLVL_BUS, "Dumping msg structure:\n"); |
111 | dprintk(DBGLVL_BUS, " .id = %d\n", m->id); | 111 | dprintk(DBGLVL_BUS, " .id = %d\n", m->id); |
@@ -121,7 +121,7 @@ void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf) | |||
121 | /* | 121 | /* |
122 | * Places a command or a response on the bus. The implementation does not | 122 | * Places a command or a response on the bus. The implementation does not |
123 | * know if it is a command or a response it just places the data on the | 123 | * know if it is a command or a response it just places the data on the |
124 | * bus depending on the bus information given in the tmComResBusInfo_t | 124 | * bus depending on the bus information given in the struct tmComResBusInfo |
125 | * structure. If the command or response does not fit into the bus ring | 125 | * structure. If the command or response does not fit into the bus ring |
126 | * buffer it will be refused. | 126 | * buffer it will be refused. |
127 | * | 127 | * |
@@ -129,9 +129,9 @@ void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf) | |||
129 | * SAA_OK The function executed successfully. | 129 | * SAA_OK The function executed successfully. |
130 | * < 0 One or more members are not initialized. | 130 | * < 0 One or more members are not initialized. |
131 | */ | 131 | */ |
132 | int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf) | 132 | int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf) |
133 | { | 133 | { |
134 | tmComResBusInfo_t *bus = &dev->bus; | 134 | struct tmComResBusInfo *bus = &dev->bus; |
135 | u32 bytes_to_write, free_write_space, timeout, curr_srp, curr_swp; | 135 | u32 bytes_to_write, free_write_space, timeout, curr_srp, curr_swp; |
136 | u32 new_swp, space_rem; | 136 | u32 new_swp, space_rem; |
137 | int ret = SAA_ERR_BAD_PARAMETER; | 137 | int ret = SAA_ERR_BAD_PARAMETER; |
@@ -294,19 +294,19 @@ out: | |||
294 | /* | 294 | /* |
295 | * Receive a command or a response from the bus. The implementation does not | 295 | * Receive a command or a response from the bus. The implementation does not |
296 | * know if it is a command or a response it simply dequeues the data, | 296 | * know if it is a command or a response it simply dequeues the data, |
297 | * depending on the bus information given in the tmComResBusInfo_t structure. | 297 | * depending on the bus information given in the struct tmComResBusInfo structure. |
298 | * | 298 | * |
299 | * Return Value: | 299 | * Return Value: |
300 | * 0 The function executed successfully. | 300 | * 0 The function executed successfully. |
301 | * < 0 One or more members are not initialized. | 301 | * < 0 One or more members are not initialized. |
302 | */ | 302 | */ |
303 | int saa7164_bus_get(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf, | 303 | int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf, |
304 | int peekonly) | 304 | int peekonly) |
305 | { | 305 | { |
306 | tmComResBusInfo_t *bus = &dev->bus; | 306 | struct tmComResBusInfo *bus = &dev->bus; |
307 | u32 bytes_to_read, write_distance, curr_grp, curr_gwp, | 307 | u32 bytes_to_read, write_distance, curr_grp, curr_gwp, |
308 | new_grp, buf_size, space_rem; | 308 | new_grp, buf_size, space_rem; |
309 | tmComResInfo_t msg_tmp; | 309 | struct tmComResInfo msg_tmp; |
310 | int ret = SAA_ERR_BAD_PARAMETER; | 310 | int ret = SAA_ERR_BAD_PARAMETER; |
311 | 311 | ||
312 | saa7164_bus_verify(dev); | 312 | saa7164_bus_verify(dev); |
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c index e4ec44f5c7cc..301a9e302f45 100644 --- a/drivers/media/video/saa7164/saa7164-cmd.c +++ b/drivers/media/video/saa7164/saa7164-cmd.c | |||
@@ -92,7 +92,7 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev) | |||
92 | do { | 92 | do { |
93 | 93 | ||
94 | /* Peek the msg bus */ | 94 | /* Peek the msg bus */ |
95 | tmComResInfo_t tRsp = { 0, 0, 0, 0, 0, 0 }; | 95 | struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 }; |
96 | ret = saa7164_bus_get(dev, &tRsp, NULL, 1); | 96 | ret = saa7164_bus_get(dev, &tRsp, NULL, 1); |
97 | if (ret != SAA_OK) | 97 | if (ret != SAA_OK) |
98 | break; | 98 | break; |
@@ -143,7 +143,7 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev) | |||
143 | 143 | ||
144 | while (loop) { | 144 | while (loop) { |
145 | 145 | ||
146 | tmComResInfo_t tRsp = { 0, 0, 0, 0, 0, 0 }; | 146 | struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 }; |
147 | ret = saa7164_bus_get(dev, &tRsp, NULL, 1); | 147 | ret = saa7164_bus_get(dev, &tRsp, NULL, 1); |
148 | if (ret == SAA_ERR_EMPTY) | 148 | if (ret == SAA_ERR_EMPTY) |
149 | return SAA_OK; | 149 | return SAA_OK; |
@@ -186,9 +186,9 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev) | |||
186 | return SAA_OK; | 186 | return SAA_OK; |
187 | } | 187 | } |
188 | 188 | ||
189 | int saa7164_cmd_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf) | 189 | int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf) |
190 | { | 190 | { |
191 | tmComResBusInfo_t *bus = &dev->bus; | 191 | struct tmComResBusInfo *bus = &dev->bus; |
192 | u8 cmd_sent; | 192 | u8 cmd_sent; |
193 | u16 size, idx; | 193 | u16 size, idx; |
194 | u32 cmds; | 194 | u32 cmds; |
@@ -339,11 +339,11 @@ void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno) | |||
339 | mutex_unlock(&dev->lock); | 339 | mutex_unlock(&dev->lock); |
340 | } | 340 | } |
341 | 341 | ||
342 | int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, tmComResCmd_t command, | 342 | int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum tmComResCmd command, |
343 | u16 controlselector, u16 size, void *buf) | 343 | u16 controlselector, u16 size, void *buf) |
344 | { | 344 | { |
345 | tmComResInfo_t command_t, *pcommand_t; | 345 | struct tmComResInfo command_t, *pcommand_t; |
346 | tmComResInfo_t response_t, *presponse_t; | 346 | struct tmComResInfo response_t, *presponse_t; |
347 | u8 errdata[256]; | 347 | u8 errdata[256]; |
348 | u16 resp_dsize; | 348 | u16 resp_dsize; |
349 | u16 data_recd; | 349 | u16 data_recd; |
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index 903d880d63f4..46c2fb2ecf5e 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c | |||
@@ -825,8 +825,8 @@ void saa7164_dumpregs(struct saa7164_dev *dev, u32 addr) | |||
825 | 825 | ||
826 | static void saa7164_dump_hwdesc(struct saa7164_dev *dev) | 826 | static void saa7164_dump_hwdesc(struct saa7164_dev *dev) |
827 | { | 827 | { |
828 | dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %d bytes\n", | 828 | dprintk(1, "@0x%p hwdesc sizeof(struct tmComResHWDescr) = %d bytes\n", |
829 | &dev->hwdesc, (u32)sizeof(tmComResHWDescr_t)); | 829 | &dev->hwdesc, (u32)sizeof(struct tmComResHWDescr)); |
830 | 830 | ||
831 | dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength); | 831 | dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength); |
832 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType); | 832 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType); |
@@ -856,8 +856,8 @@ static void saa7164_dump_hwdesc(struct saa7164_dev *dev) | |||
856 | static void saa7164_dump_intfdesc(struct saa7164_dev *dev) | 856 | static void saa7164_dump_intfdesc(struct saa7164_dev *dev) |
857 | { | 857 | { |
858 | dprintk(1, "@0x%p intfdesc " | 858 | dprintk(1, "@0x%p intfdesc " |
859 | "sizeof(tmComResInterfaceDescr_t) = %d bytes\n", | 859 | "sizeof(struct tmComResInterfaceDescr) = %d bytes\n", |
860 | &dev->intfdesc, (u32)sizeof(tmComResInterfaceDescr_t)); | 860 | &dev->intfdesc, (u32)sizeof(struct tmComResInterfaceDescr)); |
861 | 861 | ||
862 | dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength); | 862 | dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength); |
863 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType); | 863 | dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType); |
@@ -877,8 +877,8 @@ static void saa7164_dump_intfdesc(struct saa7164_dev *dev) | |||
877 | 877 | ||
878 | static void saa7164_dump_busdesc(struct saa7164_dev *dev) | 878 | static void saa7164_dump_busdesc(struct saa7164_dev *dev) |
879 | { | 879 | { |
880 | dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %d bytes\n", | 880 | dprintk(1, "@0x%p busdesc sizeof(struct tmComResBusDescr) = %d bytes\n", |
881 | &dev->busdesc, (u32)sizeof(tmComResBusDescr_t)); | 881 | &dev->busdesc, (u32)sizeof(struct tmComResBusDescr)); |
882 | 882 | ||
883 | dprintk(1, " .CommandRing = 0x%016Lx\n", dev->busdesc.CommandRing); | 883 | dprintk(1, " .CommandRing = 0x%016Lx\n", dev->busdesc.CommandRing); |
884 | dprintk(1, " .ResponseRing = 0x%016Lx\n", dev->busdesc.ResponseRing); | 884 | dprintk(1, " .ResponseRing = 0x%016Lx\n", dev->busdesc.ResponseRing); |
@@ -895,23 +895,23 @@ static void saa7164_dump_busdesc(struct saa7164_dev *dev) | |||
895 | */ | 895 | */ |
896 | static void saa7164_get_descriptors(struct saa7164_dev *dev) | 896 | static void saa7164_get_descriptors(struct saa7164_dev *dev) |
897 | { | 897 | { |
898 | memcpy_fromio(&dev->hwdesc, dev->bmmio, sizeof(tmComResHWDescr_t)); | 898 | memcpy_fromio(&dev->hwdesc, dev->bmmio, sizeof(struct tmComResHWDescr)); |
899 | memcpy_fromio(&dev->intfdesc, dev->bmmio + sizeof(tmComResHWDescr_t), | 899 | memcpy_fromio(&dev->intfdesc, dev->bmmio + sizeof(struct tmComResHWDescr), |
900 | sizeof(tmComResInterfaceDescr_t)); | 900 | sizeof(struct tmComResInterfaceDescr)); |
901 | memcpy_fromio(&dev->busdesc, dev->bmmio + dev->intfdesc.BARLocation, | 901 | memcpy_fromio(&dev->busdesc, dev->bmmio + dev->intfdesc.BARLocation, |
902 | sizeof(tmComResBusDescr_t)); | 902 | sizeof(struct tmComResBusDescr)); |
903 | 903 | ||
904 | if (dev->hwdesc.bLength != sizeof(tmComResHWDescr_t)) { | 904 | if (dev->hwdesc.bLength != sizeof(struct tmComResHWDescr)) { |
905 | printk(KERN_ERR "Structure tmComResHWDescr_t is mangled\n"); | 905 | printk(KERN_ERR "Structure struct tmComResHWDescr is mangled\n"); |
906 | printk(KERN_ERR "Need %x got %d\n", dev->hwdesc.bLength, | 906 | printk(KERN_ERR "Need %x got %d\n", dev->hwdesc.bLength, |
907 | (u32)sizeof(tmComResHWDescr_t)); | 907 | (u32)sizeof(struct tmComResHWDescr)); |
908 | } else | 908 | } else |
909 | saa7164_dump_hwdesc(dev); | 909 | saa7164_dump_hwdesc(dev); |
910 | 910 | ||
911 | if (dev->intfdesc.bLength != sizeof(tmComResInterfaceDescr_t)) { | 911 | if (dev->intfdesc.bLength != sizeof(struct tmComResInterfaceDescr)) { |
912 | printk(KERN_ERR "struct tmComResInterfaceDescr_t is mangled\n"); | 912 | printk(KERN_ERR "struct struct tmComResInterfaceDescr is mangled\n"); |
913 | printk(KERN_ERR "Need %x got %d\n", dev->intfdesc.bLength, | 913 | printk(KERN_ERR "Need %x got %d\n", dev->intfdesc.bLength, |
914 | (u32)sizeof(tmComResInterfaceDescr_t)); | 914 | (u32)sizeof(struct tmComResInterfaceDescr)); |
915 | } else | 915 | } else |
916 | saa7164_dump_intfdesc(dev); | 916 | saa7164_dump_intfdesc(dev); |
917 | 917 | ||
@@ -1101,7 +1101,7 @@ static void saa7164_dev_unregister(struct saa7164_dev *dev) | |||
1101 | static int saa7164_proc_show(struct seq_file *m, void *v) | 1101 | static int saa7164_proc_show(struct seq_file *m, void *v) |
1102 | { | 1102 | { |
1103 | struct saa7164_dev *dev; | 1103 | struct saa7164_dev *dev; |
1104 | tmComResBusInfo_t *b; | 1104 | struct tmComResBusInfo *b; |
1105 | struct list_head *list; | 1105 | struct list_head *list; |
1106 | int i, c; | 1106 | int i, c; |
1107 | 1107 | ||
@@ -1191,7 +1191,7 @@ static int saa7164_proc_create(void) | |||
1191 | static int saa7164_thread_function(void *data) | 1191 | static int saa7164_thread_function(void *data) |
1192 | { | 1192 | { |
1193 | struct saa7164_dev *dev = data; | 1193 | struct saa7164_dev *dev = data; |
1194 | tmFwInfoStruct_t fwinfo; | 1194 | struct tmFwInfoStruct fwinfo; |
1195 | u64 last_poll_time = 0; | 1195 | u64 last_poll_time = 0; |
1196 | 1196 | ||
1197 | dprintk(DBGLVL_THR, "thread started\n"); | 1197 | dprintk(DBGLVL_THR, "thread started\n"); |
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c index 6cf723a5753f..28cf223e571f 100644 --- a/drivers/media/video/saa7164/saa7164-encoder.c +++ b/drivers/media/video/saa7164/saa7164-encoder.c | |||
@@ -119,7 +119,7 @@ static int saa7164_encoder_buffers_alloc(struct saa7164_port *port) | |||
119 | struct saa7164_dev *dev = port->dev; | 119 | struct saa7164_dev *dev = port->dev; |
120 | struct saa7164_buffer *buf; | 120 | struct saa7164_buffer *buf; |
121 | struct saa7164_user_buffer *ubuf; | 121 | struct saa7164_user_buffer *ubuf; |
122 | tmHWStreamParameters_t *params = &port->hw_streamingparams; | 122 | struct tmHWStreamParameters *params = &port->hw_streamingparams; |
123 | int result = -ENODEV, i; | 123 | int result = -ENODEV, i; |
124 | int len = 0; | 124 | int len = 0; |
125 | 125 | ||
diff --git a/drivers/media/video/saa7164/saa7164-types.h b/drivers/media/video/saa7164/saa7164-types.h index e66c29d6ead3..9690d44ec34f 100644 --- a/drivers/media/video/saa7164/saa7164-types.h +++ b/drivers/media/video/saa7164/saa7164-types.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* Some structues are passed directly to/from the firmware and | 24 | /* Some structues are passed directly to/from the firmware and |
25 | * have strict alignment requirements. This is one of them. | 25 | * have strict alignment requirements. This is one of them. |
26 | */ | 26 | */ |
27 | typedef struct { | 27 | struct tmComResHWDescr { |
28 | u8 bLength; | 28 | u8 bLength; |
29 | u8 bDescriptorType; | 29 | u8 bDescriptorType; |
30 | u8 bDescriptorSubtype; | 30 | u8 bDescriptorSubtype; |
@@ -37,14 +37,14 @@ typedef struct { | |||
37 | u32 dwHostMemoryRegionSize; | 37 | u32 dwHostMemoryRegionSize; |
38 | u32 dwHostHibernatMemRegion; | 38 | u32 dwHostHibernatMemRegion; |
39 | u32 dwHostHibernatMemRegionSize; | 39 | u32 dwHostHibernatMemRegionSize; |
40 | } __attribute__((packed)) tmComResHWDescr_t; | 40 | } __attribute__((packed)); |
41 | 41 | ||
42 | /* This is DWORD aligned on windows but I can't find the right | 42 | /* This is DWORD aligned on windows but I can't find the right |
43 | * gcc syntax to match the binary data from the device. | 43 | * gcc syntax to match the binary data from the device. |
44 | * I've manually padded with Reserved[3] bytes to match the hardware, | 44 | * I've manually padded with Reserved[3] bytes to match the hardware, |
45 | * but this could break if GCC decies to pack in a different way. | 45 | * but this could break if GCC decies to pack in a different way. |
46 | */ | 46 | */ |
47 | typedef struct { | 47 | struct tmComResInterfaceDescr { |
48 | u8 bLength; | 48 | u8 bLength; |
49 | u8 bDescriptorType; | 49 | u8 bDescriptorType; |
50 | u8 bDescriptorSubtype; | 50 | u8 bDescriptorSubtype; |
@@ -56,27 +56,27 @@ typedef struct { | |||
56 | u8 bDebugInterruptId; | 56 | u8 bDebugInterruptId; |
57 | u8 BARLocation; | 57 | u8 BARLocation; |
58 | u8 Reserved[3]; | 58 | u8 Reserved[3]; |
59 | } tmComResInterfaceDescr_t; | 59 | }; |
60 | 60 | ||
61 | typedef struct { | 61 | struct tmComResBusDescr { |
62 | u64 CommandRing; | 62 | u64 CommandRing; |
63 | u64 ResponseRing; | 63 | u64 ResponseRing; |
64 | u32 CommandWrite; | 64 | u32 CommandWrite; |
65 | u32 CommandRead; | 65 | u32 CommandRead; |
66 | u32 ResponseWrite; | 66 | u32 ResponseWrite; |
67 | u32 ResponseRead; | 67 | u32 ResponseRead; |
68 | } tmComResBusDescr_t; | 68 | }; |
69 | 69 | ||
70 | typedef enum { | 70 | enum tmBusType { |
71 | NONE = 0, | 71 | NONE = 0, |
72 | TYPE_BUS_PCI = 1, | 72 | TYPE_BUS_PCI = 1, |
73 | TYPE_BUS_PCIe = 2, | 73 | TYPE_BUS_PCIe = 2, |
74 | TYPE_BUS_USB = 3, | 74 | TYPE_BUS_USB = 3, |
75 | TYPE_BUS_I2C = 4 | 75 | TYPE_BUS_I2C = 4 |
76 | } tmBusType_t; | 76 | }; |
77 | 77 | ||
78 | typedef struct { | 78 | struct tmComResBusInfo { |
79 | tmBusType_t Type; | 79 | enum tmBusType Type; |
80 | u16 m_wMaxReqSize; | 80 | u16 m_wMaxReqSize; |
81 | u8 *m_pdwSetRing; | 81 | u8 *m_pdwSetRing; |
82 | u32 m_dwSizeSetRing; | 82 | u32 m_dwSizeSetRing; |
@@ -90,18 +90,18 @@ typedef struct { | |||
90 | /* All access is protected */ | 90 | /* All access is protected */ |
91 | struct mutex lock; | 91 | struct mutex lock; |
92 | 92 | ||
93 | } tmComResBusInfo_t; | 93 | }; |
94 | 94 | ||
95 | typedef struct { | 95 | struct tmComResInfo { |
96 | u8 id; | 96 | u8 id; |
97 | u8 flags; | 97 | u8 flags; |
98 | u16 size; | 98 | u16 size; |
99 | u32 command; | 99 | u32 command; |
100 | u16 controlselector; | 100 | u16 controlselector; |
101 | u8 seqno; | 101 | u8 seqno; |
102 | } __attribute__((packed)) tmComResInfo_t; | 102 | } __attribute__((packed)); |
103 | 103 | ||
104 | typedef enum { | 104 | enum tmComResCmd { |
105 | SET_CUR = 0x01, | 105 | SET_CUR = 0x01, |
106 | GET_CUR = 0x81, | 106 | GET_CUR = 0x81, |
107 | GET_MIN = 0x82, | 107 | GET_MIN = 0x82, |
@@ -110,7 +110,7 @@ typedef enum { | |||
110 | GET_LEN = 0x85, | 110 | GET_LEN = 0x85, |
111 | GET_INFO = 0x86, | 111 | GET_INFO = 0x86, |
112 | GET_DEF = 0x87 | 112 | GET_DEF = 0x87 |
113 | } tmComResCmd_t; | 113 | }; |
114 | 114 | ||
115 | struct cmd { | 115 | struct cmd { |
116 | u8 seqno; | 116 | u8 seqno; |
@@ -121,20 +121,20 @@ struct cmd { | |||
121 | wait_queue_head_t wait; | 121 | wait_queue_head_t wait; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | typedef struct { | 124 | struct tmDescriptor { |
125 | u32 pathid; | 125 | u32 pathid; |
126 | u32 size; | 126 | u32 size; |
127 | void *descriptor; | 127 | void *descriptor; |
128 | } tmDescriptor_t; | 128 | }; |
129 | 129 | ||
130 | typedef struct { | 130 | struct tmComResDescrHeader { |
131 | u8 len; | 131 | u8 len; |
132 | u8 type; | 132 | u8 type; |
133 | u8 subtype; | 133 | u8 subtype; |
134 | u8 unitid; | 134 | u8 unitid; |
135 | } __attribute__((packed)) tmComResDescrHeader_t; | 135 | } __attribute__((packed)); |
136 | 136 | ||
137 | typedef struct { | 137 | struct tmComResExtDevDescrHeader { |
138 | u8 len; | 138 | u8 len; |
139 | u8 type; | 139 | u8 type; |
140 | u8 subtype; | 140 | u8 subtype; |
@@ -144,22 +144,22 @@ typedef struct { | |||
144 | u32 numgpiopins; | 144 | u32 numgpiopins; |
145 | u8 numgpiogroups; | 145 | u8 numgpiogroups; |
146 | u8 controlsize; | 146 | u8 controlsize; |
147 | } __attribute__((packed)) tmComResExtDevDescrHeader_t; | 147 | } __attribute__((packed)); |
148 | 148 | ||
149 | typedef struct { | 149 | struct tmComResGPIO { |
150 | u32 pin; | 150 | u32 pin; |
151 | u8 state; | 151 | u8 state; |
152 | } __attribute__((packed)) tmComResGPIO_t; | 152 | } __attribute__((packed)); |
153 | 153 | ||
154 | typedef struct { | 154 | struct tmComResPathDescrHeader { |
155 | u8 len; | 155 | u8 len; |
156 | u8 type; | 156 | u8 type; |
157 | u8 subtype; | 157 | u8 subtype; |
158 | u8 pathid; | 158 | u8 pathid; |
159 | } __attribute__((packed)) tmComResPathDescrHeader_t; | 159 | } __attribute__((packed)); |
160 | 160 | ||
161 | /* terminaltype */ | 161 | /* terminaltype */ |
162 | typedef enum { | 162 | enum tmComResTermType { |
163 | ITT_ANTENNA = 0x0203, | 163 | ITT_ANTENNA = 0x0203, |
164 | LINE_CONNECTOR = 0x0603, | 164 | LINE_CONNECTOR = 0x0603, |
165 | SPDIF_CONNECTOR = 0x0605, | 165 | SPDIF_CONNECTOR = 0x0605, |
@@ -167,9 +167,9 @@ typedef enum { | |||
167 | SVIDEO_CONNECTOR = 0x0402, | 167 | SVIDEO_CONNECTOR = 0x0402, |
168 | COMPONENT_CONNECTOR = 0x0403, | 168 | COMPONENT_CONNECTOR = 0x0403, |
169 | STANDARD_DMA = 0xF101 | 169 | STANDARD_DMA = 0xF101 |
170 | } tmComResTermType_t; | 170 | }; |
171 | 171 | ||
172 | typedef struct { | 172 | struct tmComResAntTermDescrHeader { |
173 | u8 len; | 173 | u8 len; |
174 | u8 type; | 174 | u8 type; |
175 | u8 subtype; | 175 | u8 subtype; |
@@ -178,9 +178,9 @@ typedef struct { | |||
178 | u8 assocterminal; | 178 | u8 assocterminal; |
179 | u8 iterminal; | 179 | u8 iterminal; |
180 | u8 controlsize; | 180 | u8 controlsize; |
181 | } __attribute__((packed)) tmComResAntTermDescrHeader_t; | 181 | } __attribute__((packed)); |
182 | 182 | ||
183 | typedef struct { | 183 | struct tmComResTunerDescrHeader { |
184 | u8 len; | 184 | u8 len; |
185 | u8 type; | 185 | u8 type; |
186 | u8 subtype; | 186 | u8 subtype; |
@@ -190,9 +190,9 @@ typedef struct { | |||
190 | u32 tuningstandards; | 190 | u32 tuningstandards; |
191 | u8 controlsize; | 191 | u8 controlsize; |
192 | u32 controls; | 192 | u32 controls; |
193 | } __attribute__((packed)) tmComResTunerDescrHeader_t; | 193 | } __attribute__((packed)); |
194 | 194 | ||
195 | typedef enum { | 195 | enum tmBufferFlag { |
196 | /* the buffer does not contain any valid data */ | 196 | /* the buffer does not contain any valid data */ |
197 | TM_BUFFER_FLAG_EMPTY, | 197 | TM_BUFFER_FLAG_EMPTY, |
198 | 198 | ||
@@ -201,23 +201,23 @@ typedef enum { | |||
201 | 201 | ||
202 | /* the buffer is the dummy buffer - TODO??? */ | 202 | /* the buffer is the dummy buffer - TODO??? */ |
203 | TM_BUFFER_FLAG_DUMMY_BUFFER | 203 | TM_BUFFER_FLAG_DUMMY_BUFFER |
204 | } tmBufferFlag_t; | 204 | }; |
205 | 205 | ||
206 | typedef struct { | 206 | struct tmBuffer { |
207 | u64 *pagetablevirt; | 207 | u64 *pagetablevirt; |
208 | u64 pagetablephys; | 208 | u64 pagetablephys; |
209 | u16 offset; | 209 | u16 offset; |
210 | u8 *context; | 210 | u8 *context; |
211 | u64 timestamp; | 211 | u64 timestamp; |
212 | tmBufferFlag_t BufferFlag_t; | 212 | enum tmBufferFlag BufferFlag; |
213 | u32 lostbuffers; | 213 | u32 lostbuffers; |
214 | u32 validbuffers; | 214 | u32 validbuffers; |
215 | u64 *dummypagevirt; | 215 | u64 *dummypagevirt; |
216 | u64 dummypagephys; | 216 | u64 dummypagephys; |
217 | u64 *addressvirt; | 217 | u64 *addressvirt; |
218 | } tmBuffer_t; | 218 | }; |
219 | 219 | ||
220 | typedef struct { | 220 | struct tmHWStreamParameters { |
221 | u32 bitspersample; | 221 | u32 bitspersample; |
222 | u32 samplesperline; | 222 | u32 samplesperline; |
223 | u32 numberoflines; | 223 | u32 numberoflines; |
@@ -227,15 +227,15 @@ typedef struct { | |||
227 | u64 *pagetablelistphys; | 227 | u64 *pagetablelistphys; |
228 | u32 numpagetables; | 228 | u32 numpagetables; |
229 | u32 numpagetableentries; | 229 | u32 numpagetableentries; |
230 | } tmHWStreamParameters_t; | 230 | }; |
231 | 231 | ||
232 | typedef struct { | 232 | struct tmStreamParameters { |
233 | tmHWStreamParameters_t HWStreamParameters_t; | 233 | struct tmHWStreamParameters HWStreamParameters; |
234 | u64 qwDummyPageTablePhys; | 234 | u64 qwDummyPageTablePhys; |
235 | u64 *pDummyPageTableVirt; | 235 | u64 *pDummyPageTableVirt; |
236 | } tmStreamParameters_t; | 236 | }; |
237 | 237 | ||
238 | typedef struct { | 238 | struct tmComResDMATermDescrHeader { |
239 | u8 len; | 239 | u8 len; |
240 | u8 type; | 240 | u8 type; |
241 | u8 subtyle; | 241 | u8 subtyle; |
@@ -251,7 +251,7 @@ typedef struct { | |||
251 | u8 metadatasize; | 251 | u8 metadatasize; |
252 | u8 numformats; | 252 | u8 numformats; |
253 | u8 controlsize; | 253 | u8 controlsize; |
254 | } __attribute__((packed)) tmComResDMATermDescrHeader_t; | 254 | } __attribute__((packed)); |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * | 257 | * |
@@ -274,7 +274,7 @@ typedef struct { | |||
274 | * Data is to be ignored by the application. | 274 | * Data is to be ignored by the application. |
275 | * | 275 | * |
276 | */ | 276 | */ |
277 | typedef struct { | 277 | struct tmComResTSFormatDescrHeader { |
278 | u8 len; | 278 | u8 len; |
279 | u8 type; | 279 | u8 type; |
280 | u8 subtype; | 280 | u8 subtype; |
@@ -283,24 +283,22 @@ typedef struct { | |||
283 | u8 bPacketLength; | 283 | u8 bPacketLength; |
284 | u8 bStrideLength; | 284 | u8 bStrideLength; |
285 | u8 guidStrideFormat[16]; | 285 | u8 guidStrideFormat[16]; |
286 | } __attribute__((packed)) tmComResTSFormatDescrHeader_t; | 286 | } __attribute__((packed)); |
287 | 287 | ||
288 | /* Encoder related structures */ | 288 | /* Encoder related structures */ |
289 | 289 | ||
290 | /* A/V Mux Selector */ | 290 | /* A/V Mux Selector */ |
291 | typedef struct | 291 | struct tmComResSelDescrHeader { |
292 | { | ||
293 | u8 len; | 292 | u8 len; |
294 | u8 type; | 293 | u8 type; |
295 | u8 subtype; | 294 | u8 subtype; |
296 | u8 unitid; | 295 | u8 unitid; |
297 | u8 nrinpins; | 296 | u8 nrinpins; |
298 | u8 sourceid; | 297 | u8 sourceid; |
299 | } __attribute__((packed)) tmComResSelDescrHeader_t; | 298 | } __attribute__((packed)); |
300 | 299 | ||
301 | /* A/V Audio processor definitions */ | 300 | /* A/V Audio processor definitions */ |
302 | typedef struct | 301 | struct tmComResProcDescrHeader { |
303 | { | ||
304 | u8 len; | 302 | u8 len; |
305 | u8 type; | 303 | u8 type; |
306 | u8 subtype; | 304 | u8 subtype; |
@@ -308,25 +306,23 @@ typedef struct | |||
308 | u8 sourceid; | 306 | u8 sourceid; |
309 | u16 wreserved; | 307 | u16 wreserved; |
310 | u8 controlsize; | 308 | u8 controlsize; |
311 | } __attribute__((packed)) tmComResProcDescrHeader_t; | 309 | } __attribute__((packed)); |
312 | 310 | ||
313 | /* Video bitrate control message */ | 311 | /* Video bitrate control message */ |
314 | #define EU_VIDEO_BIT_RATE_MODE_CONSTANT (0) | 312 | #define EU_VIDEO_BIT_RATE_MODE_CONSTANT (0) |
315 | #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_AVERAGE (1) | 313 | #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_AVERAGE (1) |
316 | #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_PEAK (2) | 314 | #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_PEAK (2) |
317 | typedef struct | 315 | struct tmComResEncVideoBitRate { |
318 | { | ||
319 | u8 ucVideoBitRateMode; | 316 | u8 ucVideoBitRateMode; |
320 | u32 dwVideoBitRate; | 317 | u32 dwVideoBitRate; |
321 | u32 dwVideoBitRatePeak; | 318 | u32 dwVideoBitRatePeak; |
322 | } __attribute__((packed)) tmComResEncVideoBitRate_t; | 319 | } __attribute__((packed)); |
323 | 320 | ||
324 | /* Video Encoder Aspect Ratio message */ | 321 | /* Video Encoder Aspect Ratio message */ |
325 | typedef struct | 322 | struct tmComResEncVideoInputAspectRatio { |
326 | { | ||
327 | u8 width; | 323 | u8 width; |
328 | u8 height; | 324 | u8 height; |
329 | } __attribute__((packed)) tmComResEncVideoInputAspectRatio_t; | 325 | } __attribute__((packed)); |
330 | 326 | ||
331 | /* Video Encoder GOP IBP message */ | 327 | /* Video Encoder GOP IBP message */ |
332 | /* 1. IPPPPPPPPPPPPPP */ | 328 | /* 1. IPPPPPPPPPPPPPP */ |
@@ -334,15 +330,13 @@ typedef struct | |||
334 | /* 3. IBBPBBPBBPBBP */ | 330 | /* 3. IBBPBBPBBPBBP */ |
335 | #define SAA7164_ENCODER_DEFAULT_GOP_DIST ( 1) | 331 | #define SAA7164_ENCODER_DEFAULT_GOP_DIST ( 1) |
336 | #define SAA7164_ENCODER_DEFAULT_GOP_SIZE (15) | 332 | #define SAA7164_ENCODER_DEFAULT_GOP_SIZE (15) |
337 | typedef struct | 333 | struct tmComResEncVideoGopStructure { |
338 | { | ||
339 | u8 ucGOPSize; /* GOP Size 12, 15 */ | 334 | u8 ucGOPSize; /* GOP Size 12, 15 */ |
340 | u8 ucRefFrameDist; /* Reference Frame Distance */ | 335 | u8 ucRefFrameDist; /* Reference Frame Distance */ |
341 | } __attribute__((packed)) tmComResEncVideoGopStructure_t; | 336 | } __attribute__((packed)); |
342 | 337 | ||
343 | /* Encoder processor definition */ | 338 | /* Encoder processor definition */ |
344 | typedef struct | 339 | struct tmComResEncoderDescrHeader { |
345 | { | ||
346 | u8 len; | 340 | u8 len; |
347 | u8 type; | 341 | u8 type; |
348 | u8 subtype; | 342 | u8 subtype; |
@@ -358,53 +352,47 @@ typedef struct | |||
358 | u16 wmVidFrmRateCap; | 352 | u16 wmVidFrmRateCap; |
359 | u32 dwmAudFormatCap; | 353 | u32 dwmAudFormatCap; |
360 | u8 bmAudBitrateCap; | 354 | u8 bmAudBitrateCap; |
361 | } __attribute__((packed)) tmComResEncoderDescrHeader_t; | 355 | } __attribute__((packed)); |
362 | 356 | ||
363 | /* Audio processor definition */ | 357 | /* Audio processor definition */ |
364 | typedef struct | 358 | struct tmComResAFeatureDescrHeader { |
365 | { | ||
366 | u8 len; | 359 | u8 len; |
367 | u8 type; | 360 | u8 type; |
368 | u8 subtype; | 361 | u8 subtype; |
369 | u8 unitid; | 362 | u8 unitid; |
370 | u8 sourceid; | 363 | u8 sourceid; |
371 | u8 controlsize; | 364 | u8 controlsize; |
372 | } __attribute__((packed)) tmComResAFeatureDescrHeader_t; | 365 | } __attribute__((packed)); |
373 | 366 | ||
374 | /* Audio control messages */ | 367 | /* Audio control messages */ |
375 | typedef struct | 368 | struct tmComResAudioDefaults { |
376 | { | ||
377 | u8 ucDecoderLevel; | 369 | u8 ucDecoderLevel; |
378 | u8 ucDecoderFM_Level; | 370 | u8 ucDecoderFM_Level; |
379 | u8 ucMonoLevel; | 371 | u8 ucMonoLevel; |
380 | u8 ucNICAM_Level; | 372 | u8 ucNICAM_Level; |
381 | u8 ucSAP_Level; | 373 | u8 ucSAP_Level; |
382 | u8 ucADC_Level; | 374 | u8 ucADC_Level; |
383 | } __attribute__((packed)) tmComResAudioDefaults_t; | 375 | } __attribute__((packed)); |
384 | 376 | ||
385 | /* Audio bitrate control message */ | 377 | /* Audio bitrate control message */ |
386 | typedef struct | 378 | struct tmComResEncAudioBitRate { |
387 | { | ||
388 | u8 ucAudioBitRateMode; | 379 | u8 ucAudioBitRateMode; |
389 | u32 dwAudioBitRate; | 380 | u32 dwAudioBitRate; |
390 | u32 dwAudioBitRatePeak; | 381 | u32 dwAudioBitRatePeak; |
391 | } __attribute__((packed)) tmComResEncAudioBitRate_t; | 382 | } __attribute__((packed)); |
392 | 383 | ||
393 | /* Tuner / AV Decoder messages */ | 384 | /* Tuner / AV Decoder messages */ |
394 | typedef struct | 385 | struct tmComResTunerStandard { |
395 | { | ||
396 | u8 std; | 386 | u8 std; |
397 | u32 country; | 387 | u32 country; |
398 | } __attribute__((packed)) tmComResTunerStandard_t; | 388 | } __attribute__((packed)); |
399 | 389 | ||
400 | typedef struct | 390 | struct tmComResTunerStandardAuto { |
401 | { | ||
402 | u8 mode; | 391 | u8 mode; |
403 | } __attribute__((packed)) tmComResTunerStandardAuto_t; | 392 | } __attribute__((packed)); |
404 | 393 | ||
405 | /* EEPROM definition for PS stream types */ | 394 | /* EEPROM definition for PS stream types */ |
406 | typedef struct | 395 | struct tmComResPSFormatDescrHeader { |
407 | { | ||
408 | u8 len; | 396 | u8 len; |
409 | u8 type; | 397 | u8 type; |
410 | u8 subtype; | 398 | u8 subtype; |
@@ -412,11 +400,10 @@ typedef struct | |||
412 | u16 wPacketLength; | 400 | u16 wPacketLength; |
413 | u16 wPackLength; | 401 | u16 wPackLength; |
414 | u8 bPackDataType; | 402 | u8 bPackDataType; |
415 | } __attribute__((packed)) tmComResPSFormatDescrHeader_t; | 403 | } __attribute__((packed)); |
416 | 404 | ||
417 | /* VBI control structure */ | 405 | /* VBI control structure */ |
418 | typedef struct | 406 | struct tmComResVBIFormatDescrHeader { |
419 | { | ||
420 | u8 len; | 407 | u8 len; |
421 | u8 type; | 408 | u8 type; |
422 | u8 subtype; /* VS_FORMAT_VBI */ | 409 | u8 subtype; /* VS_FORMAT_VBI */ |
@@ -426,28 +413,24 @@ typedef struct | |||
426 | u8 EndLine; /* NTSC = 21 */ | 413 | u8 EndLine; /* NTSC = 21 */ |
427 | u8 FieldRate; /* 60 for NTSC */ | 414 | u8 FieldRate; /* 60 for NTSC */ |
428 | u8 bNumLines; /* Unsed - scheduled for removal */ | 415 | u8 bNumLines; /* Unsed - scheduled for removal */ |
429 | } __attribute__((packed)) tmComResVBIFormatDescrHeader_t; | 416 | } __attribute__((packed)); |
430 | 417 | ||
431 | typedef struct | 418 | struct tmComResProbeCommit { |
432 | { | ||
433 | u16 bmHint; | 419 | u16 bmHint; |
434 | u8 bFormatIndex; | 420 | u8 bFormatIndex; |
435 | u8 bFrameIndex; | 421 | u8 bFrameIndex; |
436 | } __attribute__((packed)) tmComResProbeCommit_t; | 422 | } __attribute__((packed)); |
437 | 423 | ||
438 | typedef struct | 424 | struct tmComResDebugSetLevel { |
439 | { | ||
440 | u32 dwDebugLevel; | 425 | u32 dwDebugLevel; |
441 | } __attribute__((packed)) tmComResDebugSetLevel_t; | 426 | } __attribute__((packed)); |
442 | 427 | ||
443 | typedef struct | 428 | struct tmComResDebugGetData { |
444 | { | ||
445 | u32 dwResult; | 429 | u32 dwResult; |
446 | u8 ucDebugData[256]; | 430 | u8 ucDebugData[256]; |
447 | } __attribute__((packed)) tmComResDebugGetData_t; | 431 | } __attribute__((packed)); |
448 | 432 | ||
449 | typedef struct | 433 | struct tmFwInfoStruct { |
450 | { | ||
451 | u32 status; | 434 | u32 status; |
452 | u32 mode; | 435 | u32 mode; |
453 | u32 devicespec; | 436 | u32 devicespec; |
@@ -456,5 +439,4 @@ typedef struct | |||
456 | u32 RemainHeap; | 439 | u32 RemainHeap; |
457 | u32 CPUClock; | 440 | u32 CPUClock; |
458 | u32 RAMSpeed; | 441 | u32 RAMSpeed; |
459 | } __attribute__((packed)) tmFwInfoStruct_t; | 442 | } __attribute__((packed)); |
460 | |||
diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/video/saa7164/saa7164-vbi.c index f6211c91b88e..6f6ea52a48b1 100644 --- a/drivers/media/video/saa7164/saa7164-vbi.c +++ b/drivers/media/video/saa7164/saa7164-vbi.c | |||
@@ -102,7 +102,7 @@ static int saa7164_vbi_buffers_alloc(struct saa7164_port *port) | |||
102 | struct saa7164_dev *dev = port->dev; | 102 | struct saa7164_dev *dev = port->dev; |
103 | struct saa7164_buffer *buf; | 103 | struct saa7164_buffer *buf; |
104 | struct saa7164_user_buffer *ubuf; | 104 | struct saa7164_user_buffer *ubuf; |
105 | tmHWStreamParameters_t *params = &port->hw_streamingparams; | 105 | struct tmHWStreamParameters *params = &port->hw_streamingparams; |
106 | int result = -ENODEV, i; | 106 | int result = -ENODEV, i; |
107 | int len = 0; | 107 | int len = 0; |
108 | 108 | ||
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index 5ff79ab04405..99eb94254a1a 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h | |||
@@ -343,10 +343,10 @@ struct saa7164_port { | |||
343 | /* --- Generic port attributes --- */ | 343 | /* --- Generic port attributes --- */ |
344 | 344 | ||
345 | /* HW stream parameters */ | 345 | /* HW stream parameters */ |
346 | tmHWStreamParameters_t hw_streamingparams; | 346 | struct tmHWStreamParameters hw_streamingparams; |
347 | 347 | ||
348 | /* DMA configuration values, is seeded during initialization */ | 348 | /* DMA configuration values, is seeded during initialization */ |
349 | tmComResDMATermDescrHeader_t hwcfg; | 349 | struct tmComResDMATermDescrHeader hwcfg; |
350 | 350 | ||
351 | /* hardware specific registers */ | 351 | /* hardware specific registers */ |
352 | u32 bufcounter; | 352 | u32 bufcounter; |
@@ -400,11 +400,11 @@ struct saa7164_port { | |||
400 | u16 ctl_sharpness; | 400 | u16 ctl_sharpness; |
401 | s8 ctl_volume; | 401 | s8 ctl_volume; |
402 | 402 | ||
403 | tmComResAFeatureDescrHeader_t audfeat; | 403 | struct tmComResAFeatureDescrHeader audfeat; |
404 | tmComResEncoderDescrHeader_t encunit; | 404 | struct tmComResEncoderDescrHeader encunit; |
405 | tmComResProcDescrHeader_t vidproc; | 405 | struct tmComResProcDescrHeader vidproc; |
406 | tmComResExtDevDescrHeader_t ifunit; | 406 | struct tmComResExtDevDescrHeader ifunit; |
407 | tmComResTunerDescrHeader_t tunerunit; | 407 | struct tmComResTunerDescrHeader tunerunit; |
408 | 408 | ||
409 | struct work_struct workenc; | 409 | struct work_struct workenc; |
410 | 410 | ||
@@ -418,7 +418,7 @@ struct saa7164_port { | |||
418 | wait_queue_head_t wait_read; | 418 | wait_queue_head_t wait_read; |
419 | 419 | ||
420 | /* V4L VBI */ | 420 | /* V4L VBI */ |
421 | tmComResVBIFormatDescrHeader_t vbi_fmt_ntsc; | 421 | struct tmComResVBIFormatDescrHeader vbi_fmt_ntsc; |
422 | struct saa7164_vbi_params vbi_params; | 422 | struct saa7164_vbi_params vbi_params; |
423 | 423 | ||
424 | /* Debug */ | 424 | /* Debug */ |
@@ -454,11 +454,11 @@ struct saa7164_dev { | |||
454 | struct saa7164_fw_status fw_status; | 454 | struct saa7164_fw_status fw_status; |
455 | u32 firmwareloaded; | 455 | u32 firmwareloaded; |
456 | 456 | ||
457 | tmComResHWDescr_t hwdesc; | 457 | struct tmComResHWDescr hwdesc; |
458 | tmComResInterfaceDescr_t intfdesc; | 458 | struct tmComResInterfaceDescr intfdesc; |
459 | tmComResBusDescr_t busdesc; | 459 | struct tmComResBusDescr busdesc; |
460 | 460 | ||
461 | tmComResBusInfo_t bus; | 461 | struct tmComResBusInfo bus; |
462 | 462 | ||
463 | /* Interrupt status and ack registers */ | 463 | /* Interrupt status and ack registers */ |
464 | u32 int_status; | 464 | u32 int_status; |
@@ -511,14 +511,14 @@ extern void saa7164_call_i2c_clients(struct saa7164_i2c *bus, | |||
511 | /* saa7164-bus.c */ | 511 | /* saa7164-bus.c */ |
512 | int saa7164_bus_setup(struct saa7164_dev *dev); | 512 | int saa7164_bus_setup(struct saa7164_dev *dev); |
513 | void saa7164_bus_dump(struct saa7164_dev *dev); | 513 | void saa7164_bus_dump(struct saa7164_dev *dev); |
514 | int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf); | 514 | int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf); |
515 | int saa7164_bus_get(struct saa7164_dev *dev, tmComResInfo_t* msg, | 515 | int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, |
516 | void *buf, int peekonly); | 516 | void *buf, int peekonly); |
517 | 517 | ||
518 | /* ----------------------------------------------------------- */ | 518 | /* ----------------------------------------------------------- */ |
519 | /* saa7164-cmd.c */ | 519 | /* saa7164-cmd.c */ |
520 | int saa7164_cmd_send(struct saa7164_dev *dev, | 520 | int saa7164_cmd_send(struct saa7164_dev *dev, |
521 | u8 id, tmComResCmd_t command, u16 controlselector, | 521 | u8 id, enum tmComResCmd command, u16 controlselector, |
522 | u16 size, void *buf); | 522 | u16 size, void *buf); |
523 | void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno); | 523 | void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno); |
524 | int saa7164_irq_dequeue(struct saa7164_dev *dev); | 524 | int saa7164_irq_dequeue(struct saa7164_dev *dev); |
@@ -553,7 +553,7 @@ int saa7164_api_get_videomux(struct saa7164_port *port); | |||
553 | int saa7164_api_set_vbi_format(struct saa7164_port *port); | 553 | int saa7164_api_set_vbi_format(struct saa7164_port *port); |
554 | int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level); | 554 | int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level); |
555 | int saa7164_api_collect_debug(struct saa7164_dev *dev); | 555 | int saa7164_api_collect_debug(struct saa7164_dev *dev); |
556 | int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i); | 556 | int saa7164_api_get_load_info(struct saa7164_dev *dev, struct tmFwInfoStruct *i); |
557 | 557 | ||
558 | /* ----------------------------------------------------------- */ | 558 | /* ----------------------------------------------------------- */ |
559 | /* saa7164-cards.c */ | 559 | /* saa7164-cards.c */ |