aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-blackbird.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index fac67d98a745..4ae3f78cccf2 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -436,7 +436,7 @@ static int memory_write(struct cx88_core *core, u32 address, u32 value)
436 436
437static int memory_read(struct cx88_core *core, u32 address, u32 *value) 437static int memory_read(struct cx88_core *core, u32 address, u32 *value)
438{ 438{
439 int retval; 439 int retval;
440 u32 val; 440 u32 val;
441 441
442 /* Warning: address is dword address (4 bytes) */ 442 /* Warning: address is dword address (4 bytes) */
@@ -605,11 +605,11 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
605 u32 *dataptr; 605 u32 *dataptr;
606 606
607 retval = register_write(dev->core, IVTV_REG_VPU, 0xFFFFFFED); 607 retval = register_write(dev->core, IVTV_REG_VPU, 0xFFFFFFED);
608 retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST); 608 retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
609 retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640); 609 retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);
610 retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A); 610 retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);
611 msleep(1); 611 msleep(1);
612 retval |= register_write(dev->core, IVTV_REG_APU, 0); 612 retval |= register_write(dev->core, IVTV_REG_APU, 0);
613 613
614 if (retval < 0) 614 if (retval < 0)
615 dprintk(0, "Error with register_write\n"); 615 dprintk(0, "Error with register_write\n");
@@ -657,13 +657,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
657 release_firmware(firmware); 657 release_firmware(firmware);
658 dprintk(0, "Firmware upload successful.\n"); 658 dprintk(0, "Firmware upload successful.\n");
659 659
660 retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST); 660 retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
661 retval |= register_read(dev->core, IVTV_REG_SPU, &value); 661 retval |= register_read(dev->core, IVTV_REG_SPU, &value);
662 retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE); 662 retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);
663 msleep(1); 663 msleep(1);
664 664
665 retval |= register_read(dev->core, IVTV_REG_VPU, &value); 665 retval |= register_read(dev->core, IVTV_REG_VPU, &value);
666 retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8); 666 retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
667 667
668 if (retval < 0) 668 if (retval < 0)
669 dprintk(0, "Error with register_write\n"); 669 dprintk(0, "Error with register_write\n");
@@ -876,7 +876,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
876 au_params |= 0; 876 au_params |= 0;
877 } 877 }
878 else if( params->au_bitrate.target >= 878 else if( params->au_bitrate.target >=
879 mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate ) 879 mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
880 { 880 {
881 /* clamp the bitrate to the max supported by the standard */ 881 /* clamp the bitrate to the max supported by the standard */
882 params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate; 882 params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
@@ -942,7 +942,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
942 /* TODO: implement the stream ID stuff: 942 /* TODO: implement the stream ID stuff:
943 ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr, 943 ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
944 ps_size, au_pesid, vi_pesid 944 ps_size, au_pesid, vi_pesid
945 */ 945 */
946} 946}
947#define CHECK_PARAM( name ) ( dev->params.name != params->name ) 947#define CHECK_PARAM( name ) ( dev->params.name != params->name )
948#define IF_PARAM( name ) if( CHECK_PARAM( name ) ) 948#define IF_PARAM( name ) if( CHECK_PARAM( name ) )
@@ -1068,7 +1068,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
1068 au_params |= 0; 1068 au_params |= 0;
1069 } 1069 }
1070 else if( params->au_bitrate.target >= 1070 else if( params->au_bitrate.target >=
1071 mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate ) 1071 mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
1072 { 1072 {
1073 /* clamp the bitrate to the max supported by the standard */ 1073 /* clamp the bitrate to the max supported by the standard */
1074 params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate; 1074 params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
@@ -1150,7 +1150,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
1150 /* TODO: implement the stream ID stuff: 1150 /* TODO: implement the stream ID stuff:
1151 ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr, 1151 ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
1152 ps_size, au_pesid, vi_pesid 1152 ps_size, au_pesid, vi_pesid
1153 */ 1153 */
1154 UPDATE_PARAM( ts_pid_pmt ); 1154 UPDATE_PARAM( ts_pid_pmt );
1155 UPDATE_PARAM( ts_pid_audio ); 1155 UPDATE_PARAM( ts_pid_audio );
1156 UPDATE_PARAM( ts_pid_video ); 1156 UPDATE_PARAM( ts_pid_video );
@@ -1712,7 +1712,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
1712 1712
1713static void __devexit blackbird_remove(struct pci_dev *pci_dev) 1713static void __devexit blackbird_remove(struct pci_dev *pci_dev)
1714{ 1714{
1715 struct cx8802_dev *dev = pci_get_drvdata(pci_dev); 1715 struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
1716 1716
1717 /* blackbird */ 1717 /* blackbird */
1718 blackbird_unregister_video(dev); 1718 blackbird_unregister_video(dev);
@@ -1728,8 +1728,8 @@ static struct pci_device_id cx8802_pci_tbl[] = {
1728 { 1728 {
1729 .vendor = 0x14f1, 1729 .vendor = 0x14f1,
1730 .device = 0x8802, 1730 .device = 0x8802,
1731 .subvendor = PCI_ANY_ID, 1731 .subvendor = PCI_ANY_ID,
1732 .subdevice = PCI_ANY_ID, 1732 .subdevice = PCI_ANY_ID,
1733 },{ 1733 },{
1734 /* --- end of list --- */ 1734 /* --- end of list --- */
1735 } 1735 }
@@ -1737,10 +1737,10 @@ static struct pci_device_id cx8802_pci_tbl[] = {
1737MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl); 1737MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
1738 1738
1739static struct pci_driver blackbird_pci_driver = { 1739static struct pci_driver blackbird_pci_driver = {
1740 .name = "cx88-blackbird", 1740 .name = "cx88-blackbird",
1741 .id_table = cx8802_pci_tbl, 1741 .id_table = cx8802_pci_tbl,
1742 .probe = blackbird_probe, 1742 .probe = blackbird_probe,
1743 .remove = __devexit_p(blackbird_remove), 1743 .remove = __devexit_p(blackbird_remove),
1744 .suspend = cx8802_suspend_common, 1744 .suspend = cx8802_suspend_common,
1745 .resume = cx8802_resume_common, 1745 .resume = cx8802_resume_common,
1746}; 1746};