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

[ALSA] Remove xxx_t typedefs: PCI CS46xx

Modules: CS46xx driver

Remove xxx_t typedefs from the PCI CS46xx driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
3d19f804 af26367f

+935 -900
+42 -43
include/sound/cs46xx.h
··· 1631 1631 #define CS46XX_MIXER_SPDIF_INPUT_ELEMENT 1 1632 1632 #define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT 2 1633 1633 1634 - typedef struct _snd_cs46xx cs46xx_t; 1635 1634 1636 - typedef struct _snd_cs46xx_pcm_t { 1635 + struct snd_cs46xx_pcm { 1637 1636 struct snd_dma_buffer hw_buf; 1638 1637 1639 1638 unsigned int ctl; 1640 1639 unsigned int shift; /* Shift count to trasform frames in bytes */ 1641 - snd_pcm_indirect_t pcm_rec; 1642 - snd_pcm_substream_t *substream; 1640 + struct snd_pcm_indirect pcm_rec; 1641 + struct snd_pcm_substream *substream; 1643 1642 1644 - pcm_channel_descriptor_t * pcm_channel; 1643 + struct dsp_pcm_channel_descriptor * pcm_channel; 1645 1644 1646 1645 int pcm_channel_id; /* Fron Rear, Center Lfe ... */ 1647 - } cs46xx_pcm_t; 1646 + }; 1648 1647 1649 - typedef struct { 1648 + struct snd_cs46xx_region { 1650 1649 char name[24]; 1651 1650 unsigned long base; 1652 1651 void __iomem *remap_addr; 1653 1652 unsigned long size; 1654 1653 struct resource *resource; 1655 - } snd_cs46xx_region_t; 1654 + }; 1656 1655 1657 - struct _snd_cs46xx { 1656 + struct snd_cs46xx { 1658 1657 int irq; 1659 1658 unsigned long ba0_addr; 1660 1659 unsigned long ba1_addr; 1661 1660 union { 1662 1661 struct { 1663 - snd_cs46xx_region_t ba0; 1664 - snd_cs46xx_region_t data0; 1665 - snd_cs46xx_region_t data1; 1666 - snd_cs46xx_region_t pmem; 1667 - snd_cs46xx_region_t reg; 1662 + struct snd_cs46xx_region ba0; 1663 + struct snd_cs46xx_region data0; 1664 + struct snd_cs46xx_region data1; 1665 + struct snd_cs46xx_region pmem; 1666 + struct snd_cs46xx_region reg; 1668 1667 } name; 1669 - snd_cs46xx_region_t idx[5]; 1668 + struct snd_cs46xx_region idx[5]; 1670 1669 } region; 1671 1670 1672 1671 unsigned int mode; ··· 1675 1676 1676 1677 unsigned int ctl; 1677 1678 unsigned int shift; /* Shift count to trasform frames in bytes */ 1678 - snd_pcm_indirect_t pcm_rec; 1679 - snd_pcm_substream_t *substream; 1679 + struct snd_pcm_indirect pcm_rec; 1680 + struct snd_pcm_substream *substream; 1680 1681 } capt; 1681 1682 1682 1683 1683 1684 int nr_ac97_codecs; 1684 - ac97_bus_t *ac97_bus; 1685 - ac97_t *ac97[MAX_NR_AC97]; 1685 + struct snd_ac97_bus *ac97_bus; 1686 + struct snd_ac97 *ac97[MAX_NR_AC97]; 1686 1687 1687 1688 struct pci_dev *pci; 1688 - snd_card_t *card; 1689 - snd_pcm_t *pcm; 1689 + struct snd_card *card; 1690 + struct snd_pcm *pcm; 1690 1691 1691 - snd_rawmidi_t *rmidi; 1692 - snd_rawmidi_substream_t *midi_input; 1693 - snd_rawmidi_substream_t *midi_output; 1692 + struct snd_rawmidi *rmidi; 1693 + struct snd_rawmidi_substream *midi_input; 1694 + struct snd_rawmidi_substream *midi_output; 1694 1695 1695 1696 spinlock_t reg_lock; 1696 1697 unsigned int midcr; 1697 1698 unsigned int uartm; 1698 1699 1699 1700 int amplifier; 1700 - void (*amplifier_ctrl)(cs46xx_t *, int); 1701 - void (*active_ctrl)(cs46xx_t *, int); 1702 - void (*mixer_init)(cs46xx_t *); 1701 + void (*amplifier_ctrl)(struct snd_cs46xx *, int); 1702 + void (*active_ctrl)(struct snd_cs46xx *, int); 1703 + void (*mixer_init)(struct snd_cs46xx *); 1703 1704 1704 1705 int acpi_port; 1705 - snd_kcontrol_t *eapd_switch; /* for amplifier hack */ 1706 + struct snd_kcontrol *eapd_switch; /* for amplifier hack */ 1706 1707 int accept_valid; /* accept mmap valid (for OSS) */ 1707 1708 1708 1709 struct gameport *gameport; ··· 1713 1714 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1714 1715 struct semaphore spos_mutex; 1715 1716 1716 - dsp_spos_instance_t * dsp_spos_instance; 1717 + struct dsp_spos_instance * dsp_spos_instance; 1717 1718 1718 - snd_pcm_t *pcm_rear; 1719 - snd_pcm_t *pcm_center_lfe; 1720 - snd_pcm_t *pcm_iec958; 1719 + struct snd_pcm *pcm_rear; 1720 + struct snd_pcm *pcm_center_lfe; 1721 + struct snd_pcm *pcm_iec958; 1721 1722 #else /* for compatibility */ 1722 - cs46xx_pcm_t *playback_pcm; 1723 + struct snd_cs46xx_pcm *playback_pcm; 1723 1724 unsigned int play_ctl; 1724 1725 #endif 1725 1726 }; 1726 1727 1727 - int snd_cs46xx_create(snd_card_t *card, 1728 + int snd_cs46xx_create(struct snd_card *card, 1728 1729 struct pci_dev *pci, 1729 1730 int external_amp, int thinkpad, 1730 - cs46xx_t **rcodec); 1731 + struct snd_cs46xx **rcodec); 1731 1732 1732 - int snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1733 - int snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1734 - int snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1735 - int snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1736 - int snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device); 1737 - int snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rmidi); 1738 - int snd_cs46xx_start_dsp(cs46xx_t *chip); 1739 - int snd_cs46xx_gameport(cs46xx_t *chip); 1733 + int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm); 1734 + int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm); 1735 + int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm); 1736 + int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm); 1737 + int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device); 1738 + int snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rmidi); 1739 + int snd_cs46xx_start_dsp(struct snd_cs46xx *chip); 1740 + int snd_cs46xx_gameport(struct snd_cs46xx *chip); 1740 1741 1741 1742 #endif /* __SOUND_CS46XX_H */
+71 -74
include/sound/cs46xx_dsp_scb_types.h
··· 41 41 42 42 /* This structs are used internally by the SP */ 43 43 44 - typedef struct _basic_dma_req_t { 44 + struct dsp_basic_dma_req { 45 45 /* DMA Requestor Word 0 (DCW) fields: 46 46 47 47 31 [30-28]27 [26:24] 23 22 21 20 [19:18] [17:16] 15 14 13 12 11 10 9 8 7 6 [5:0] ··· 53 53 u32 dmw; /* DMA Mode Word */ 54 54 u32 saw; /* Source Address Word */ 55 55 u32 daw; /* Destination Address Word */ 56 - } basic_dma_req_t; 56 + }; 57 57 58 - typedef struct _scatter_gather_ext_t { 58 + struct dsp_scatter_gather_ext { 59 59 u32 npaw; /* Next-Page Address Word */ 60 60 61 61 /* DMA Requestor Word 5 (NPCW) fields: ··· 69 69 u32 lbaw; /* Loop-Begin Address Word */ 70 70 u32 nplbaw; /* Next-Page after Loop-Begin Address Word */ 71 71 u32 sgaw; /* Scatter/Gather Address Word */ 72 - } scatter_gather_ext_t; 72 + }; 73 73 74 - typedef struct _volume_control_t { 74 + struct dsp_volume_control { 75 75 ___DSP_DUAL_16BIT_ALLOC( 76 76 rightTarg, /* Target volume for left & right channels */ 77 77 leftTarg ··· 80 80 rightVol, /* Current left & right channel volumes */ 81 81 leftVol 82 82 ) 83 - } volume_control_t; 83 + }; 84 84 85 85 /* Generic stream control block (SCB) structure definition */ 86 - typedef struct _generic_scb_t { 86 + struct dsp_generic_scb { 87 87 /* For streaming I/O, the DSP should never alter any words in the DMA 88 88 requestor or the scatter/gather extension. Only ad hoc DMA request 89 89 streams are free to alter the requestor (currently only occur in the ··· 99 99 100 100 /* Initialized by the host, only modified by DMA 101 101 R/O for the DSP task */ 102 - basic_dma_req_t basic_req; /* Optional */ 102 + struct dsp_basic_dma_req basic_req; /* Optional */ 103 103 104 104 /* Scatter/gather DMA requestor extension (5 ints) 105 105 Initialized by the host, only modified by DMA 106 106 DSP task never needs to even read these. 107 107 */ 108 - scatter_gather_ext_t sg_ext; /* Optional */ 108 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 109 109 110 110 /* Sublist pointer & next stream control block (SCB) link. 111 111 Initialized & modified by the host R/O for the DSP task ··· 179 179 180 180 These two 32-bit words are redefined for wavetable & 3-D voices. 181 181 */ 182 - volume_control_t vol_ctrl_t; /* Optional */ 183 - } generic_scb_t; 182 + struct dsp_volume_control vol_ctrl_t; /* Optional */ 183 + }; 184 184 185 185 186 - typedef struct _spos_control_block_t { 186 + struct dsp_spos_control_block { 187 187 /* WARNING: Certain items in this structure are modified by the host 188 188 Any dword that can be modified by the host, must not be 189 189 modified by the SP as the host can only do atomic dword ··· 273 273 u32 r32_save_for_spurious_int; 274 274 u32 r32_save_for_trap; 275 275 u32 r32_save_for_HFG; 276 - } spos_control_block_t; 276 + }; 277 277 278 278 /* SPB for MIX_TO_OSTREAM algorithm family */ 279 - typedef struct _mix2_ostream_spb_t 279 + struct dsp_mix2_ostream_spb 280 280 { 281 281 /* 16b.16b integer.frac approximation to the 282 282 number of 3 sample triplets to output each ··· 290 290 output triplets since the start of group 291 291 */ 292 292 u32 accumOutTriplets; 293 - } mix2_ostream_spb_t; 293 + }; 294 294 295 295 /* SCB for Timing master algorithm */ 296 - typedef struct _timing_master_scb_t { 296 + struct dsp_timing_master_scb { 297 297 /* First 12 dwords from generic_scb_t */ 298 - basic_dma_req_t basic_req; /* Optional */ 299 - scatter_gather_ext_t sg_ext; /* Optional */ 298 + struct dsp_basic_dma_req basic_req; /* Optional */ 299 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 300 300 ___DSP_DUAL_16BIT_ALLOC( 301 301 next_scb, /* REQUIRED */ 302 302 sub_list_ptr /* REQUIRED */ ··· 358 358 number of samples to output each frame. 359 359 (approximation must be floor, to insure */ 360 360 u32 nsamp_per_frm_q15; 361 - } timing_master_scb_t; 361 + }; 362 362 363 363 /* SCB for CODEC output algorithm */ 364 - typedef struct _codec_output_scb_t { 364 + struct dsp_codec_output_scb { 365 365 /* First 13 dwords from generic_scb_t */ 366 - basic_dma_req_t basic_req; /* Optional */ 367 - scatter_gather_ext_t sg_ext; /* Optional */ 366 + struct dsp_basic_dma_req basic_req; /* Optional */ 367 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 368 368 ___DSP_DUAL_16BIT_ALLOC( 369 369 next_scb, /* REQUIRED */ 370 370 sub_list_ptr /* REQUIRED */ ··· 422 422 reserved, 423 423 last_sub_ptr 424 424 ) 425 - } codec_output_scb_t; 425 + }; 426 426 427 427 /* SCB for CODEC input algorithm */ 428 - typedef struct _codec_input_scb_t { 428 + struct dsp_codec_input_scb { 429 429 /* First 13 dwords from generic_scb_t */ 430 - basic_dma_req_t basic_req; /* Optional */ 431 - scatter_gather_ext_t sg_ext; /* Optional */ 430 + struct dsp_basic_dma_req basic_req; /* Optional */ 431 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 432 432 ___DSP_DUAL_16BIT_ALLOC( 433 433 next_scb, /* REQUIRED */ 434 434 sub_list_ptr /* REQUIRED */ ··· 479 479 ) 480 480 481 481 u32 reserved2; 482 - } codec_input_scb_t; 482 + }; 483 483 484 484 485 - typedef struct _pcm_serial_input_scb_t { 485 + struct dsp_pcm_serial_input_scb { 486 486 /* First 13 dwords from generic_scb_t */ 487 - basic_dma_req_t basic_req; /* Optional */ 488 - scatter_gather_ext_t sg_ext; /* Optional */ 487 + struct dsp_basic_dma_req basic_req; /* Optional */ 488 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 489 489 ___DSP_DUAL_16BIT_ALLOC( 490 490 next_scb, /* REQUIRED */ 491 491 sub_list_ptr /* REQUIRED */ ··· 512 512 ) 513 513 514 514 /* Initialized by the host (host updates target volumes) */ 515 - volume_control_t psi_vol_ctrl; 515 + struct dsp_volume_control psi_vol_ctrl; 516 516 517 - } pcm_serial_input_scb_t; 517 + }; 518 518 519 - typedef struct _src_task_scb_t { 519 + struct dsp_src_task_scb { 520 520 ___DSP_DUAL_16BIT_ALLOC( 521 521 frames_left_in_gof, 522 522 gofs_left_in_sec ··· 571 571 572 572 u32 phiIncr6int_26frac; 573 573 574 - volume_control_t src_vol_ctrl; 575 - } src_task_scb_t; 574 + struct dsp_volume_control src_vol_ctrl; 575 + }; 576 576 577 - typedef struct _decimate_by_pow2_scb_t { 577 + struct dsp_decimate_by_pow2_scb { 578 578 /* decimationFactor = 2, 4, or 8 (larger factors waste too much memory 579 579 when compared to cascading decimators) 580 580 */ ··· 648 648 649 649 u32 dec2_reserved4; 650 650 651 - volume_control_t dec2_vol_ctrl; /* Not used! */ 652 - } decimate_by_pow2_scb_t; 651 + struct dsp_volume_control dec2_vol_ctrl; /* Not used! */ 652 + }; 653 653 654 - typedef struct _vari_decimate_scb_t { 654 + struct dsp_vari_decimate_scb { 655 655 ___DSP_DUAL_16BIT_ALLOC( 656 656 vdec_frames_left_in_gof, 657 657 vdec_gofs_left_in_sec ··· 711 711 712 712 u32 vdec_phi_incr_6int_26frac; 713 713 714 - volume_control_t vdec_vol_ctrl; 715 - } vari_decimate_scb_t; 714 + struct dsp_volume_control vdec_vol_ctrl; 715 + }; 716 716 717 717 718 718 /* SCB for MIX_TO_OSTREAM algorithm family */ 719 - typedef struct _mix2_ostream_scb_t { 719 + struct dsp_mix2_ostream_scb { 720 720 /* First 13 dwords from generic_scb_t */ 721 - basic_dma_req_t basic_req; /* Optional */ 722 - scatter_gather_ext_t sg_ext; /* Optional */ 721 + struct dsp_basic_dma_req basic_req; /* Optional */ 722 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 723 723 ___DSP_DUAL_16BIT_ALLOC( 724 724 next_scb, /* REQUIRED */ 725 725 sub_list_ptr /* REQUIRED */ ··· 758 758 const_FFFF, 759 759 const_zero 760 760 ) 761 - } mix2_ostream_scb_t; 761 + }; 762 762 763 763 764 764 /* SCB for S16_MIX algorithm */ 765 - typedef struct _mix_only_scb_t { 765 + struct dsp_mix_only_scb { 766 766 /* First 13 dwords from generic_scb_t */ 767 - basic_dma_req_t basic_req; /* Optional */ 768 - scatter_gather_ext_t sg_ext; /* Optional */ 767 + struct dsp_basic_dma_req basic_req; /* Optional */ 768 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 769 769 ___DSP_DUAL_16BIT_ALLOC( 770 770 next_scb, /* REQUIRED */ 771 771 sub_list_ptr /* REQUIRED */ ··· 780 780 u32 strm_buf_ptr; /* REQUIRED */ 781 781 782 782 u32 reserved; 783 - volume_control_t vol_ctrl; 784 - } mix_only_scb_t; 783 + struct dsp_volume_control vol_ctrl; 784 + }; 785 785 786 786 /* SCB for the async. CODEC input algorithm */ 787 - typedef struct _async_codec_input_scb_t { 787 + struct dsp_async_codec_input_scb { 788 788 u32 io_free2; 789 789 790 790 u32 io_current_total; ··· 837 837 ) 838 838 839 839 u32 i_free; 840 - } async_codec_input_scb_t; 840 + }; 841 841 842 842 843 843 /* SCB for the SP/DIF CODEC input and output */ 844 - typedef struct _spdifiscb_t { 844 + struct dsp_spdifiscb { 845 845 ___DSP_DUAL_16BIT_ALLOC( 846 846 status_ptr, 847 847 status_start_ptr ··· 895 895 ) 896 896 897 897 u32 free1; 898 - } spdifiscb_t; 898 + }; 899 899 900 900 901 901 /* SCB for the SP/DIF CODEC input and output */ 902 - typedef struct _spdifoscb_t { 903 - 902 + struct dsp_spdifoscb { 904 903 905 904 u32 free2; 906 905 ··· 940 941 ) 941 942 942 943 u32 free1; 943 - } spdifoscb_t; 944 + }; 944 945 945 946 946 - 947 - typedef struct _asynch_fg_rx_scb_t { 947 + struct dsp_asynch_fg_rx_scb { 948 948 ___DSP_DUAL_16BIT_ALLOC( 949 949 bot_buf_mask, 950 950 buf_Mask ··· 991 993 right_vol, 992 994 left_vol 993 995 ) 994 - } asynch_fg_rx_scb_t; 996 + }; 995 997 996 998 997 - 998 - typedef struct _asynch_fg_tx_scb_t { 999 + struct dsp_asynch_fg_tx_scb { 999 1000 ___DSP_DUAL_16BIT_ALLOC( 1000 1001 not_buf_mask, 1001 1002 buf_mask ··· 1049 1052 unused_right_vol, 1050 1053 unused_left_vol 1051 1054 ) 1052 - } asynch_fg_tx_scb_t; 1055 + }; 1053 1056 1054 1057 1055 - typedef struct _output_snoop_scb_t { 1058 + struct dsp_output_snoop_scb { 1056 1059 /* First 13 dwords from generic_scb_t */ 1057 - basic_dma_req_t basic_req; /* Optional */ 1058 - scatter_gather_ext_t sg_ext; /* Optional */ 1060 + struct dsp_basic_dma_req basic_req; /* Optional */ 1061 + struct dsp_scatter_gather_ext sg_ext; /* Optional */ 1059 1062 ___DSP_DUAL_16BIT_ALLOC( 1060 1063 next_scb, /* REQUIRED */ 1061 1064 sub_list_ptr /* REQUIRED */ ··· 1080 1083 reserved, 1081 1084 input_scb 1082 1085 ) 1083 - } output_snoop_scb_t; 1086 + }; 1084 1087 1085 - typedef struct _spio_write_scb_t { 1088 + struct dsp_spio_write_scb { 1086 1089 ___DSP_DUAL_16BIT_ALLOC( 1087 1090 address1, 1088 1091 address2 ··· 1119 1122 ) 1120 1123 1121 1124 u32 unused3[5]; 1122 - } spio_write_scb_t; 1125 + }; 1123 1126 1124 - typedef struct _magic_snoop_task_t { 1127 + struct dsp_magic_snoop_task { 1125 1128 u32 i0; 1126 1129 u32 i1; 1127 1130 ··· 1152 1155 1153 1156 u32 i8; 1154 1157 1155 - volume_control_t vdec_vol_ctrl; 1156 - } magic_snoop_task_t; 1158 + struct dsp_volume_control vdec_vol_ctrl; 1159 + }; 1157 1160 1158 1161 1159 - typedef struct _filter_scb_t { 1162 + struct dsp_filter_scb { 1160 1163 ___DSP_DUAL_16BIT_ALLOC( 1161 1164 a0_right, /* 0x00 */ 1162 1165 a0_left ··· 1209 1212 b2_right, /* 0x0F */ 1210 1213 b2_left 1211 1214 ) 1212 - } filter_scb_t; 1215 + }; 1213 1216 #endif /* __DSP_SCB_TYPES_H__ */
+58 -61
include/sound/cs46xx_dsp_spos.h
··· 65 65 #define DSP_SPDIF_STATUS_HW_ENABLED 4 66 66 #define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8 67 67 68 - struct _dsp_module_desc_t; 69 - 70 - typedef struct _symbol_entry_t { 68 + struct dsp_symbol_entry { 71 69 u32 address; 72 70 char symbol_name[DSP_MAX_SYMBOL_NAME]; 73 71 int symbol_type; 74 72 75 73 /* initialized by driver */ 76 - struct _dsp_module_desc_t * module; 74 + struct dsp_module_desc * module; 77 75 int deleted; 78 - } symbol_entry_t; 76 + }; 79 77 80 - typedef struct _symbol_desc_t { 78 + struct dsp_symbol_desc { 81 79 int nsymbols; 82 80 83 - symbol_entry_t * symbols; 81 + struct dsp_symbol_entry *symbols; 84 82 85 83 /* initialized by driver */ 86 84 int highest_frag_index; 87 - } symbol_desc_t; 85 + }; 88 86 89 - 90 - typedef struct _segment_desc_t { 87 + struct dsp_segment_desc { 91 88 int segment_type; 92 89 u32 offset; 93 90 u32 size; 94 91 u32 * data; 95 - } segment_desc_t; 92 + }; 96 93 97 - typedef struct _dsp_module_desc_t { 94 + struct dsp_module_desc { 98 95 char * module_name; 99 - symbol_desc_t symbol_table; 96 + struct dsp_symbol_desc symbol_table; 100 97 int nsegments; 101 - segment_desc_t * segments; 98 + struct dsp_segment_desc * segments; 102 99 103 100 /* initialized by driver */ 104 101 u32 overlay_begin_address; 105 102 u32 load_address; 106 103 int nfixups; 107 - } dsp_module_desc_t; 104 + }; 108 105 109 - typedef struct _dsp_scb_descriptor_t { 106 + struct dsp_scb_descriptor { 110 107 char scb_name[DSP_MAX_SCB_NAME]; 111 108 u32 address; 112 109 int index; 113 110 114 - struct _dsp_scb_descriptor_t * sub_list_ptr; 115 - struct _dsp_scb_descriptor_t * next_scb_ptr; 116 - struct _dsp_scb_descriptor_t * parent_scb_ptr; 111 + struct dsp_scb_descriptor * sub_list_ptr; 112 + struct dsp_scb_descriptor * next_scb_ptr; 113 + struct dsp_scb_descriptor * parent_scb_ptr; 117 114 118 - symbol_entry_t * task_entry; 119 - symbol_entry_t * scb_symbol; 115 + struct dsp_symbol_entry * task_entry; 116 + struct dsp_symbol_entry * scb_symbol; 120 117 121 - snd_info_entry_t *proc_info; 118 + struct snd_info_entry *proc_info; 122 119 int ref_count; 123 120 spinlock_t lock; 124 121 125 122 int deleted; 126 - } dsp_scb_descriptor_t; 123 + }; 127 124 128 - typedef struct _dsp_task_descriptor_t { 125 + struct dsp_task_descriptor { 129 126 char task_name[DSP_MAX_TASK_NAME]; 130 127 int size; 131 128 u32 address; 132 129 int index; 133 - } dsp_task_descriptor_t; 130 + }; 134 131 135 - typedef struct _pcm_channel_descriptor_t { 132 + struct dsp_pcm_channel_descriptor { 136 133 int active; 137 134 int src_slot; 138 135 int pcm_slot; 139 136 u32 sample_rate; 140 137 u32 unlinked; 141 - dsp_scb_descriptor_t * pcm_reader_scb; 142 - dsp_scb_descriptor_t * src_scb; 143 - dsp_scb_descriptor_t * mixer_scb; 138 + struct dsp_scb_descriptor * pcm_reader_scb; 139 + struct dsp_scb_descriptor * src_scb; 140 + struct dsp_scb_descriptor * mixer_scb; 144 141 145 142 void * private_data; 146 - } pcm_channel_descriptor_t; 143 + }; 147 144 148 - typedef struct _dsp_spos_instance_t { 149 - symbol_desc_t symbol_table; /* currently availble loaded symbols in SP */ 145 + struct dsp_spos_instance { 146 + struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */ 150 147 151 148 int nmodules; 152 - dsp_module_desc_t * modules; /* modules loaded into SP */ 149 + struct dsp_module_desc * modules; /* modules loaded into SP */ 153 150 154 - segment_desc_t code; 151 + struct dsp_segment_desc code; 155 152 156 153 /* Main PCM playback mixer */ 157 - dsp_scb_descriptor_t * master_mix_scb; 154 + struct dsp_scb_descriptor * master_mix_scb; 158 155 u16 dac_volume_right; 159 156 u16 dac_volume_left; 160 157 161 158 /* Rear/surround PCM playback mixer */ 162 - dsp_scb_descriptor_t * rear_mix_scb; 159 + struct dsp_scb_descriptor * rear_mix_scb; 163 160 164 161 /* Center/LFE mixer */ 165 - dsp_scb_descriptor_t * center_lfe_mix_scb; 162 + struct dsp_scb_descriptor * center_lfe_mix_scb; 166 163 167 164 int npcm_channels; 168 165 int nsrc_scb; 169 - pcm_channel_descriptor_t pcm_channels[DSP_MAX_PCM_CHANNELS]; 166 + struct dsp_pcm_channel_descriptor pcm_channels[DSP_MAX_PCM_CHANNELS]; 170 167 int src_scb_slots[DSP_MAX_SRC_NR]; 171 168 172 169 /* cache this symbols */ 173 - symbol_entry_t * null_algorithm; /* used by PCMreaderSCB's */ 174 - symbol_entry_t * s16_up; /* used by SRCtaskSCB's */ 170 + struct dsp_symbol_entry * null_algorithm; /* used by PCMreaderSCB's */ 171 + struct dsp_symbol_entry * s16_up; /* used by SRCtaskSCB's */ 175 172 176 173 /* proc fs */ 177 - snd_card_t * snd_card; 178 - snd_info_entry_t * proc_dsp_dir; 179 - snd_info_entry_t * proc_sym_info_entry; 180 - snd_info_entry_t * proc_modules_info_entry; 181 - snd_info_entry_t * proc_parameter_dump_info_entry; 182 - snd_info_entry_t * proc_sample_dump_info_entry; 174 + struct snd_card *snd_card; 175 + struct snd_info_entry * proc_dsp_dir; 176 + struct snd_info_entry * proc_sym_info_entry; 177 + struct snd_info_entry * proc_modules_info_entry; 178 + struct snd_info_entry * proc_parameter_dump_info_entry; 179 + struct snd_info_entry * proc_sample_dump_info_entry; 183 180 184 181 /* SCB's descriptors */ 185 182 int nscb; 186 183 int scb_highest_frag_index; 187 - dsp_scb_descriptor_t scbs[DSP_MAX_SCB_DESC]; 188 - snd_info_entry_t * proc_scb_info_entry; 189 - dsp_scb_descriptor_t * the_null_scb; 184 + struct dsp_scb_descriptor scbs[DSP_MAX_SCB_DESC]; 185 + struct snd_info_entry * proc_scb_info_entry; 186 + struct dsp_scb_descriptor * the_null_scb; 190 187 191 188 /* Task's descriptors */ 192 189 int ntask; 193 - dsp_task_descriptor_t tasks[DSP_MAX_TASK_DESC]; 194 - snd_info_entry_t * proc_task_info_entry; 190 + struct dsp_task_descriptor tasks[DSP_MAX_TASK_DESC]; 191 + struct snd_info_entry * proc_task_info_entry; 195 192 196 193 /* SPDIF status */ 197 194 int spdif_status_out; ··· 201 204 unsigned int spdif_csuv_stream; 202 205 203 206 /* SPDIF input sample rate converter */ 204 - dsp_scb_descriptor_t * spdif_in_src; 207 + struct dsp_scb_descriptor * spdif_in_src; 205 208 /* SPDIF input asynch. receiver */ 206 - dsp_scb_descriptor_t * asynch_rx_scb; 209 + struct dsp_scb_descriptor * asynch_rx_scb; 207 210 208 211 /* Capture record mixer SCB */ 209 - dsp_scb_descriptor_t * record_mixer_scb; 212 + struct dsp_scb_descriptor * record_mixer_scb; 210 213 211 214 /* CODEC input SCB */ 212 - dsp_scb_descriptor_t * codec_in_scb; 215 + struct dsp_scb_descriptor * codec_in_scb; 213 216 214 217 /* reference snooper */ 215 - dsp_scb_descriptor_t * ref_snoop_scb; 218 + struct dsp_scb_descriptor * ref_snoop_scb; 216 219 217 220 /* SPDIF output PCM reference */ 218 - dsp_scb_descriptor_t * spdif_pcm_input_scb; 221 + struct dsp_scb_descriptor * spdif_pcm_input_scb; 219 222 220 223 /* asynch TX task */ 221 - dsp_scb_descriptor_t * asynch_tx_scb; 224 + struct dsp_scb_descriptor * asynch_tx_scb; 222 225 223 226 /* record sources */ 224 - dsp_scb_descriptor_t * pcm_input; 225 - dsp_scb_descriptor_t * adc_input; 227 + struct dsp_scb_descriptor * pcm_input; 228 + struct dsp_scb_descriptor * adc_input; 226 229 227 230 int spdif_in_sample_rate; 228 - } dsp_spos_instance_t; 231 + }; 229 232 230 233 #endif /* __DSP_SPOS_H__ */
+17 -18
include/sound/cs46xx_dsp_task_types.h
··· 71 71 at the end of BG */ 72 72 73 73 /* Minimal context save area for Hyper Forground */ 74 - typedef struct _hf_save_area_t { 74 + struct dsp_hf_save_area { 75 75 u32 r10_save; 76 76 u32 r54_save; 77 77 u32 r98_save; ··· 96 96 rsa2Save 97 97 ) 98 98 /* saved as part of HFG context */ 99 - } hf_save_area_t; 99 + }; 100 100 101 101 102 102 /* Task link data structure */ 103 - typedef struct _tree_link_t { 103 + struct dsp_tree_link { 104 104 ___DSP_DUAL_16BIT_ALLOC( 105 105 /* Pointer to sibling task control block */ 106 106 next_scb, ··· 114 114 /* Pointer to local data */ 115 115 this_spb 116 116 ) 117 - } tree_link_t; 117 + }; 118 118 119 119 120 - typedef struct _task_tree_data_t { 120 + struct dsp_task_tree_data { 121 121 ___DSP_DUAL_16BIT_ALLOC( 122 122 /* Initial tock count; controls task tree execution rate */ 123 123 tock_count_limit, ··· 155 155 data_stack_base_ptr 156 156 ) 157 157 158 - } task_tree_data_t; 158 + }; 159 159 160 160 161 - 162 - typedef struct _interval_timer_data_t 161 + struct dsp_interval_timer_data 163 162 { 164 163 /* These data items have the same relative locations to those */ 165 164 ___DSP_DUAL_16BIT_ALLOC( ··· 171 172 num_FG_ticks_this_interval, 172 173 num_intervals 173 174 ) 174 - } interval_timer_data_t; 175 + }; 175 176 176 177 177 178 /* This structure contains extra storage for the task tree 178 179 Currently, this additional data is related only to a full context save */ 179 - typedef struct _task_tree_context_block_t { 180 + struct dsp_task_tree_context_block { 180 181 /* Up to 10 values are saved onto the stack. 8 for the task tree, 1 for 181 182 The access to the context switch (call or interrupt), and 1 spare that 182 183 users should never use. This last may be required by the system */ ··· 237 238 u32 saveaux2xaux3x; 238 239 u32 savershouthl; 239 240 u32 savershoutxmacmode; 240 - } task_tree_context_block_t; 241 + }; 241 242 242 243 243 - typedef struct _task_tree_control_block_t { 244 - hf_save_area_t context; 245 - tree_link_t links; 246 - task_tree_data_t data; 247 - task_tree_context_block_t context_blk; 248 - interval_timer_data_t int_timer; 249 - } task_tree_control_block_t; 244 + struct dsp_task_tree_control_block { 245 + struct dsp_hf_save_area context; 246 + struct dsp_tree_link links; 247 + struct dsp_task_tree_data data; 248 + struct dsp_task_tree_context_block context_blk; 249 + struct dsp_interval_timer_data int_timer; 250 + }; 250 251 251 252 252 253 #endif /* __DSP_TASK_TYPES_H__ */
+2 -2
sound/pci/cs46xx/cs46xx.c
··· 78 78 const struct pci_device_id *pci_id) 79 79 { 80 80 static int dev; 81 - snd_card_t *card; 82 - cs46xx_t *chip; 81 + struct snd_card *card; 82 + struct snd_cs46xx *chip; 83 83 int err; 84 84 85 85 if (dev >= SNDRV_CARDS)
+294 -290
sound/pci/cs46xx/cs46xx_lib.c
··· 66 66 #include "cs46xx_lib.h" 67 67 #include "dsp_spos.h" 68 68 69 - static void amp_voyetra(cs46xx_t *chip, int change); 69 + static void amp_voyetra(struct snd_cs46xx *chip, int change); 70 70 71 71 #ifdef CONFIG_SND_CS46XX_NEW_DSP 72 - static snd_pcm_ops_t snd_cs46xx_playback_rear_ops; 73 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops; 74 - static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops; 75 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops; 76 - static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops; 77 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops; 72 + static struct snd_pcm_ops snd_cs46xx_playback_rear_ops; 73 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops; 74 + static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops; 75 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops; 76 + static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops; 77 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops; 78 78 #endif 79 79 80 - static snd_pcm_ops_t snd_cs46xx_playback_ops; 81 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; 82 - static snd_pcm_ops_t snd_cs46xx_capture_ops; 83 - static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; 80 + static struct snd_pcm_ops snd_cs46xx_playback_ops; 81 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops; 82 + static struct snd_pcm_ops snd_cs46xx_capture_ops; 83 + static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops; 84 84 85 - static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, 85 + static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, 86 86 unsigned short reg, 87 87 int codec_index) 88 88 { ··· 204 204 return result; 205 205 } 206 206 207 - static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, 207 + static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97, 208 208 unsigned short reg) 209 209 { 210 - cs46xx_t *chip = ac97->private_data; 210 + struct snd_cs46xx *chip = ac97->private_data; 211 211 unsigned short val; 212 212 int codec_index = ac97->num; 213 213 ··· 221 221 } 222 222 223 223 224 - static void snd_cs46xx_codec_write(cs46xx_t *chip, 224 + static void snd_cs46xx_codec_write(struct snd_cs46xx *chip, 225 225 unsigned short reg, 226 226 unsigned short val, 227 227 int codec_index) ··· 286 286 chip->active_ctrl(chip, -1); 287 287 } 288 288 289 - static void snd_cs46xx_ac97_write(ac97_t *ac97, 289 + static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97, 290 290 unsigned short reg, 291 291 unsigned short val) 292 292 { 293 - cs46xx_t *chip = ac97->private_data; 293 + struct snd_cs46xx *chip = ac97->private_data; 294 294 int codec_index = ac97->num; 295 295 296 296 snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX || ··· 305 305 * Chip initialization 306 306 */ 307 307 308 - int snd_cs46xx_download(cs46xx_t *chip, 308 + int snd_cs46xx_download(struct snd_cs46xx *chip, 309 309 u32 *src, 310 310 unsigned long offset, 311 311 unsigned long len) ··· 334 334 #include "imgs/cwcbinhack.h" 335 335 #include "imgs/cwcdma.h" 336 336 337 - int snd_cs46xx_clear_BA1(cs46xx_t *chip, 337 + int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, 338 338 unsigned long offset, 339 339 unsigned long len) 340 340 { ··· 358 358 359 359 #include "cs46xx_image.h" 360 360 361 - int snd_cs46xx_download_image(cs46xx_t *chip) 361 + int snd_cs46xx_download_image(struct snd_cs46xx *chip) 362 362 { 363 363 int idx, err; 364 364 unsigned long offset = 0; ··· 379 379 * Chip reset 380 380 */ 381 381 382 - static void snd_cs46xx_reset(cs46xx_t *chip) 382 + static void snd_cs46xx_reset(struct snd_cs46xx *chip) 383 383 { 384 384 int idx; 385 385 ··· 408 408 snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); 409 409 } 410 410 411 - static int cs46xx_wait_for_fifo(cs46xx_t * chip,int retry_timeout) 411 + static int cs46xx_wait_for_fifo(struct snd_cs46xx * chip,int retry_timeout) 412 412 { 413 413 u32 i, status = 0; 414 414 /* ··· 432 432 return 0; 433 433 } 434 434 435 - static void snd_cs46xx_clear_serial_FIFOs(cs46xx_t *chip) 435 + static void snd_cs46xx_clear_serial_FIFOs(struct snd_cs46xx *chip) 436 436 { 437 437 int idx, powerdown = 0; 438 438 unsigned int tmp; ··· 486 486 snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); 487 487 } 488 488 489 - static void snd_cs46xx_proc_start(cs46xx_t *chip) 489 + static void snd_cs46xx_proc_start(struct snd_cs46xx *chip) 490 490 { 491 491 int cnt; 492 492 ··· 513 513 snd_printk(KERN_ERR "SPCR_RUNFR never reset\n"); 514 514 } 515 515 516 - static void snd_cs46xx_proc_stop(cs46xx_t *chip) 516 + static void snd_cs46xx_proc_stop(struct snd_cs46xx *chip) 517 517 { 518 518 /* 519 519 * Turn off the run, run at frame, and DMA enable bits in the local copy of ··· 528 528 529 529 #define GOF_PER_SEC 200 530 530 531 - static void snd_cs46xx_set_play_sample_rate(cs46xx_t *chip, unsigned int rate) 531 + static void snd_cs46xx_set_play_sample_rate(struct snd_cs46xx *chip, unsigned int rate) 532 532 { 533 533 unsigned long flags; 534 534 unsigned int tmp1, tmp2; ··· 574 574 spin_unlock_irqrestore(&chip->reg_lock, flags); 575 575 } 576 576 577 - static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate) 577 + static void snd_cs46xx_set_capture_sample_rate(struct snd_cs46xx *chip, unsigned int rate) 578 578 { 579 579 unsigned long flags; 580 580 unsigned int phiIncr, coeffIncr, tmp1, tmp2; ··· 684 684 * PCM part 685 685 */ 686 686 687 - static void snd_cs46xx_pb_trans_copy(snd_pcm_substream_t *substream, 688 - snd_pcm_indirect_t *rec, size_t bytes) 687 + static void snd_cs46xx_pb_trans_copy(struct snd_pcm_substream *substream, 688 + struct snd_pcm_indirect *rec, size_t bytes) 689 689 { 690 - snd_pcm_runtime_t *runtime = substream->runtime; 691 - cs46xx_pcm_t * cpcm = runtime->private_data; 690 + struct snd_pcm_runtime *runtime = substream->runtime; 691 + struct snd_cs46xx_pcm * cpcm = runtime->private_data; 692 692 memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes); 693 693 } 694 694 695 - static int snd_cs46xx_playback_transfer(snd_pcm_substream_t *substream) 695 + static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream) 696 696 { 697 - snd_pcm_runtime_t *runtime = substream->runtime; 698 - cs46xx_pcm_t * cpcm = runtime->private_data; 697 + struct snd_pcm_runtime *runtime = substream->runtime; 698 + struct snd_cs46xx_pcm * cpcm = runtime->private_data; 699 699 snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy); 700 700 return 0; 701 701 } 702 702 703 - static void snd_cs46xx_cp_trans_copy(snd_pcm_substream_t *substream, 704 - snd_pcm_indirect_t *rec, size_t bytes) 703 + static void snd_cs46xx_cp_trans_copy(struct snd_pcm_substream *substream, 704 + struct snd_pcm_indirect *rec, size_t bytes) 705 705 { 706 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 707 - snd_pcm_runtime_t *runtime = substream->runtime; 706 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 707 + struct snd_pcm_runtime *runtime = substream->runtime; 708 708 memcpy(runtime->dma_area + rec->sw_data, 709 709 chip->capt.hw_buf.area + rec->hw_data, bytes); 710 710 } 711 711 712 - static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream) 712 + static int snd_cs46xx_capture_transfer(struct snd_pcm_substream *substream) 713 713 { 714 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 714 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 715 715 snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, snd_cs46xx_cp_trans_copy); 716 716 return 0; 717 717 } 718 718 719 - static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t * substream) 719 + static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(struct snd_pcm_substream *substream) 720 720 { 721 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 721 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 722 722 size_t ptr; 723 - cs46xx_pcm_t *cpcm = substream->runtime->private_data; 723 + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; 724 724 snd_assert (cpcm->pcm_channel,return -ENXIO); 725 725 726 726 #ifdef CONFIG_SND_CS46XX_NEW_DSP ··· 732 732 return ptr >> cpcm->shift; 733 733 } 734 734 735 - static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_t * substream) 735 + static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(struct snd_pcm_substream *substream) 736 736 { 737 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 737 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 738 738 size_t ptr; 739 - cs46xx_pcm_t *cpcm = substream->runtime->private_data; 739 + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; 740 740 741 741 #ifdef CONFIG_SND_CS46XX_NEW_DSP 742 742 snd_assert (cpcm->pcm_channel,return -ENXIO); ··· 748 748 return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr); 749 749 } 750 750 751 - static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(snd_pcm_substream_t * substream) 751 + static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(struct snd_pcm_substream *substream) 752 752 { 753 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 753 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 754 754 size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; 755 755 return ptr >> chip->capt.shift; 756 756 } 757 757 758 - static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(snd_pcm_substream_t * substream) 758 + static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(struct snd_pcm_substream *substream) 759 759 { 760 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 760 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 761 761 size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; 762 762 return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr); 763 763 } 764 764 765 - static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, 765 + static int snd_cs46xx_playback_trigger(struct snd_pcm_substream *substream, 766 766 int cmd) 767 767 { 768 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 769 - /*snd_pcm_runtime_t *runtime = substream->runtime;*/ 768 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 769 + /*struct snd_pcm_runtime *runtime = substream->runtime;*/ 770 770 int result = 0; 771 771 772 772 #ifdef CONFIG_SND_CS46XX_NEW_DSP 773 - cs46xx_pcm_t *cpcm = substream->runtime->private_data; 773 + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; 774 774 if (! cpcm->pcm_channel) { 775 775 return -ENXIO; 776 776 } ··· 827 827 return result; 828 828 } 829 829 830 - static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream, 830 + static int snd_cs46xx_capture_trigger(struct snd_pcm_substream *substream, 831 831 int cmd) 832 832 { 833 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 833 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 834 834 unsigned int tmp; 835 835 int result = 0; 836 836 ··· 858 858 } 859 859 860 860 #ifdef CONFIG_SND_CS46XX_NEW_DSP 861 - static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm, 861 + static int _cs46xx_adjust_sample_rate (struct snd_cs46xx *chip, struct snd_cs46xx_pcm *cpcm, 862 862 int sample_rate) 863 863 { 864 864 ··· 893 893 #endif 894 894 895 895 896 - static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream, 897 - snd_pcm_hw_params_t * hw_params) 896 + static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream, 897 + struct snd_pcm_hw_params *hw_params) 898 898 { 899 - snd_pcm_runtime_t *runtime = substream->runtime; 900 - cs46xx_pcm_t *cpcm; 899 + struct snd_pcm_runtime *runtime = substream->runtime; 900 + struct snd_cs46xx_pcm *cpcm; 901 901 int err; 902 902 #ifdef CONFIG_SND_CS46XX_NEW_DSP 903 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 903 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 904 904 int sample_rate = params_rate(hw_params); 905 905 int period_size = params_period_bytes(hw_params); 906 906 #endif ··· 995 995 return 0; 996 996 } 997 997 998 - static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream) 998 + static int snd_cs46xx_playback_hw_free(struct snd_pcm_substream *substream) 999 999 { 1000 - /*cs46xx_t *chip = snd_pcm_substream_chip(substream);*/ 1001 - snd_pcm_runtime_t *runtime = substream->runtime; 1002 - cs46xx_pcm_t *cpcm; 1000 + /*struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);*/ 1001 + struct snd_pcm_runtime *runtime = substream->runtime; 1002 + struct snd_cs46xx_pcm *cpcm; 1003 1003 1004 1004 cpcm = runtime->private_data; 1005 1005 ··· 1017 1017 return 0; 1018 1018 } 1019 1019 1020 - static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream) 1020 + static int snd_cs46xx_playback_prepare(struct snd_pcm_substream *substream) 1021 1021 { 1022 1022 unsigned int tmp; 1023 1023 unsigned int pfie; 1024 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1025 - snd_pcm_runtime_t *runtime = substream->runtime; 1026 - cs46xx_pcm_t *cpcm; 1024 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1025 + struct snd_pcm_runtime *runtime = substream->runtime; 1026 + struct snd_cs46xx_pcm *cpcm; 1027 1027 1028 1028 cpcm = runtime->private_data; 1029 1029 ··· 1087 1087 return 0; 1088 1088 } 1089 1089 1090 - static int snd_cs46xx_capture_hw_params(snd_pcm_substream_t * substream, 1091 - snd_pcm_hw_params_t * hw_params) 1090 + static int snd_cs46xx_capture_hw_params(struct snd_pcm_substream *substream, 1091 + struct snd_pcm_hw_params *hw_params) 1092 1092 { 1093 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1094 - snd_pcm_runtime_t *runtime = substream->runtime; 1093 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1094 + struct snd_pcm_runtime *runtime = substream->runtime; 1095 1095 int err; 1096 1096 1097 1097 #ifdef CONFIG_SND_CS46XX_NEW_DSP ··· 1118 1118 return 0; 1119 1119 } 1120 1120 1121 - static int snd_cs46xx_capture_hw_free(snd_pcm_substream_t * substream) 1121 + static int snd_cs46xx_capture_hw_free(struct snd_pcm_substream *substream) 1122 1122 { 1123 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1124 - snd_pcm_runtime_t *runtime = substream->runtime; 1123 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1124 + struct snd_pcm_runtime *runtime = substream->runtime; 1125 1125 1126 1126 if (runtime->dma_area != chip->capt.hw_buf.area) 1127 1127 snd_pcm_lib_free_pages(substream); ··· 1132 1132 return 0; 1133 1133 } 1134 1134 1135 - static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream) 1135 + static int snd_cs46xx_capture_prepare(struct snd_pcm_substream *substream) 1136 1136 { 1137 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1138 - snd_pcm_runtime_t *runtime = substream->runtime; 1137 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1138 + struct snd_pcm_runtime *runtime = substream->runtime; 1139 1139 1140 1140 snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr); 1141 1141 chip->capt.shift = 2; ··· 1149 1149 1150 1150 static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) 1151 1151 { 1152 - cs46xx_t *chip = dev_id; 1152 + struct snd_cs46xx *chip = dev_id; 1153 1153 u32 status1; 1154 1154 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1155 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1155 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1156 1156 u32 status2; 1157 1157 int i; 1158 - cs46xx_pcm_t *cpcm = NULL; 1158 + struct snd_cs46xx_pcm *cpcm = NULL; 1159 1159 #endif 1160 1160 1161 1161 /* ··· 1239 1239 return IRQ_HANDLED; 1240 1240 } 1241 1241 1242 - static snd_pcm_hardware_t snd_cs46xx_playback = 1242 + static struct snd_pcm_hardware snd_cs46xx_playback = 1243 1243 { 1244 1244 .info = (SNDRV_PCM_INFO_MMAP | 1245 1245 SNDRV_PCM_INFO_INTERLEAVED | ··· 1261 1261 .fifo_size = 0, 1262 1262 }; 1263 1263 1264 - static snd_pcm_hardware_t snd_cs46xx_capture = 1264 + static struct snd_pcm_hardware snd_cs46xx_capture = 1265 1265 { 1266 1266 .info = (SNDRV_PCM_INFO_MMAP | 1267 1267 SNDRV_PCM_INFO_INTERLEAVED | ··· 1285 1285 1286 1286 static unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 }; 1287 1287 1288 - static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { 1288 + static struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = { 1289 1289 .count = ARRAY_SIZE(period_sizes), 1290 1290 .list = period_sizes, 1291 1291 .mask = 0 ··· 1293 1293 1294 1294 #endif 1295 1295 1296 - static void snd_cs46xx_pcm_free_substream(snd_pcm_runtime_t *runtime) 1296 + static void snd_cs46xx_pcm_free_substream(struct snd_pcm_runtime *runtime) 1297 1297 { 1298 1298 kfree(runtime->private_data); 1299 1299 } 1300 1300 1301 - static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pcm_channel_id) 1301 + static int _cs46xx_playback_open_channel (struct snd_pcm_substream *substream,int pcm_channel_id) 1302 1302 { 1303 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1304 - cs46xx_pcm_t * cpcm; 1305 - snd_pcm_runtime_t *runtime = substream->runtime; 1303 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1304 + struct snd_cs46xx_pcm * cpcm; 1305 + struct snd_pcm_runtime *runtime = substream->runtime; 1306 1306 1307 1307 cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL); 1308 1308 if (cpcm == NULL) ··· 1340 1340 return 0; 1341 1341 } 1342 1342 1343 - static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream) 1343 + static int snd_cs46xx_playback_open(struct snd_pcm_substream *substream) 1344 1344 { 1345 1345 snd_printdd("open front channel\n"); 1346 1346 return _cs46xx_playback_open_channel(substream,DSP_PCM_MAIN_CHANNEL); 1347 1347 } 1348 1348 1349 1349 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1350 - static int snd_cs46xx_playback_open_rear(snd_pcm_substream_t * substream) 1350 + static int snd_cs46xx_playback_open_rear(struct snd_pcm_substream *substream) 1351 1351 { 1352 1352 snd_printdd("open rear channel\n"); 1353 1353 1354 1354 return _cs46xx_playback_open_channel(substream,DSP_PCM_REAR_CHANNEL); 1355 1355 } 1356 1356 1357 - static int snd_cs46xx_playback_open_clfe(snd_pcm_substream_t * substream) 1357 + static int snd_cs46xx_playback_open_clfe(struct snd_pcm_substream *substream) 1358 1358 { 1359 1359 snd_printdd("open center - LFE channel\n"); 1360 1360 1361 1361 return _cs46xx_playback_open_channel(substream,DSP_PCM_CENTER_LFE_CHANNEL); 1362 1362 } 1363 1363 1364 - static int snd_cs46xx_playback_open_iec958(snd_pcm_substream_t * substream) 1364 + static int snd_cs46xx_playback_open_iec958(struct snd_pcm_substream *substream) 1365 1365 { 1366 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1366 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1367 1367 1368 1368 snd_printdd("open raw iec958 channel\n"); 1369 1369 ··· 1374 1374 return _cs46xx_playback_open_channel(substream,DSP_IEC958_CHANNEL); 1375 1375 } 1376 1376 1377 - static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream); 1377 + static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream); 1378 1378 1379 - static int snd_cs46xx_playback_close_iec958(snd_pcm_substream_t * substream) 1379 + static int snd_cs46xx_playback_close_iec958(struct snd_pcm_substream *substream) 1380 1380 { 1381 1381 int err; 1382 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1382 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1383 1383 1384 1384 snd_printdd("close raw iec958 channel\n"); 1385 1385 ··· 1393 1393 } 1394 1394 #endif 1395 1395 1396 - static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream) 1396 + static int snd_cs46xx_capture_open(struct snd_pcm_substream *substream) 1397 1397 { 1398 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1398 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1399 1399 1400 1400 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 1401 1401 PAGE_SIZE, &chip->capt.hw_buf) < 0) ··· 1416 1416 return 0; 1417 1417 } 1418 1418 1419 - static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream) 1419 + static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream) 1420 1420 { 1421 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1422 - snd_pcm_runtime_t *runtime = substream->runtime; 1423 - cs46xx_pcm_t * cpcm; 1421 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1422 + struct snd_pcm_runtime *runtime = substream->runtime; 1423 + struct snd_cs46xx_pcm * cpcm; 1424 1424 1425 1425 cpcm = runtime->private_data; 1426 1426 ··· 1445 1445 return 0; 1446 1446 } 1447 1447 1448 - static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream) 1448 + static int snd_cs46xx_capture_close(struct snd_pcm_substream *substream) 1449 1449 { 1450 - cs46xx_t *chip = snd_pcm_substream_chip(substream); 1450 + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); 1451 1451 1452 1452 chip->capt.substream = NULL; 1453 1453 snd_dma_free_pages(&chip->capt.hw_buf); ··· 1457 1457 } 1458 1458 1459 1459 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1460 - static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { 1460 + static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = { 1461 1461 .open = snd_cs46xx_playback_open_rear, 1462 1462 .close = snd_cs46xx_playback_close, 1463 1463 .ioctl = snd_pcm_lib_ioctl, ··· 1468 1468 .pointer = snd_cs46xx_playback_direct_pointer, 1469 1469 }; 1470 1470 1471 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { 1471 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = { 1472 1472 .open = snd_cs46xx_playback_open_rear, 1473 1473 .close = snd_cs46xx_playback_close, 1474 1474 .ioctl = snd_pcm_lib_ioctl, ··· 1480 1480 .ack = snd_cs46xx_playback_transfer, 1481 1481 }; 1482 1482 1483 - static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { 1483 + static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = { 1484 1484 .open = snd_cs46xx_playback_open_clfe, 1485 1485 .close = snd_cs46xx_playback_close, 1486 1486 .ioctl = snd_pcm_lib_ioctl, ··· 1491 1491 .pointer = snd_cs46xx_playback_direct_pointer, 1492 1492 }; 1493 1493 1494 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { 1494 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = { 1495 1495 .open = snd_cs46xx_playback_open_clfe, 1496 1496 .close = snd_cs46xx_playback_close, 1497 1497 .ioctl = snd_pcm_lib_ioctl, ··· 1503 1503 .ack = snd_cs46xx_playback_transfer, 1504 1504 }; 1505 1505 1506 - static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { 1506 + static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = { 1507 1507 .open = snd_cs46xx_playback_open_iec958, 1508 1508 .close = snd_cs46xx_playback_close_iec958, 1509 1509 .ioctl = snd_pcm_lib_ioctl, ··· 1514 1514 .pointer = snd_cs46xx_playback_direct_pointer, 1515 1515 }; 1516 1516 1517 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { 1517 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = { 1518 1518 .open = snd_cs46xx_playback_open_iec958, 1519 1519 .close = snd_cs46xx_playback_close_iec958, 1520 1520 .ioctl = snd_pcm_lib_ioctl, ··· 1528 1528 1529 1529 #endif 1530 1530 1531 - static snd_pcm_ops_t snd_cs46xx_playback_ops = { 1531 + static struct snd_pcm_ops snd_cs46xx_playback_ops = { 1532 1532 .open = snd_cs46xx_playback_open, 1533 1533 .close = snd_cs46xx_playback_close, 1534 1534 .ioctl = snd_pcm_lib_ioctl, ··· 1539 1539 .pointer = snd_cs46xx_playback_direct_pointer, 1540 1540 }; 1541 1541 1542 - static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { 1542 + static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = { 1543 1543 .open = snd_cs46xx_playback_open, 1544 1544 .close = snd_cs46xx_playback_close, 1545 1545 .ioctl = snd_pcm_lib_ioctl, ··· 1551 1551 .ack = snd_cs46xx_playback_transfer, 1552 1552 }; 1553 1553 1554 - static snd_pcm_ops_t snd_cs46xx_capture_ops = { 1554 + static struct snd_pcm_ops snd_cs46xx_capture_ops = { 1555 1555 .open = snd_cs46xx_capture_open, 1556 1556 .close = snd_cs46xx_capture_close, 1557 1557 .ioctl = snd_pcm_lib_ioctl, ··· 1562 1562 .pointer = snd_cs46xx_capture_direct_pointer, 1563 1563 }; 1564 1564 1565 - static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { 1565 + static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = { 1566 1566 .open = snd_cs46xx_capture_open, 1567 1567 .close = snd_cs46xx_capture_close, 1568 1568 .ioctl = snd_pcm_lib_ioctl, ··· 1580 1580 #define MAX_PLAYBACK_CHANNELS 1 1581 1581 #endif 1582 1582 1583 - int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) 1583 + int __devinit snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) 1584 1584 { 1585 - snd_pcm_t *pcm; 1585 + struct snd_pcm *pcm; 1586 1586 int err; 1587 1587 1588 1588 if (rpcm) ··· 1611 1611 1612 1612 1613 1613 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1614 - int __devinit snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) 1614 + int __devinit snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) 1615 1615 { 1616 - snd_pcm_t *pcm; 1616 + struct snd_pcm *pcm; 1617 1617 int err; 1618 1618 1619 1619 if (rpcm) ··· 1640 1640 return 0; 1641 1641 } 1642 1642 1643 - int __devinit snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) 1643 + int __devinit snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) 1644 1644 { 1645 - snd_pcm_t *pcm; 1645 + struct snd_pcm *pcm; 1646 1646 int err; 1647 1647 1648 1648 if (rpcm) ··· 1669 1669 return 0; 1670 1670 } 1671 1671 1672 - int __devinit snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) 1672 + int __devinit snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) 1673 1673 { 1674 - snd_pcm_t *pcm; 1674 + struct snd_pcm *pcm; 1675 1675 int err; 1676 1676 1677 1677 if (rpcm) ··· 1702 1702 /* 1703 1703 * Mixer routines 1704 1704 */ 1705 - static void snd_cs46xx_mixer_free_ac97_bus(ac97_bus_t *bus) 1705 + static void snd_cs46xx_mixer_free_ac97_bus(struct snd_ac97_bus *bus) 1706 1706 { 1707 - cs46xx_t *chip = bus->private_data; 1707 + struct snd_cs46xx *chip = bus->private_data; 1708 1708 1709 1709 chip->ac97_bus = NULL; 1710 1710 } 1711 1711 1712 - static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97) 1712 + static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97) 1713 1713 { 1714 - cs46xx_t *chip = ac97->private_data; 1714 + struct snd_cs46xx *chip = ac97->private_data; 1715 1715 1716 1716 snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) || 1717 1717 (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]), ··· 1725 1725 chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; 1726 1726 } 1727 1727 1728 - static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol, 1729 - snd_ctl_elem_info_t *uinfo) 1728 + static int snd_cs46xx_vol_info(struct snd_kcontrol *kcontrol, 1729 + struct snd_ctl_elem_info *uinfo) 1730 1730 { 1731 1731 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1732 1732 uinfo->count = 2; ··· 1735 1735 return 0; 1736 1736 } 1737 1737 1738 - static int snd_cs46xx_vol_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1738 + static int snd_cs46xx_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1739 1739 { 1740 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1740 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1741 1741 int reg = kcontrol->private_value; 1742 1742 unsigned int val = snd_cs46xx_peek(chip, reg); 1743 1743 ucontrol->value.integer.value[0] = 0xffff - (val >> 16); ··· 1745 1745 return 0; 1746 1746 } 1747 1747 1748 - static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1748 + static int snd_cs46xx_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1749 1749 { 1750 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1750 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1751 1751 int reg = kcontrol->private_value; 1752 1752 unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | 1753 1753 (0xffff - ucontrol->value.integer.value[1])); ··· 1763 1763 1764 1764 #ifdef CONFIG_SND_CS46XX_NEW_DSP 1765 1765 1766 - static int snd_cs46xx_vol_dac_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1766 + static int snd_cs46xx_vol_dac_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1767 1767 { 1768 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1768 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1769 1769 1770 1770 ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left; 1771 1771 ucontrol->value.integer.value[1] = chip->dsp_spos_instance->dac_volume_right; ··· 1773 1773 return 0; 1774 1774 } 1775 1775 1776 - static int snd_cs46xx_vol_dac_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1776 + static int snd_cs46xx_vol_dac_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1777 1777 { 1778 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1778 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1779 1779 int change = 0; 1780 1780 1781 1781 if (chip->dsp_spos_instance->dac_volume_right != ucontrol->value.integer.value[0] || ··· 1790 1790 } 1791 1791 1792 1792 #if 0 1793 - static int snd_cs46xx_vol_iec958_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1793 + static int snd_cs46xx_vol_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1794 1794 { 1795 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1795 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1796 1796 1797 1797 ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left; 1798 1798 ucontrol->value.integer.value[1] = chip->dsp_spos_instance->spdif_input_volume_right; 1799 1799 return 0; 1800 1800 } 1801 1801 1802 - static int snd_cs46xx_vol_iec958_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1802 + static int snd_cs46xx_vol_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1803 1803 { 1804 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1804 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1805 1805 int change = 0; 1806 1806 1807 1807 if (chip->dsp_spos_instance->spdif_input_volume_left != ucontrol->value.integer.value[0] || ··· 1816 1816 } 1817 1817 #endif 1818 1818 1819 - static int snd_mixer_boolean_info(snd_kcontrol_t *kcontrol, 1820 - snd_ctl_elem_info_t *uinfo) 1819 + static int snd_mixer_boolean_info(struct snd_kcontrol *kcontrol, 1820 + struct snd_ctl_elem_info *uinfo) 1821 1821 { 1822 1822 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1823 1823 uinfo->count = 1; ··· 1826 1826 return 0; 1827 1827 } 1828 1828 1829 - static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol, 1830 - snd_ctl_elem_value_t *ucontrol) 1829 + static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, 1830 + struct snd_ctl_elem_value *ucontrol) 1831 1831 { 1832 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1832 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1833 1833 int reg = kcontrol->private_value; 1834 1834 1835 1835 if (reg == CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT) ··· 1840 1840 return 0; 1841 1841 } 1842 1842 1843 - static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol, 1844 - snd_ctl_elem_value_t *ucontrol) 1843 + static int snd_cs46xx_iec958_put(struct snd_kcontrol *kcontrol, 1844 + struct snd_ctl_elem_value *ucontrol) 1845 1845 { 1846 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1846 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1847 1847 int change, res; 1848 1848 1849 1849 switch (kcontrol->private_value) { ··· 1877 1877 return res; 1878 1878 } 1879 1879 1880 - static int snd_cs46xx_adc_capture_get(snd_kcontrol_t *kcontrol, 1881 - snd_ctl_elem_value_t *ucontrol) 1880 + static int snd_cs46xx_adc_capture_get(struct snd_kcontrol *kcontrol, 1881 + struct snd_ctl_elem_value *ucontrol) 1882 1882 { 1883 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1884 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1883 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1884 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1885 1885 1886 1886 if (ins->adc_input != NULL) 1887 1887 ucontrol->value.integer.value[0] = 1; ··· 1891 1891 return 0; 1892 1892 } 1893 1893 1894 - static int snd_cs46xx_adc_capture_put(snd_kcontrol_t *kcontrol, 1895 - snd_ctl_elem_value_t *ucontrol) 1894 + static int snd_cs46xx_adc_capture_put(struct snd_kcontrol *kcontrol, 1895 + struct snd_ctl_elem_value *ucontrol) 1896 1896 { 1897 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1898 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1897 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1898 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1899 1899 int change = 0; 1900 1900 1901 1901 if (ucontrol->value.integer.value[0] && !ins->adc_input) { ··· 1908 1908 return change; 1909 1909 } 1910 1910 1911 - static int snd_cs46xx_pcm_capture_get(snd_kcontrol_t *kcontrol, 1912 - snd_ctl_elem_value_t *ucontrol) 1911 + static int snd_cs46xx_pcm_capture_get(struct snd_kcontrol *kcontrol, 1912 + struct snd_ctl_elem_value *ucontrol) 1913 1913 { 1914 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1915 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1914 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1915 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1916 1916 1917 1917 if (ins->pcm_input != NULL) 1918 1918 ucontrol->value.integer.value[0] = 1; ··· 1923 1923 } 1924 1924 1925 1925 1926 - static int snd_cs46xx_pcm_capture_put(snd_kcontrol_t *kcontrol, 1927 - snd_ctl_elem_value_t *ucontrol) 1926 + static int snd_cs46xx_pcm_capture_put(struct snd_kcontrol *kcontrol, 1927 + struct snd_ctl_elem_value *ucontrol) 1928 1928 { 1929 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1930 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1929 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1930 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1931 1931 int change = 0; 1932 1932 1933 1933 if (ucontrol->value.integer.value[0] && !ins->pcm_input) { ··· 1941 1941 return change; 1942 1942 } 1943 1943 1944 - static int snd_herc_spdif_select_get(snd_kcontrol_t *kcontrol, 1945 - snd_ctl_elem_value_t *ucontrol) 1944 + static int snd_herc_spdif_select_get(struct snd_kcontrol *kcontrol, 1945 + struct snd_ctl_elem_value *ucontrol) 1946 1946 { 1947 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1947 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1948 1948 1949 1949 int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); 1950 1950 ··· 1959 1959 /* 1960 1960 * Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial. 1961 1961 */ 1962 - static int snd_herc_spdif_select_put(snd_kcontrol_t *kcontrol, 1963 - snd_ctl_elem_value_t *ucontrol) 1962 + static int snd_herc_spdif_select_put(struct snd_kcontrol *kcontrol, 1963 + struct snd_ctl_elem_value *ucontrol) 1964 1964 { 1965 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1965 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1966 1966 int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); 1967 1967 int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR); 1968 1968 ··· 1984 1984 } 1985 1985 1986 1986 1987 - static int snd_cs46xx_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1987 + static int snd_cs46xx_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1988 1988 { 1989 1989 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 1990 1990 uinfo->count = 1; 1991 1991 return 0; 1992 1992 } 1993 1993 1994 - static int snd_cs46xx_spdif_default_get(snd_kcontrol_t * kcontrol, 1995 - snd_ctl_elem_value_t * ucontrol) 1994 + static int snd_cs46xx_spdif_default_get(struct snd_kcontrol *kcontrol, 1995 + struct snd_ctl_elem_value *ucontrol) 1996 1996 { 1997 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 1998 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1997 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 1998 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1999 1999 2000 2000 down (&chip->spos_mutex); 2001 2001 ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_default >> 24) & 0xff); ··· 2007 2007 return 0; 2008 2008 } 2009 2009 2010 - static int snd_cs46xx_spdif_default_put(snd_kcontrol_t * kcontrol, 2011 - snd_ctl_elem_value_t * ucontrol) 2010 + static int snd_cs46xx_spdif_default_put(struct snd_kcontrol *kcontrol, 2011 + struct snd_ctl_elem_value *ucontrol) 2012 2012 { 2013 - cs46xx_t * chip = snd_kcontrol_chip(kcontrol); 2014 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 2013 + struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); 2014 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 2015 2015 unsigned int val; 2016 2016 int change; 2017 2017 ··· 2034 2034 return change; 2035 2035 } 2036 2036 2037 - static int snd_cs46xx_spdif_mask_get(snd_kcontrol_t * kcontrol, 2038 - snd_ctl_elem_value_t * ucontrol) 2037 + static int snd_cs46xx_spdif_mask_get(struct snd_kcontrol *kcontrol, 2038 + struct snd_ctl_elem_value *ucontrol) 2039 2039 { 2040 2040 ucontrol->value.iec958.status[0] = 0xff; 2041 2041 ucontrol->value.iec958.status[1] = 0xff; ··· 2044 2044 return 0; 2045 2045 } 2046 2046 2047 - static int snd_cs46xx_spdif_stream_get(snd_kcontrol_t * kcontrol, 2048 - snd_ctl_elem_value_t * ucontrol) 2047 + static int snd_cs46xx_spdif_stream_get(struct snd_kcontrol *kcontrol, 2048 + struct snd_ctl_elem_value *ucontrol) 2049 2049 { 2050 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2051 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 2050 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2051 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 2052 2052 2053 2053 down (&chip->spos_mutex); 2054 2054 ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_stream >> 24) & 0xff); ··· 2060 2060 return 0; 2061 2061 } 2062 2062 2063 - static int snd_cs46xx_spdif_stream_put(snd_kcontrol_t * kcontrol, 2064 - snd_ctl_elem_value_t * ucontrol) 2063 + static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol, 2064 + struct snd_ctl_elem_value *ucontrol) 2065 2065 { 2066 - cs46xx_t * chip = snd_kcontrol_chip(kcontrol); 2067 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 2066 + struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); 2067 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 2068 2068 unsigned int val; 2069 2069 int change; 2070 2070 ··· 2091 2091 2092 2092 2093 2093 #ifdef CONFIG_SND_CS46XX_DEBUG_GPIO 2094 - static int snd_cs46xx_egpio_select_info(snd_kcontrol_t *kcontrol, 2095 - snd_ctl_elem_info_t *uinfo) 2094 + static int snd_cs46xx_egpio_select_info(struct snd_kcontrol *kcontrol, 2095 + struct snd_ctl_elem_info *uinfo) 2096 2096 { 2097 2097 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 2098 2098 uinfo->count = 1; ··· 2101 2101 return 0; 2102 2102 } 2103 2103 2104 - static int snd_cs46xx_egpio_select_get(snd_kcontrol_t *kcontrol, 2105 - snd_ctl_elem_value_t *ucontrol) 2104 + static int snd_cs46xx_egpio_select_get(struct snd_kcontrol *kcontrol, 2105 + struct snd_ctl_elem_value *ucontrol) 2106 2106 { 2107 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2107 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2108 2108 ucontrol->value.integer.value[0] = chip->current_gpio; 2109 2109 2110 2110 return 0; 2111 2111 } 2112 2112 2113 - static int snd_cs46xx_egpio_select_put(snd_kcontrol_t *kcontrol, 2114 - snd_ctl_elem_value_t *ucontrol) 2113 + static int snd_cs46xx_egpio_select_put(struct snd_kcontrol *kcontrol, 2114 + struct snd_ctl_elem_value *ucontrol) 2115 2115 { 2116 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2116 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2117 2117 int change = (chip->current_gpio != ucontrol->value.integer.value[0]); 2118 2118 chip->current_gpio = ucontrol->value.integer.value[0]; 2119 2119 ··· 2121 2121 } 2122 2122 2123 2123 2124 - static int snd_cs46xx_egpio_get(snd_kcontrol_t *kcontrol, 2125 - snd_ctl_elem_value_t *ucontrol) 2124 + static int snd_cs46xx_egpio_get(struct snd_kcontrol *kcontrol, 2125 + struct snd_ctl_elem_value *ucontrol) 2126 2126 { 2127 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2127 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2128 2128 int reg = kcontrol->private_value; 2129 2129 2130 2130 snd_printdd ("put: reg = %04x, gpio %02x\n",reg,chip->current_gpio); ··· 2134 2134 return 0; 2135 2135 } 2136 2136 2137 - static int snd_cs46xx_egpio_put(snd_kcontrol_t *kcontrol, 2138 - snd_ctl_elem_value_t *ucontrol) 2137 + static int snd_cs46xx_egpio_put(struct snd_kcontrol *kcontrol, 2138 + struct snd_ctl_elem_value *ucontrol) 2139 2139 { 2140 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2140 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2141 2141 int reg = kcontrol->private_value; 2142 2142 int val = snd_cs46xx_peekBA0(chip, reg); 2143 2143 int oldval = val; ··· 2155 2155 } 2156 2156 #endif /* CONFIG_SND_CS46XX_DEBUG_GPIO */ 2157 2157 2158 - static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { 2158 + static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = { 2159 2159 { 2160 2160 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2161 2161 .name = "DAC Volume", ··· 2285 2285 2286 2286 #ifdef CONFIG_SND_CS46XX_NEW_DSP 2287 2287 /* set primary cs4294 codec into Extended Audio Mode */ 2288 - static int snd_cs46xx_front_dup_get(snd_kcontrol_t *kcontrol, 2289 - snd_ctl_elem_value_t *ucontrol) 2288 + static int snd_cs46xx_front_dup_get(struct snd_kcontrol *kcontrol, 2289 + struct snd_ctl_elem_value *ucontrol) 2290 2290 { 2291 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2291 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2292 2292 unsigned short val; 2293 2293 val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE); 2294 2294 ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1; 2295 2295 return 0; 2296 2296 } 2297 2297 2298 - static int snd_cs46xx_front_dup_put(snd_kcontrol_t *kcontrol, 2299 - snd_ctl_elem_value_t *ucontrol) 2298 + static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol, 2299 + struct snd_ctl_elem_value *ucontrol) 2300 2300 { 2301 - cs46xx_t *chip = snd_kcontrol_chip(kcontrol); 2301 + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); 2302 2302 return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], 2303 2303 AC97_CSR_ACMODE, 0x200, 2304 2304 ucontrol->value.integer.value[0] ? 0 : 0x200); 2305 2305 } 2306 2306 2307 - static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = { 2307 + static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { 2308 2308 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2309 2309 .name = "Duplicate Front", 2310 2310 .info = snd_mixer_boolean_info, ··· 2315 2315 2316 2316 #ifdef CONFIG_SND_CS46XX_NEW_DSP 2317 2317 /* Only available on the Hercules Game Theater XP soundcard */ 2318 - static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = { 2318 + static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { 2319 2319 { 2320 2320 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2321 2321 .name = "Optical/Coaxial SPDIF Input Switch", ··· 2326 2326 }; 2327 2327 2328 2328 2329 - static void snd_cs46xx_codec_reset (ac97_t * ac97) 2329 + static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97) 2330 2330 { 2331 2331 unsigned long end_time; 2332 2332 int err; ··· 2375 2375 } 2376 2376 #endif 2377 2377 2378 - static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec) 2378 + static int __devinit cs46xx_detect_codec(struct snd_cs46xx *chip, int codec) 2379 2379 { 2380 2380 int idx, err; 2381 - ac97_template_t ac97; 2381 + struct snd_ac97_template ac97; 2382 2382 2383 2383 memset(&ac97, 0, sizeof(ac97)); 2384 2384 ac97.private_data = chip; ··· 2408 2408 return -ENXIO; 2409 2409 } 2410 2410 2411 - int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device) 2411 + int __devinit snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device) 2412 2412 { 2413 - snd_card_t *card = chip->card; 2414 - snd_ctl_elem_id_t id; 2413 + struct snd_card *card = chip->card; 2414 + struct snd_ctl_elem_id id; 2415 2415 int err; 2416 2416 unsigned int idx; 2417 - static ac97_bus_ops_t ops = { 2417 + static struct snd_ac97_bus_ops ops = { 2418 2418 #ifdef CONFIG_SND_CS46XX_NEW_DSP 2419 2419 .reset = snd_cs46xx_codec_reset, 2420 2420 #endif ··· 2442 2442 2443 2443 /* add cs4630 mixer controls */ 2444 2444 for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { 2445 - snd_kcontrol_t *kctl; 2445 + struct snd_kcontrol *kctl; 2446 2446 kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip); 2447 2447 if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM) 2448 2448 kctl->id.device = spdif_device; ··· 2484 2484 * RawMIDI interface 2485 2485 */ 2486 2486 2487 - static void snd_cs46xx_midi_reset(cs46xx_t *chip) 2487 + static void snd_cs46xx_midi_reset(struct snd_cs46xx *chip) 2488 2488 { 2489 2489 snd_cs46xx_pokeBA0(chip, BA0_MIDCR, MIDCR_MRST); 2490 2490 udelay(100); 2491 2491 snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); 2492 2492 } 2493 2493 2494 - static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream) 2494 + static int snd_cs46xx_midi_input_open(struct snd_rawmidi_substream *substream) 2495 2495 { 2496 - cs46xx_t *chip = substream->rmidi->private_data; 2496 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2497 2497 2498 2498 chip->active_ctrl(chip, 1); 2499 2499 spin_lock_irq(&chip->reg_lock); ··· 2509 2509 return 0; 2510 2510 } 2511 2511 2512 - static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream) 2512 + static int snd_cs46xx_midi_input_close(struct snd_rawmidi_substream *substream) 2513 2513 { 2514 - cs46xx_t *chip = substream->rmidi->private_data; 2514 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2515 2515 2516 2516 spin_lock_irq(&chip->reg_lock); 2517 2517 chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE); ··· 2527 2527 return 0; 2528 2528 } 2529 2529 2530 - static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream) 2530 + static int snd_cs46xx_midi_output_open(struct snd_rawmidi_substream *substream) 2531 2531 { 2532 - cs46xx_t *chip = substream->rmidi->private_data; 2532 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2533 2533 2534 2534 chip->active_ctrl(chip, 1); 2535 2535 ··· 2546 2546 return 0; 2547 2547 } 2548 2548 2549 - static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream) 2549 + static int snd_cs46xx_midi_output_close(struct snd_rawmidi_substream *substream) 2550 2550 { 2551 - cs46xx_t *chip = substream->rmidi->private_data; 2551 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2552 2552 2553 2553 spin_lock_irq(&chip->reg_lock); 2554 2554 chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE); ··· 2564 2564 return 0; 2565 2565 } 2566 2566 2567 - static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) 2567 + static void snd_cs46xx_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) 2568 2568 { 2569 2569 unsigned long flags; 2570 - cs46xx_t *chip = substream->rmidi->private_data; 2570 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2571 2571 2572 2572 spin_lock_irqsave(&chip->reg_lock, flags); 2573 2573 if (up) { ··· 2584 2584 spin_unlock_irqrestore(&chip->reg_lock, flags); 2585 2585 } 2586 2586 2587 - static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) 2587 + static void snd_cs46xx_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) 2588 2588 { 2589 2589 unsigned long flags; 2590 - cs46xx_t *chip = substream->rmidi->private_data; 2590 + struct snd_cs46xx *chip = substream->rmidi->private_data; 2591 2591 unsigned char byte; 2592 2592 2593 2593 spin_lock_irqsave(&chip->reg_lock, flags); ··· 2614 2614 spin_unlock_irqrestore(&chip->reg_lock, flags); 2615 2615 } 2616 2616 2617 - static snd_rawmidi_ops_t snd_cs46xx_midi_output = 2617 + static struct snd_rawmidi_ops snd_cs46xx_midi_output = 2618 2618 { 2619 2619 .open = snd_cs46xx_midi_output_open, 2620 2620 .close = snd_cs46xx_midi_output_close, 2621 2621 .trigger = snd_cs46xx_midi_output_trigger, 2622 2622 }; 2623 2623 2624 - static snd_rawmidi_ops_t snd_cs46xx_midi_input = 2624 + static struct snd_rawmidi_ops snd_cs46xx_midi_input = 2625 2625 { 2626 2626 .open = snd_cs46xx_midi_input_open, 2627 2627 .close = snd_cs46xx_midi_input_close, 2628 2628 .trigger = snd_cs46xx_midi_input_trigger, 2629 2629 }; 2630 2630 2631 - int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi) 2631 + int __devinit snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rrawmidi) 2632 2632 { 2633 - snd_rawmidi_t *rmidi; 2633 + struct snd_rawmidi *rmidi; 2634 2634 int err; 2635 2635 2636 2636 if (rrawmidi) ··· 2657 2657 2658 2658 static void snd_cs46xx_gameport_trigger(struct gameport *gameport) 2659 2659 { 2660 - cs46xx_t *chip = gameport_get_port_data(gameport); 2660 + struct snd_cs46xx *chip = gameport_get_port_data(gameport); 2661 2661 2662 2662 snd_assert(chip, return); 2663 2663 snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); ··· 2665 2665 2666 2666 static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) 2667 2667 { 2668 - cs46xx_t *chip = gameport_get_port_data(gameport); 2668 + struct snd_cs46xx *chip = gameport_get_port_data(gameport); 2669 2669 2670 2670 snd_assert(chip, return 0); 2671 2671 return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); ··· 2673 2673 2674 2674 static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) 2675 2675 { 2676 - cs46xx_t *chip = gameport_get_port_data(gameport); 2676 + struct snd_cs46xx *chip = gameport_get_port_data(gameport); 2677 2677 unsigned js1, js2, jst; 2678 2678 2679 2679 snd_assert(chip, return 0); ··· 2707 2707 return 0; 2708 2708 } 2709 2709 2710 - int __devinit snd_cs46xx_gameport(cs46xx_t *chip) 2710 + int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip) 2711 2711 { 2712 2712 struct gameport *gp; 2713 2713 ··· 2735 2735 return 0; 2736 2736 } 2737 2737 2738 - static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) 2738 + static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) 2739 2739 { 2740 2740 if (chip->gameport) { 2741 2741 gameport_unregister_port(chip->gameport); ··· 2743 2743 } 2744 2744 } 2745 2745 #else 2746 - int __devinit snd_cs46xx_gameport(cs46xx_t *chip) { return -ENOSYS; } 2747 - static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) { } 2746 + int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; } 2747 + static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { } 2748 2748 #endif /* CONFIG_GAMEPORT */ 2749 2749 2750 2750 /* 2751 2751 * proc interface 2752 2752 */ 2753 2753 2754 - static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data, 2754 + static long snd_cs46xx_io_read(struct snd_info_entry *entry, void *file_private_data, 2755 2755 struct file *file, char __user *buf, 2756 2756 unsigned long count, unsigned long pos) 2757 2757 { 2758 2758 long size; 2759 - snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data; 2759 + struct snd_cs46xx_region *region = entry->private_data; 2760 2760 2761 2761 size = count; 2762 2762 if (pos + (size_t)size > region->size) ··· 2772 2772 .read = snd_cs46xx_io_read, 2773 2773 }; 2774 2774 2775 - static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip) 2775 + static int __devinit snd_cs46xx_proc_init(struct snd_card *card, struct snd_cs46xx *chip) 2776 2776 { 2777 - snd_info_entry_t *entry; 2777 + struct snd_info_entry *entry; 2778 2778 int idx; 2779 2779 2780 2780 for (idx = 0; idx < 5; idx++) { 2781 - snd_cs46xx_region_t *region = &chip->region.idx[idx]; 2781 + struct snd_cs46xx_region *region = &chip->region.idx[idx]; 2782 2782 if (! snd_card_proc_new(card, region->name, &entry)) { 2783 2783 entry->content = SNDRV_INFO_CONTENT_DATA; 2784 2784 entry->private_data = chip; ··· 2793 2793 return 0; 2794 2794 } 2795 2795 2796 - static int snd_cs46xx_proc_done(cs46xx_t *chip) 2796 + static int snd_cs46xx_proc_done(struct snd_cs46xx *chip) 2797 2797 { 2798 2798 #ifdef CONFIG_SND_CS46XX_NEW_DSP 2799 2799 cs46xx_dsp_proc_done(chip); ··· 2804 2804 /* 2805 2805 * stop the h/w 2806 2806 */ 2807 - static void snd_cs46xx_hw_stop(cs46xx_t *chip) 2807 + static void snd_cs46xx_hw_stop(struct snd_cs46xx *chip) 2808 2808 { 2809 2809 unsigned int tmp; 2810 2810 ··· 2851 2851 } 2852 2852 2853 2853 2854 - static int snd_cs46xx_free(cs46xx_t *chip) 2854 + static int snd_cs46xx_free(struct snd_cs46xx *chip) 2855 2855 { 2856 2856 int idx; 2857 2857 ··· 2871 2871 snd_cs46xx_hw_stop(chip); 2872 2872 2873 2873 for (idx = 0; idx < 5; idx++) { 2874 - snd_cs46xx_region_t *region = &chip->region.idx[idx]; 2874 + struct snd_cs46xx_region *region = &chip->region.idx[idx]; 2875 2875 if (region->remap_addr) 2876 2876 iounmap(region->remap_addr); 2877 2877 release_and_free_resource(region->resource); 2878 2878 } 2879 2879 if (chip->irq >= 0) 2880 - free_irq(chip->irq, (void *)chip); 2880 + free_irq(chip->irq, chip); 2881 2881 2882 2882 if (chip->active_ctrl) 2883 2883 chip->active_ctrl(chip, -chip->amplifier); ··· 2894 2894 return 0; 2895 2895 } 2896 2896 2897 - static int snd_cs46xx_dev_free(snd_device_t *device) 2897 + static int snd_cs46xx_dev_free(struct snd_device *device) 2898 2898 { 2899 - cs46xx_t *chip = device->device_data; 2899 + struct snd_cs46xx *chip = device->device_data; 2900 2900 return snd_cs46xx_free(chip); 2901 2901 } 2902 2902 2903 2903 /* 2904 2904 * initialize chip 2905 2905 */ 2906 - static int snd_cs46xx_chip_init(cs46xx_t *chip) 2906 + static int snd_cs46xx_chip_init(struct snd_cs46xx *chip) 2907 2907 { 2908 2908 int timeout; 2909 2909 ··· 3132 3132 /* 3133 3133 * start and load DSP 3134 3134 */ 3135 - int __devinit snd_cs46xx_start_dsp(cs46xx_t *chip) 3135 + int __devinit snd_cs46xx_start_dsp(struct snd_cs46xx *chip) 3136 3136 { 3137 3137 unsigned int tmp; 3138 3138 /* ··· 3234 3234 * AMP control - null AMP 3235 3235 */ 3236 3236 3237 - static void amp_none(cs46xx_t *chip, int change) 3237 + static void amp_none(struct snd_cs46xx *chip, int change) 3238 3238 { 3239 3239 } 3240 3240 3241 3241 #ifdef CONFIG_SND_CS46XX_NEW_DSP 3242 - static int voyetra_setup_eapd_slot(cs46xx_t *chip) 3242 + static int voyetra_setup_eapd_slot(struct snd_cs46xx *chip) 3243 3243 { 3244 3244 3245 3245 u32 idx, valid_slots,tmp,powerdown = 0; ··· 3359 3359 * Crystal EAPD mode 3360 3360 */ 3361 3361 3362 - static void amp_voyetra(cs46xx_t *chip, int change) 3362 + static void amp_voyetra(struct snd_cs46xx *chip, int change) 3363 3363 { 3364 3364 /* Manage the EAPD bit on the Crystal 4297 3365 3365 and the Analog AD1885 */ ··· 3395 3395 #endif 3396 3396 } 3397 3397 3398 - static void hercules_init(cs46xx_t *chip) 3398 + static void hercules_init(struct snd_cs46xx *chip) 3399 3399 { 3400 3400 /* default: AMP off, and SPDIF input optical */ 3401 3401 snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0); ··· 3406 3406 /* 3407 3407 * Game Theatre XP card - EGPIO[2] is used to enable the external amp. 3408 3408 */ 3409 - static void amp_hercules(cs46xx_t *chip, int change) 3409 + static void amp_hercules(struct snd_cs46xx *chip, int change) 3410 3410 { 3411 3411 int old = chip->amplifier; 3412 3412 int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); ··· 3427 3427 } 3428 3428 } 3429 3429 3430 - static void voyetra_mixer_init (cs46xx_t *chip) 3430 + static void voyetra_mixer_init (struct snd_cs46xx *chip) 3431 3431 { 3432 3432 snd_printdd ("initializing Voyetra mixer\n"); 3433 3433 ··· 3436 3436 snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0); 3437 3437 } 3438 3438 3439 - static void hercules_mixer_init (cs46xx_t *chip) 3439 + static void hercules_mixer_init (struct snd_cs46xx *chip) 3440 3440 { 3441 3441 #ifdef CONFIG_SND_CS46XX_NEW_DSP 3442 3442 unsigned int idx; 3443 3443 int err; 3444 - snd_card_t *card = chip->card; 3444 + struct snd_card *card = chip->card; 3445 3445 #endif 3446 3446 3447 3447 /* set EGPIO to default */ ··· 3451 3451 3452 3452 #ifdef CONFIG_SND_CS46XX_NEW_DSP 3453 3453 for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { 3454 - snd_kcontrol_t *kctl; 3454 + struct snd_kcontrol *kctl; 3455 3455 3456 3456 kctl = snd_ctl_new1(&snd_hercules_controls[idx], chip); 3457 3457 if ((err = snd_ctl_add(card, kctl)) < 0) { ··· 3468 3468 * Untested 3469 3469 */ 3470 3470 3471 - static void amp_voyetra_4294(cs46xx_t *chip, int change) 3471 + static void amp_voyetra_4294(struct snd_cs46xx *chip, int change) 3472 3472 { 3473 3473 chip->amplifier += change; 3474 3474 ··· 3498 3498 * enough to make them useful. 3499 3499 */ 3500 3500 3501 - static void clkrun_hack(cs46xx_t *chip, int change) 3501 + static void clkrun_hack(struct snd_cs46xx *chip, int change) 3502 3502 { 3503 3503 u16 control, nval; 3504 3504 ··· 3523 3523 /* 3524 3524 * detect intel piix4 3525 3525 */ 3526 - static void clkrun_init(cs46xx_t *chip) 3526 + static void clkrun_init(struct snd_cs46xx *chip) 3527 3527 { 3528 3528 struct pci_dev *pdev; 3529 3529 u8 pp; ··· 3551 3551 u16 vendor; 3552 3552 u16 id; 3553 3553 char *name; 3554 - void (*init)(cs46xx_t *); 3555 - void (*amp)(cs46xx_t *, int); 3556 - void (*active)(cs46xx_t *, int); 3557 - void (*mixer_init)(cs46xx_t *); 3554 + void (*init)(struct snd_cs46xx *); 3555 + void (*amp)(struct snd_cs46xx *, int); 3556 + void (*active)(struct snd_cs46xx *, int); 3557 + void (*mixer_init)(struct snd_cs46xx *); 3558 3558 }; 3559 3559 3560 3560 static struct cs_card_type __devinitdata cards[] = { ··· 3654 3654 * APM support 3655 3655 */ 3656 3656 #ifdef CONFIG_PM 3657 - static int snd_cs46xx_suspend(snd_card_t *card, pm_message_t state) 3657 + static int snd_cs46xx_suspend(struct snd_card *card, pm_message_t state) 3658 3658 { 3659 - cs46xx_t *chip = card->pm_private_data; 3659 + struct snd_cs46xx *chip = card->pm_private_data; 3660 3660 int amp_saved; 3661 3661 3662 3662 snd_pcm_suspend_all(chip->pcm); ··· 3678 3678 return 0; 3679 3679 } 3680 3680 3681 - static int snd_cs46xx_resume(snd_card_t *card) 3681 + static int snd_cs46xx_resume(struct snd_card *card) 3682 3682 { 3683 - cs46xx_t *chip = card->pm_private_data; 3683 + struct snd_cs46xx *chip = card->pm_private_data; 3684 3684 int amp_saved; 3685 3685 3686 3686 pci_enable_device(chip->pci); ··· 3719 3719 /* 3720 3720 */ 3721 3721 3722 - int __devinit snd_cs46xx_create(snd_card_t * card, 3722 + int __devinit snd_cs46xx_create(struct snd_card *card, 3723 3723 struct pci_dev * pci, 3724 3724 int external_amp, int thinkpad, 3725 - cs46xx_t ** rchip) 3725 + struct snd_cs46xx ** rchip) 3726 3726 { 3727 - cs46xx_t *chip; 3727 + struct snd_cs46xx *chip; 3728 3728 int err, idx; 3729 - snd_cs46xx_region_t *region; 3729 + struct snd_cs46xx_region *region; 3730 3730 struct cs_card_type *cp; 3731 3731 u16 ss_card, ss_vendor; 3732 - static snd_device_ops_t ops = { 3732 + static struct snd_device_ops ops = { 3733 3733 .dev_free = snd_cs46xx_dev_free, 3734 3734 }; 3735 3735 ··· 3755 3755 chip->ba1_addr = pci_resource_start(pci, 1); 3756 3756 if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 || 3757 3757 chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) { 3758 - snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", chip->ba0_addr, chip->ba1_addr); 3758 + snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", 3759 + chip->ba0_addr, chip->ba1_addr); 3759 3760 snd_cs46xx_free(chip); 3760 3761 return -ENOMEM; 3761 3762 } ··· 3826 3825 3827 3826 for (idx = 0; idx < 5; idx++) { 3828 3827 region = &chip->region.idx[idx]; 3829 - if ((region->resource = request_mem_region(region->base, region->size, region->name)) == NULL) { 3830 - snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1); 3828 + if ((region->resource = request_mem_region(region->base, region->size, 3829 + region->name)) == NULL) { 3830 + snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", 3831 + region->base, region->base + region->size - 1); 3831 3832 snd_cs46xx_free(chip); 3832 3833 return -EBUSY; 3833 3834 } ··· 3841 3838 } 3842 3839 } 3843 3840 3844 - if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS46XX", (void *) chip)) { 3841 + if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, 3842 + "CS46XX", chip)) { 3845 3843 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 3846 3844 snd_cs46xx_free(chip); 3847 3845 return -EBUSY;
+110 -99
sound/pci/cs46xx/cs46xx_lib.h
··· 57 57 * common I/O routines 58 58 */ 59 59 60 - static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val) 60 + static inline void snd_cs46xx_poke(struct snd_cs46xx *chip, unsigned long reg, unsigned int val) 61 61 { 62 62 unsigned int bank = reg >> 16; 63 63 unsigned int offset = reg & 0xffff; ··· 66 66 writel(val, chip->region.idx[bank+1].remap_addr + offset); 67 67 } 68 68 69 - static inline unsigned int snd_cs46xx_peek(cs46xx_t *chip, unsigned long reg) 69 + static inline unsigned int snd_cs46xx_peek(struct snd_cs46xx *chip, unsigned long reg) 70 70 { 71 71 unsigned int bank = reg >> 16; 72 72 unsigned int offset = reg & 0xffff; 73 73 return readl(chip->region.idx[bank+1].remap_addr + offset); 74 74 } 75 75 76 - static inline void snd_cs46xx_pokeBA0(cs46xx_t *chip, unsigned long offset, unsigned int val) 76 + static inline void snd_cs46xx_pokeBA0(struct snd_cs46xx *chip, unsigned long offset, unsigned int val) 77 77 { 78 78 writel(val, chip->region.name.ba0.remap_addr + offset); 79 79 } 80 80 81 - static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *chip, unsigned long offset) 81 + static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned long offset) 82 82 { 83 83 return readl(chip->region.name.ba0.remap_addr + offset); 84 84 } 85 85 86 - dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip); 87 - void cs46xx_dsp_spos_destroy (cs46xx_t * chip); 88 - int cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module); 89 - symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type); 90 - int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip); 91 - int cs46xx_dsp_proc_done (cs46xx_t *chip); 92 - int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip); 93 - int snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset, 94 - unsigned long len); 95 - int snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len); 96 - int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip); 97 - int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip); 98 - int cs46xx_dsp_disable_spdif_out (cs46xx_t *chip); 99 - int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip); 100 - int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip); 101 - int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip); 102 - int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip); 103 - int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip); 104 - int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip); 105 - int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data); 106 - dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest); 107 - void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb); 108 - void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb); 109 - dsp_scb_descriptor_t * cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip); 110 - dsp_scb_descriptor_t * cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name, 111 - u16 channel_disp,u16 fifo_addr, 112 - u16 child_scb_addr, 113 - u32 dest, 114 - dsp_scb_descriptor_t * parent_scb, 115 - int scb_child_type); 116 - dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, 117 - u16 channel_disp,u16 fifo_addr, 118 - u16 sample_buffer_addr, 119 - u32 dest, 120 - dsp_scb_descriptor_t * parent_scb, 121 - int scb_child_type); 122 - void cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb); 123 - dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, 124 - u16 channel_disp,u16 fifo_addr, 125 - u16 sample_buffer_addr, 126 - u32 dest,dsp_scb_descriptor_t * parent_scb, 127 - int scb_child_type); 128 - dsp_scb_descriptor_t * cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, 129 - int sample_rate, 130 - u16 src_buffer_addr, 131 - u16 src_delay_buffer_addr,u32 dest, 132 - dsp_scb_descriptor_t * parent_scb, 133 - int scb_child_type, 134 - int pass_through); 135 - dsp_scb_descriptor_t * cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name, 136 - u16 mix_buffer_addr,u32 dest, 137 - dsp_scb_descriptor_t * parent_scb, 138 - int scb_child_type); 86 + struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip); 87 + void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip); 88 + int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module); 89 + struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, 90 + int symbol_type); 91 + int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip); 92 + int cs46xx_dsp_proc_done (struct snd_cs46xx *chip); 93 + int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip); 94 + int snd_cs46xx_download (struct snd_cs46xx *chip, u32 *src, unsigned long offset, 95 + unsigned long len); 96 + int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, unsigned long offset, unsigned long len); 97 + int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip); 98 + int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip); 99 + int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip); 100 + int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip); 101 + int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip); 102 + int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip); 103 + int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip); 104 + int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip); 105 + int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip); 106 + int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data); 107 + struct dsp_scb_descriptor * cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, 108 + u32 * scb_data, u32 dest); 109 + void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb); 110 + void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, 111 + struct dsp_scb_descriptor * scb); 112 + struct dsp_scb_descriptor * cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip); 113 + struct dsp_scb_descriptor * 114 + cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip, 115 + char * codec_name, u16 channel_disp, u16 fifo_addr, 116 + u16 child_scb_addr, u32 dest, 117 + struct dsp_scb_descriptor * parent_scb, 118 + int scb_child_type); 119 + struct dsp_scb_descriptor * 120 + cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name, 121 + u16 channel_disp, u16 fifo_addr, 122 + u16 sample_buffer_addr, u32 dest, 123 + struct dsp_scb_descriptor * parent_scb, 124 + int scb_child_type); 125 + void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, 126 + struct dsp_scb_descriptor * scb); 127 + struct dsp_scb_descriptor * 128 + cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name, 129 + u16 channel_disp, u16 fifo_addr, 130 + u16 sample_buffer_addr, u32 dest, 131 + struct dsp_scb_descriptor * parent_scb, 132 + int scb_child_type); 133 + struct dsp_scb_descriptor * 134 + cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name, 135 + int sample_rate, u16 src_buffer_addr, 136 + u16 src_delay_buffer_addr, u32 dest, 137 + struct dsp_scb_descriptor * parent_scb, 138 + int scb_child_type, int pass_through); 139 + struct dsp_scb_descriptor * 140 + cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name, 141 + u16 mix_buffer_addr, u32 dest, 142 + struct dsp_scb_descriptor * parent_scb, 143 + int scb_child_type); 139 144 140 - dsp_scb_descriptor_t * cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name, 141 - u16 vari_buffer_addr0, 142 - u16 vari_buffer_addr1, 143 - u32 dest, 144 - dsp_scb_descriptor_t * parent_scb, 145 - int scb_child_type); 146 - dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest, 147 - u16 hfg_scb_address, 148 - u16 asynch_buffer_address, 149 - dsp_scb_descriptor_t * parent_scb, 150 - int scb_child_type); 151 - dsp_scb_descriptor_t * cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest, 152 - dsp_scb_descriptor_t * parent_scb, 153 - int scb_child_type); 154 - dsp_scb_descriptor_t * cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name, 155 - u16 mix_buffer_addr,u16 writeback_spb,u32 dest, 156 - dsp_scb_descriptor_t * parent_scb, 157 - int scb_child_type); 158 - dsp_scb_descriptor_t * cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, 159 - u16 snoop_buffer_address, 160 - dsp_scb_descriptor_t * snoop_scb, 161 - dsp_scb_descriptor_t * parent_scb, 162 - int scb_child_type); 163 - pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,u32 sample_rate, void * private_data, u32 hw_dma_addr, 164 - int pcm_channel_id); 165 - void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip, 166 - pcm_channel_descriptor_t * pcm_channel); 167 - int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel); 168 - int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel); 169 - dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source, 170 - u16 addr,char * scb_name); 171 - int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src); 172 - int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src); 173 - int cs46xx_iec958_pre_open (cs46xx_t *chip); 174 - int cs46xx_iec958_post_close (cs46xx_t *chip); 175 - int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip, 176 - pcm_channel_descriptor_t * pcm_channel, 177 - int period_size); 178 - int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip, 179 - int period_size); 180 - int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right); 181 - int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right); 145 + struct dsp_scb_descriptor * 146 + cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip, char * scb_name, 147 + u16 vari_buffer_addr0, u16 vari_buffer_addr1, u32 dest, 148 + struct dsp_scb_descriptor * parent_scb, 149 + int scb_child_type); 150 + struct dsp_scb_descriptor * 151 + cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name, 152 + u32 dest, u16 hfg_scb_address, u16 asynch_buffer_address, 153 + struct dsp_scb_descriptor * parent_scb, 154 + int scb_child_type); 155 + struct dsp_scb_descriptor * 156 + cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 157 + struct dsp_scb_descriptor * parent_scb, 158 + int scb_child_type); 159 + struct dsp_scb_descriptor * 160 + cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name, 161 + u16 mix_buffer_addr, u16 writeback_spb, u32 dest, 162 + struct dsp_scb_descriptor * parent_scb, 163 + int scb_child_type); 164 + struct dsp_scb_descriptor * 165 + cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name, 166 + u32 dest, u16 snoop_buffer_address, 167 + struct dsp_scb_descriptor * snoop_scb, 168 + struct dsp_scb_descriptor * parent_scb, 169 + int scb_child_type); 170 + struct dsp_pcm_channel_descriptor * 171 + cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, u32 sample_rate, 172 + void * private_data, u32 hw_dma_addr, 173 + int pcm_channel_id); 174 + void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip, 175 + struct dsp_pcm_channel_descriptor * pcm_channel); 176 + int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip, 177 + struct dsp_pcm_channel_descriptor * pcm_channel); 178 + int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip, 179 + struct dsp_pcm_channel_descriptor * pcm_channel); 180 + struct dsp_scb_descriptor * 181 + cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source, 182 + u16 addr, char * scb_name); 183 + int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src); 184 + int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src); 185 + int cs46xx_iec958_pre_open (struct snd_cs46xx *chip); 186 + int cs46xx_iec958_post_close (struct snd_cs46xx *chip); 187 + int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip, 188 + struct dsp_pcm_channel_descriptor * pcm_channel, 189 + int period_size); 190 + int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, int period_size); 191 + int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right); 192 + int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right); 182 193 #endif /* __CS46XX_LIB_H__ */
+140 -122
sound/pci/cs46xx/dsp_spos.c
··· 37 37 #include "cs46xx_lib.h" 38 38 #include "dsp_spos.h" 39 39 40 - static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry); 40 + static int cs46xx_dsp_async_init (struct snd_cs46xx *chip, 41 + struct dsp_scb_descriptor * fg_entry); 41 42 42 - static wide_opcode_t wide_opcodes[] = { 43 + static enum wide_opcode wide_opcodes[] = { 43 44 WIDE_FOR_BEGIN_LOOP, 44 45 WIDE_FOR_BEGIN_LOOP2, 45 46 WIDE_COND_GOTO_ADDR, ··· 55 54 WIDE_TBEQ_NCOND_CALL1_ADDR 56 55 }; 57 56 58 - static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32 overlay_begin_address) 57 + static int shadow_and_reallocate_code (struct snd_cs46xx * chip, u32 * data, u32 size, 58 + u32 overlay_begin_address) 59 59 { 60 60 unsigned int i = 0, j, nreallocated = 0; 61 61 u32 hival,loval,address; 62 62 u32 mop_operands,mop_type,wide_op; 63 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 63 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 64 64 65 65 snd_assert( ((size % 2) == 0), return -EINVAL); 66 66 ··· 116 114 return nreallocated; 117 115 } 118 116 119 - static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_type) 117 + static struct dsp_segment_desc * get_segment_desc (struct dsp_module_desc * module, int seg_type) 120 118 { 121 119 int i; 122 120 for (i = 0;i < module->nsegments; ++i) { ··· 128 126 return NULL; 129 127 }; 130 128 131 - static int find_free_symbol_index (dsp_spos_instance_t * ins) 129 + static int find_free_symbol_index (struct dsp_spos_instance * ins) 132 130 { 133 131 int index = ins->symbol_table.nsymbols,i; 134 132 ··· 142 140 return index; 143 141 } 144 142 145 - static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module) 143 + static int add_symbols (struct snd_cs46xx * chip, struct dsp_module_desc * module) 146 144 { 147 145 int i; 148 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 146 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 149 147 150 148 if (module->symbol_table.nsymbols > 0) { 151 149 if (!strcmp(module->symbol_table.symbols[0].symbol_name, "OVERLAYBEGINADDRESS") && ··· 183 181 return 0; 184 182 } 185 183 186 - static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 address, int type) 184 + static struct dsp_symbol_entry * 185 + add_symbol (struct snd_cs46xx * chip, char * symbol_name, u32 address, int type) 187 186 { 188 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 189 - symbol_entry_t * symbol = NULL; 187 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 188 + struct dsp_symbol_entry * symbol = NULL; 190 189 int index; 191 190 192 191 if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) { ··· 220 217 return symbol; 221 218 } 222 219 223 - dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip) 220 + struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) 224 221 { 225 - dsp_spos_instance_t * ins = kmalloc(sizeof(dsp_spos_instance_t), GFP_KERNEL); 222 + struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); 226 223 227 224 if (ins == NULL) 228 225 return NULL; 229 - memset(ins, 0, sizeof(*ins)); 230 226 231 227 /* better to use vmalloc for this big table */ 232 228 ins->symbol_table.nsymbols = 0; 233 - ins->symbol_table.symbols = vmalloc(sizeof(symbol_entry_t) * DSP_MAX_SYMBOLS); 229 + ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * 230 + DSP_MAX_SYMBOLS); 234 231 ins->symbol_table.highest_frag_index = 0; 235 232 236 233 if (ins->symbol_table.symbols == NULL) { ··· 251 248 ins->ntask = 0; 252 249 253 250 ins->nmodules = 0; 254 - ins->modules = kmalloc(sizeof(dsp_module_desc_t) * DSP_MAX_MODULES, GFP_KERNEL); 251 + ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); 255 252 256 253 if (ins->modules == NULL) { 257 254 cs46xx_dsp_spos_destroy(chip); ··· 280 277 return ins; 281 278 } 282 279 283 - void cs46xx_dsp_spos_destroy (cs46xx_t * chip) 280 + void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip) 284 281 { 285 282 int i; 286 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 283 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 287 284 288 285 snd_assert(ins != NULL, return); 289 286 ··· 301 298 up(&chip->spos_mutex); 302 299 } 303 300 304 - int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * module) 301 + int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module) 305 302 { 306 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 307 - segment_desc_t * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM); 308 - segment_desc_t * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER); 309 - segment_desc_t * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE); 303 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 304 + struct dsp_segment_desc * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM); 305 + struct dsp_segment_desc * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER); 306 + struct dsp_segment_desc * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE); 310 307 u32 doffset, dsize; 311 308 312 309 if (ins->nmodules == DSP_MAX_MODULES - 1) { ··· 413 410 return 0; 414 411 } 415 412 416 - symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name, int symbol_type) 413 + struct dsp_symbol_entry * 414 + cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, int symbol_type) 417 415 { 418 416 int i; 419 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 417 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 420 418 421 419 for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) { 422 420 ··· 439 435 } 440 436 441 437 442 - static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type) 438 + static struct dsp_symbol_entry * 439 + cs46xx_dsp_lookup_symbol_addr (struct snd_cs46xx * chip, u32 address, int symbol_type) 443 440 { 444 441 int i; 445 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 442 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 446 443 447 444 for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) { 448 445 ··· 461 456 } 462 457 463 458 464 - static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 459 + static void cs46xx_dsp_proc_symbol_table_read (struct snd_info_entry *entry, 460 + struct snd_info_buffer *buffer) 465 461 { 466 - cs46xx_t *chip = entry->private_data; 467 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 462 + struct snd_cs46xx *chip = entry->private_data; 463 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 468 464 int i; 469 465 470 466 snd_iprintf(buffer, "SYMBOLS:\n"); ··· 489 483 } 490 484 491 485 492 - static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 486 + static void cs46xx_dsp_proc_modules_read (struct snd_info_entry *entry, 487 + struct snd_info_buffer *buffer) 493 488 { 494 - cs46xx_t *chip = entry->private_data; 495 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 489 + struct snd_cs46xx *chip = entry->private_data; 490 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 496 491 int i,j; 497 492 498 493 down(&chip->spos_mutex); ··· 504 497 snd_iprintf(buffer, " %d fixups\n", ins->modules[i].nfixups); 505 498 506 499 for (j = 0; j < ins->modules[i].nsegments; ++ j) { 507 - segment_desc_t * desc = (ins->modules[i].segments + j); 500 + struct dsp_segment_desc * desc = (ins->modules[i].segments + j); 508 501 snd_iprintf(buffer, " segment %02x offset %08x size %08x\n", 509 502 desc->segment_type,desc->offset, desc->size); 510 503 } ··· 512 505 up(&chip->spos_mutex); 513 506 } 514 507 515 - static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 508 + static void cs46xx_dsp_proc_task_tree_read (struct snd_info_entry *entry, 509 + struct snd_info_buffer *buffer) 516 510 { 517 - cs46xx_t *chip = entry->private_data; 518 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 519 - int i,j,col; 511 + struct snd_cs46xx *chip = entry->private_data; 512 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 513 + int i, j, col; 520 514 void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; 521 515 522 516 down(&chip->spos_mutex); ··· 540 532 up(&chip->spos_mutex); 541 533 } 542 534 543 - static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 535 + static void cs46xx_dsp_proc_scb_read (struct snd_info_entry *entry, 536 + struct snd_info_buffer *buffer) 544 537 { 545 - cs46xx_t *chip = entry->private_data; 546 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 538 + struct snd_cs46xx *chip = entry->private_data; 539 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 547 540 int i; 548 541 549 542 down(&chip->spos_mutex); ··· 573 564 up(&chip->spos_mutex); 574 565 } 575 566 576 - static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 567 + static void cs46xx_dsp_proc_parameter_dump_read (struct snd_info_entry *entry, 568 + struct snd_info_buffer *buffer) 577 569 { 578 - cs46xx_t *chip = entry->private_data; 579 - /*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */ 580 - unsigned int i,col = 0; 570 + struct snd_cs46xx *chip = entry->private_data; 571 + /*struct dsp_spos_instance * ins = chip->dsp_spos_instance; */ 572 + unsigned int i, col = 0; 581 573 void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; 582 - symbol_entry_t * symbol; 574 + struct dsp_symbol_entry * symbol; 583 575 584 576 for (i = 0;i < DSP_PARAMETER_BYTE_SIZE; i += sizeof(u32),col ++) { 585 577 if (col == 4) { ··· 601 591 } 602 592 } 603 593 604 - static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 594 + static void cs46xx_dsp_proc_sample_dump_read (struct snd_info_entry *entry, 595 + struct snd_info_buffer *buffer) 605 596 { 606 - cs46xx_t *chip = entry->private_data; 597 + struct snd_cs46xx *chip = entry->private_data; 607 598 int i,col = 0; 608 599 void __iomem *dst = chip->region.idx[2].remap_addr; 609 600 ··· 749 738 snd_iprintf(buffer,"\n"); 750 739 } 751 740 752 - int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip) 741 + int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) 753 742 { 754 - snd_info_entry_t *entry; 755 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 743 + struct snd_info_entry *entry; 744 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 756 745 int i; 757 746 758 747 ins->snd_card = card; ··· 863 852 return 0; 864 853 } 865 854 866 - int cs46xx_dsp_proc_done (cs46xx_t *chip) 855 + int cs46xx_dsp_proc_done (struct snd_cs46xx *chip) 867 856 { 868 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 857 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 869 858 int i; 870 859 871 860 if (ins->proc_sym_info_entry) { ··· 914 903 } 915 904 916 905 static int debug_tree; 917 - static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32 dest, int size) 906 + static void _dsp_create_task_tree (struct snd_cs46xx *chip, u32 * task_data, 907 + u32 dest, int size) 918 908 { 919 909 void __iomem *spdst = chip->region.idx[1].remap_addr + 920 910 DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32); ··· 929 917 } 930 918 931 919 static int debug_scb; 932 - static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32 dest) 920 + static void _dsp_create_scb (struct snd_cs46xx *chip, u32 * scb_data, u32 dest) 933 921 { 934 922 void __iomem *spdst = chip->region.idx[1].remap_addr + 935 923 DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32); ··· 942 930 } 943 931 } 944 932 945 - static int find_free_scb_index (dsp_spos_instance_t * ins) 933 + static int find_free_scb_index (struct dsp_spos_instance * ins) 946 934 { 947 935 int index = ins->nscb, i; 948 936 ··· 956 944 return index; 957 945 } 958 946 959 - static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest) 947 + static struct dsp_scb_descriptor * _map_scb (struct snd_cs46xx *chip, char * name, u32 dest) 960 948 { 961 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 962 - dsp_scb_descriptor_t * desc = NULL; 949 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 950 + struct dsp_scb_descriptor * desc = NULL; 963 951 int index; 964 952 965 953 if (ins->nscb == DSP_MAX_SCB_DESC - 1) { ··· 989 977 return desc; 990 978 } 991 979 992 - static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 dest,u32 size) 980 + static struct dsp_task_descriptor * 981 + _map_task_tree (struct snd_cs46xx *chip, char * name, u32 dest, u32 size) 993 982 { 994 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 995 - dsp_task_descriptor_t * desc = NULL; 983 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 984 + struct dsp_task_descriptor * desc = NULL; 996 985 997 986 if (ins->ntask == DSP_MAX_TASK_DESC - 1) { 998 987 snd_printk(KERN_ERR "dsp_spos: got no place for other TASK\n"); ··· 1013 1000 return desc; 1014 1001 } 1015 1002 1016 - dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest) 1003 + struct dsp_scb_descriptor * 1004 + cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest) 1017 1005 { 1018 - dsp_scb_descriptor_t * desc; 1006 + struct dsp_scb_descriptor * desc; 1019 1007 1020 1008 desc = _map_scb (chip,name,dest); 1021 1009 if (desc) { ··· 1029 1015 } 1030 1016 1031 1017 1032 - static dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size) 1018 + static struct dsp_task_descriptor * 1019 + cs46xx_dsp_create_task_tree (struct snd_cs46xx *chip, char * name, u32 * task_data, 1020 + u32 dest, int size) 1033 1021 { 1034 - dsp_task_descriptor_t * desc; 1022 + struct dsp_task_descriptor * desc; 1035 1023 1036 1024 desc = _map_task_tree (chip,name,dest,size); 1037 1025 if (desc) { ··· 1045 1029 return desc; 1046 1030 } 1047 1031 1048 - int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip) 1032 + int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip) 1049 1033 { 1050 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1051 - symbol_entry_t * fg_task_tree_header_code; 1052 - symbol_entry_t * task_tree_header_code; 1053 - symbol_entry_t * task_tree_thread; 1054 - symbol_entry_t * null_algorithm; 1055 - symbol_entry_t * magic_snoop_task; 1034 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1035 + struct dsp_symbol_entry * fg_task_tree_header_code; 1036 + struct dsp_symbol_entry * task_tree_header_code; 1037 + struct dsp_symbol_entry * task_tree_thread; 1038 + struct dsp_symbol_entry * null_algorithm; 1039 + struct dsp_symbol_entry * magic_snoop_task; 1056 1040 1057 - dsp_scb_descriptor_t * timing_master_scb; 1058 - dsp_scb_descriptor_t * codec_out_scb; 1059 - dsp_scb_descriptor_t * codec_in_scb; 1060 - dsp_scb_descriptor_t * src_task_scb; 1061 - dsp_scb_descriptor_t * master_mix_scb; 1062 - dsp_scb_descriptor_t * rear_mix_scb; 1063 - dsp_scb_descriptor_t * record_mix_scb; 1064 - dsp_scb_descriptor_t * write_back_scb; 1065 - dsp_scb_descriptor_t * vari_decimate_scb; 1066 - dsp_scb_descriptor_t * rear_codec_out_scb; 1067 - dsp_scb_descriptor_t * clfe_codec_out_scb; 1068 - dsp_scb_descriptor_t * magic_snoop_scb; 1041 + struct dsp_scb_descriptor * timing_master_scb; 1042 + struct dsp_scb_descriptor * codec_out_scb; 1043 + struct dsp_scb_descriptor * codec_in_scb; 1044 + struct dsp_scb_descriptor * src_task_scb; 1045 + struct dsp_scb_descriptor * master_mix_scb; 1046 + struct dsp_scb_descriptor * rear_mix_scb; 1047 + struct dsp_scb_descriptor * record_mix_scb; 1048 + struct dsp_scb_descriptor * write_back_scb; 1049 + struct dsp_scb_descriptor * vari_decimate_scb; 1050 + struct dsp_scb_descriptor * rear_codec_out_scb; 1051 + struct dsp_scb_descriptor * clfe_codec_out_scb; 1052 + struct dsp_scb_descriptor * magic_snoop_scb; 1069 1053 1070 - int fifo_addr,fifo_span,valid_slots; 1054 + int fifo_addr, fifo_span, valid_slots; 1071 1055 1072 - static spos_control_block_t sposcb = { 1056 + static struct dsp_spos_control_block sposcb = { 1073 1057 /* 0 */ HFG_TREE_SCB,HFG_STACK, 1074 1058 /* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR, 1075 1059 /* 2 */ DSP_SPOS_DC,0, ··· 1122 1106 1123 1107 { 1124 1108 /* create the null SCB */ 1125 - static generic_scb_t null_scb = { 1109 + static struct dsp_generic_scb null_scb = { 1126 1110 { 0, 0, 0, 0 }, 1127 1111 { 0, 0, 0, 0, 0 }, 1128 1112 NULL_SCB_ADDR, NULL_SCB_ADDR, ··· 1144 1128 1145 1129 { 1146 1130 /* setup foreground task tree */ 1147 - static task_tree_control_block_t fg_task_tree_hdr = { 1131 + static struct dsp_task_tree_control_block fg_task_tree_hdr = { 1148 1132 { FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10), 1149 1133 DSP_SPOS_DC_DC, 1150 1134 DSP_SPOS_DC_DC, ··· 1220 1204 1221 1205 { 1222 1206 /* setup foreground task tree */ 1223 - static task_tree_control_block_t bg_task_tree_hdr = { 1207 + static struct dsp_task_tree_control_block bg_task_tree_hdr = { 1224 1208 { DSP_SPOS_DC_DC, 1225 1209 DSP_SPOS_DC_DC, 1226 1210 DSP_SPOS_DC_DC, ··· 1329 1313 if (!write_back_scb) goto _fail_end; 1330 1314 1331 1315 { 1332 - static mix2_ostream_spb_t mix2_ostream_spb = { 1316 + static struct dsp_mix2_ostream_spb mix2_ostream_spb = { 1333 1317 0x00020000, 1334 1318 0x0000ffff 1335 1319 }; ··· 1464 1448 return -EINVAL; 1465 1449 } 1466 1450 1467 - static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry) 1451 + static int cs46xx_dsp_async_init (struct snd_cs46xx *chip, 1452 + struct dsp_scb_descriptor * fg_entry) 1468 1453 { 1469 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1470 - symbol_entry_t * s16_async_codec_input_task; 1471 - symbol_entry_t * spdifo_task; 1472 - symbol_entry_t * spdifi_task; 1473 - dsp_scb_descriptor_t * spdifi_scb_desc,* spdifo_scb_desc,* async_codec_scb_desc; 1454 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1455 + struct dsp_symbol_entry * s16_async_codec_input_task; 1456 + struct dsp_symbol_entry * spdifo_task; 1457 + struct dsp_symbol_entry * spdifi_task; 1458 + struct dsp_scb_descriptor * spdifi_scb_desc, * spdifo_scb_desc, * async_codec_scb_desc; 1474 1459 1475 1460 s16_async_codec_input_task = cs46xx_dsp_lookup_symbol(chip, "S16_ASYNCCODECINPUTTASK", SYMBOL_CODE); 1476 1461 if (s16_async_codec_input_task == NULL) { ··· 1492 1475 1493 1476 { 1494 1477 /* 0xBC0 */ 1495 - spdifoscb_t spdifo_scb = { 1478 + struct dsp_spdifoscb spdifo_scb = { 1496 1479 /* 0 */ DSP_SPOS_UUUU, 1497 1480 { 1498 1481 /* 1 */ 0xb0, ··· 1521 1504 }; 1522 1505 1523 1506 /* 0xBB0 */ 1524 - spdifiscb_t spdifi_scb = { 1507 + struct dsp_spdifiscb spdifi_scb = { 1525 1508 /* 0 */ DSP_SPOS_UULO,DSP_SPOS_UUHI, 1526 1509 /* 1 */ 0, 1527 1510 /* 2 */ 0, ··· 1546 1529 }; 1547 1530 1548 1531 /* 0xBA0 */ 1549 - async_codec_input_scb_t async_codec_input_scb = { 1532 + struct dsp_async_codec_input_scb async_codec_input_scb = { 1550 1533 /* 0 */ DSP_SPOS_UUUU, 1551 1534 /* 1 */ 0, 1552 1535 /* 2 */ 0, ··· 1637 1620 } 1638 1621 1639 1622 1640 - static void cs46xx_dsp_disable_spdif_hw (cs46xx_t *chip) 1623 + static void cs46xx_dsp_disable_spdif_hw (struct snd_cs46xx *chip) 1641 1624 { 1642 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1625 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1643 1626 1644 1627 /* set SPDIF output FIFO slot */ 1645 1628 snd_cs46xx_pokeBA0(chip, BA0_ASER_FADDR, 0); ··· 1658 1641 ins->spdif_status_out &= ~DSP_SPDIF_STATUS_HW_ENABLED; 1659 1642 } 1660 1643 1661 - int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip) 1644 + int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip) 1662 1645 { 1663 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1646 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1664 1647 1665 1648 /* if hw-ctrl already enabled, turn off to reset logic ... */ 1666 1649 cs46xx_dsp_disable_spdif_hw (chip); ··· 1681 1664 return 0; 1682 1665 } 1683 1666 1684 - int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip) 1667 + int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip) 1685 1668 { 1686 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1669 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1687 1670 1688 1671 /* turn on amplifier */ 1689 1672 chip->active_ctrl(chip, 1); ··· 1741 1724 return 0; 1742 1725 } 1743 1726 1744 - int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip) 1727 + int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip) 1745 1728 { 1746 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1729 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1747 1730 1748 1731 snd_assert (ins->asynch_rx_scb != NULL, return -EINVAL); 1749 1732 snd_assert (ins->spdif_in_src != NULL,return -EINVAL); ··· 1767 1750 return 0; 1768 1751 } 1769 1752 1770 - int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip) 1753 + int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip) 1771 1754 { 1772 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1755 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1773 1756 1774 1757 snd_assert (ins->pcm_input == NULL,return -EINVAL); 1775 1758 snd_assert (ins->ref_snoop_scb != NULL,return -EINVAL); ··· 1782 1765 return 0; 1783 1766 } 1784 1767 1785 - int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip) 1768 + int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip) 1786 1769 { 1787 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1770 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1788 1771 1789 1772 snd_assert (ins->pcm_input != NULL,return -EINVAL); 1790 1773 ··· 1796 1779 return 0; 1797 1780 } 1798 1781 1799 - int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip) 1782 + int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip) 1800 1783 { 1801 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1784 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1802 1785 1803 1786 snd_assert (ins->adc_input == NULL,return -EINVAL); 1804 1787 snd_assert (ins->codec_in_scb != NULL,return -EINVAL); ··· 1811 1794 return 0; 1812 1795 } 1813 1796 1814 - int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip) 1797 + int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip) 1815 1798 { 1816 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1799 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1817 1800 1818 1801 snd_assert (ins->adc_input != NULL,return -EINVAL); 1819 1802 ··· 1825 1808 return 0; 1826 1809 } 1827 1810 1828 - int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data) 1811 + int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data) 1829 1812 { 1830 1813 u32 temp; 1831 1814 int i; ··· 1862 1845 return 0; 1863 1846 } 1864 1847 1865 - int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right) 1848 + int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right) 1866 1849 { 1867 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1868 - dsp_scb_descriptor_t * scb; 1850 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1851 + struct dsp_scb_descriptor * scb; 1869 1852 1870 1853 down(&chip->spos_mutex); 1871 1854 ··· 1891 1874 return 0; 1892 1875 } 1893 1876 1894 - int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right) { 1895 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1877 + int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right) 1878 + { 1879 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1896 1880 1897 1881 down(&chip->spos_mutex); 1898 1882
+10 -8
sound/pci/cs46xx/dsp_spos.h
··· 43 43 /* this instruction types 44 44 needs to be reallocated when load 45 45 code into DSP */ 46 - typedef enum { 46 + enum wide_opcode { 47 47 WIDE_FOR_BEGIN_LOOP = 0x20, 48 48 WIDE_FOR_BEGIN_LOOP2, 49 49 ··· 58 58 WIDE_TBEQ_COND_CALL1_ADDR, 59 59 WIDE_TBEQ_NCOND_GOTOI_ADDR, 60 60 WIDE_TBEQ_NCOND_CALL1_ADDR, 61 - } wide_opcode_t; 61 + }; 62 62 63 63 /* SAMPLE segment */ 64 64 #define VARI_DECIMATE_BUF1 0x0000 ··· 186 186 #define SP_SPDOUT_CONTROL 0x804D 187 187 #define SP_SPDOUT_CSUV 0x808E 188 188 189 - static inline u8 _wrap_all_bits (u8 val) { 189 + static inline u8 _wrap_all_bits (u8 val) 190 + { 190 191 u8 wrapped; 191 192 192 193 /* wrap all 8 bits */ ··· 202 201 ((val & 0x80) >> 7); 203 202 204 203 return wrapped; 205 - 206 204 } 207 205 208 - 209 - static inline void cs46xx_dsp_spos_update_scb (cs46xx_t * chip,dsp_scb_descriptor_t * scb) 206 + static inline void cs46xx_dsp_spos_update_scb (struct snd_cs46xx * chip, 207 + struct dsp_scb_descriptor * scb) 210 208 { 211 209 /* update nextSCB and subListPtr in SCB */ 212 210 snd_cs46xx_poke(chip, ··· 214 214 (scb->next_scb_ptr->address)); 215 215 } 216 216 217 - static inline void cs46xx_dsp_scb_set_volume (cs46xx_t * chip,dsp_scb_descriptor_t * scb, 218 - u16 left,u16 right) { 217 + static inline void cs46xx_dsp_scb_set_volume (struct snd_cs46xx * chip, 218 + struct dsp_scb_descriptor * scb, 219 + u16 left, u16 right) 220 + { 219 221 unsigned int val = ((0xffff - left) << 16 | (0xffff - right)); 220 222 221 223 snd_cs46xx_poke(chip, (scb->address + SCBVolumeCtrl) << 2, val);
+173 -165
sound/pci/cs46xx/dsp_spos_scb_lib.c
··· 36 36 #include "cs46xx_lib.h" 37 37 #include "dsp_spos.h" 38 38 39 - typedef struct _proc_scb_info_t { 40 - dsp_scb_descriptor_t * scb_desc; 41 - cs46xx_t *chip; 42 - } proc_scb_info_t; 39 + struct proc_scb_info { 40 + struct dsp_scb_descriptor * scb_desc; 41 + struct snd_cs46xx *chip; 42 + }; 43 43 44 - static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol) 44 + static void remove_symbol (struct snd_cs46xx * chip, struct dsp_symbol_entry * symbol) 45 45 { 46 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 46 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 47 47 int symbol_index = (int)(symbol - ins->symbol_table.symbols); 48 48 49 49 snd_assert(ins->symbol_table.nsymbols > 0,return); ··· 64 64 65 65 } 66 66 67 - static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) 67 + static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry, 68 + struct snd_info_buffer *buffer) 68 69 { 69 - proc_scb_info_t * scb_info = (proc_scb_info_t *)entry->private_data; 70 - dsp_scb_descriptor_t * scb = scb_info->scb_desc; 71 - dsp_spos_instance_t * ins; 72 - cs46xx_t *chip = scb_info->chip; 70 + struct proc_scb_info * scb_info = entry->private_data; 71 + struct dsp_scb_descriptor * scb = scb_info->scb_desc; 72 + struct dsp_spos_instance * ins; 73 + struct snd_cs46xx *chip = scb_info->chip; 73 74 int j,col; 74 75 void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; 75 76 ··· 107 106 up(&chip->spos_mutex); 108 107 } 109 108 110 - static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb) 109 + static void _dsp_unlink_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb) 111 110 { 112 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 111 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 113 112 unsigned long flags; 114 113 115 114 if ( scb->parent_scb_ptr ) { ··· 161 160 } 162 161 } 163 162 164 - static void _dsp_clear_sample_buffer (cs46xx_t *chip, u32 sample_buffer_addr, int dword_count) 163 + static void _dsp_clear_sample_buffer (struct snd_cs46xx *chip, u32 sample_buffer_addr, 164 + int dword_count) 165 165 { 166 166 void __iomem *dst = chip->region.idx[2].remap_addr + sample_buffer_addr; 167 167 int i; ··· 173 171 } 174 172 } 175 173 176 - void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb) 174 + void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb) 177 175 { 178 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 176 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 179 177 180 178 /* check integrety */ 181 179 snd_assert ( (scb->index >= 0 && ··· 220 218 } 221 219 222 220 223 - void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb) 221 + void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb) 224 222 { 225 223 if (scb->proc_info) { 226 - proc_scb_info_t * scb_info = (proc_scb_info_t *)scb->proc_info->private_data; 224 + struct proc_scb_info * scb_info = scb->proc_info->private_data; 227 225 228 226 snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name); 229 227 ··· 235 233 } 236 234 } 237 235 238 - void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb) 236 + void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, 237 + struct dsp_scb_descriptor * scb) 239 238 { 240 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 241 - snd_info_entry_t * entry; 242 - proc_scb_info_t * scb_info; 239 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 240 + struct snd_info_entry * entry; 241 + struct proc_scb_info * scb_info; 243 242 244 243 /* register to proc */ 245 244 if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL && ··· 248 245 249 246 if ((entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, 250 247 ins->proc_dsp_dir)) != NULL) { 251 - scb_info = kmalloc(sizeof(proc_scb_info_t), GFP_KERNEL); 248 + scb_info = kmalloc(sizeof(struct proc_scb_info), GFP_KERNEL); 252 249 if (!scb_info) { 253 250 snd_info_free_entry(entry); 254 251 entry = NULL; ··· 276 273 } 277 274 } 278 275 279 - static dsp_scb_descriptor_t * 280 - _dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest, 281 - symbol_entry_t * task_entry, 282 - dsp_scb_descriptor_t * parent_scb, 276 + static struct dsp_scb_descriptor * 277 + _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest, 278 + struct dsp_symbol_entry * task_entry, 279 + struct dsp_scb_descriptor * parent_scb, 283 280 int scb_child_type) 284 281 { 285 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 286 - dsp_scb_descriptor_t * scb; 282 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 283 + struct dsp_scb_descriptor * scb; 287 284 288 285 unsigned long flags; 289 286 ··· 345 342 return scb; 346 343 } 347 344 348 - static dsp_scb_descriptor_t * 349 - cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest, 350 - char * task_entry_name, 351 - dsp_scb_descriptor_t * parent_scb, 345 + static struct dsp_scb_descriptor * 346 + cs46xx_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, 347 + u32 dest, char * task_entry_name, 348 + struct dsp_scb_descriptor * parent_scb, 352 349 int scb_child_type) 353 350 { 354 - symbol_entry_t * task_entry; 351 + struct dsp_symbol_entry * task_entry; 355 352 356 353 task_entry = cs46xx_dsp_lookup_symbol (chip,task_entry_name, 357 354 SYMBOL_CODE); ··· 365 362 parent_scb,scb_child_type); 366 363 } 367 364 368 - dsp_scb_descriptor_t * 369 - cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip) 365 + struct dsp_scb_descriptor * 366 + cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip) 370 367 { 371 - dsp_scb_descriptor_t * scb; 368 + struct dsp_scb_descriptor * scb; 372 369 373 - timing_master_scb_t timing_master_scb = { 370 + struct dsp_timing_master_scb timing_master_scb = { 374 371 { 0, 375 372 0, 376 373 0, ··· 399 396 } 400 397 401 398 402 - dsp_scb_descriptor_t * 403 - cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name, 404 - u16 channel_disp,u16 fifo_addr, 405 - u16 child_scb_addr, 406 - u32 dest,dsp_scb_descriptor_t * parent_scb, 399 + struct dsp_scb_descriptor * 400 + cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip, char * codec_name, 401 + u16 channel_disp, u16 fifo_addr, u16 child_scb_addr, 402 + u32 dest, struct dsp_scb_descriptor * parent_scb, 407 403 int scb_child_type) 408 404 { 409 - dsp_scb_descriptor_t * scb; 405 + struct dsp_scb_descriptor * scb; 410 406 411 - codec_output_scb_t codec_out_scb = { 407 + struct dsp_codec_output_scb codec_out_scb = { 412 408 { 0, 413 409 0, 414 410 0, ··· 437 435 return scb; 438 436 } 439 437 440 - dsp_scb_descriptor_t * 441 - cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, 442 - u16 channel_disp,u16 fifo_addr, 443 - u16 sample_buffer_addr, 444 - u32 dest,dsp_scb_descriptor_t * parent_scb, 445 - int scb_child_type) 438 + struct dsp_scb_descriptor * 439 + cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name, 440 + u16 channel_disp, u16 fifo_addr, u16 sample_buffer_addr, 441 + u32 dest, struct dsp_scb_descriptor * parent_scb, 442 + int scb_child_type) 446 443 { 447 444 448 - dsp_scb_descriptor_t * scb; 449 - codec_input_scb_t codec_input_scb = { 445 + struct dsp_scb_descriptor * scb; 446 + struct dsp_codec_input_scb codec_input_scb = { 450 447 { 0, 451 448 0, 452 449 0, ··· 482 481 } 483 482 484 483 485 - static dsp_scb_descriptor_t * 486 - cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name, 487 - u16 sample_buffer_addr,u32 dest, 484 + static struct dsp_scb_descriptor * 485 + cs46xx_dsp_create_pcm_reader_scb(struct snd_cs46xx * chip, char * scb_name, 486 + u16 sample_buffer_addr, u32 dest, 488 487 int virtual_channel, u32 playback_hw_addr, 489 - dsp_scb_descriptor_t * parent_scb, 488 + struct dsp_scb_descriptor * parent_scb, 490 489 int scb_child_type) 491 490 { 492 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 493 - dsp_scb_descriptor_t * scb; 491 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 492 + struct dsp_scb_descriptor * scb; 494 493 495 - generic_scb_t pcm_reader_scb = { 494 + struct dsp_generic_scb pcm_reader_scb = { 496 495 497 496 /* 498 497 Play DMA Task xfers data from host buffer to SP buffer ··· 585 584 586 585 #define GOF_PER_SEC 200 587 586 588 - dsp_scb_descriptor_t * 589 - cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, 587 + struct dsp_scb_descriptor * 588 + cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name, 590 589 int rate, 591 590 u16 src_buffer_addr, 592 - u16 src_delay_buffer_addr,u32 dest, 593 - dsp_scb_descriptor_t * parent_scb, 591 + u16 src_delay_buffer_addr, u32 dest, 592 + struct dsp_scb_descriptor * parent_scb, 594 593 int scb_child_type, 595 594 int pass_through) 596 595 { 597 596 598 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 599 - dsp_scb_descriptor_t * scb; 597 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 598 + struct dsp_scb_descriptor * scb; 600 599 unsigned int tmp1, tmp2; 601 600 unsigned int phiIncr; 602 601 unsigned int correctionPerGOF, correctionPerSec; ··· 633 632 correctionPerSec = tmp1; 634 633 635 634 { 636 - src_task_scb_t src_task_scb = { 635 + struct dsp_src_task_scb src_task_scb = { 637 636 0x0028,0x00c8, 638 637 0x5555,0x0000, 639 638 0x0000,0x0000, ··· 689 688 } 690 689 691 690 #if 0 /* not used */ 692 - dsp_scb_descriptor_t * 693 - cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name, 694 - u16 buffer_addr,u32 dest, 695 - dsp_scb_descriptor_t * parent_scb, 691 + struct dsp_scb_descriptor * 692 + cs46xx_dsp_create_filter_scb(struct snd_cs46xx * chip, char * scb_name, 693 + u16 buffer_addr, u32 dest, 694 + struct dsp_scb_descriptor * parent_scb, 696 695 int scb_child_type) { 697 - dsp_scb_descriptor_t * scb; 696 + struct dsp_scb_descriptor * scb; 698 697 699 - filter_scb_t filter_scb = { 698 + struct dsp_filter_scb filter_scb = { 700 699 .a0_right = 0x41a9, 701 700 .a0_left = 0x41a9, 702 701 .a1_right = 0xb8e4, ··· 739 738 } 740 739 #endif /* not used */ 741 740 742 - dsp_scb_descriptor_t * 743 - cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name, 744 - u16 mix_buffer_addr,u32 dest, 745 - dsp_scb_descriptor_t * parent_scb, 741 + struct dsp_scb_descriptor * 742 + cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name, 743 + u16 mix_buffer_addr, u32 dest, 744 + struct dsp_scb_descriptor * parent_scb, 746 745 int scb_child_type) 747 746 { 748 - dsp_scb_descriptor_t * scb; 747 + struct dsp_scb_descriptor * scb; 749 748 750 - mix_only_scb_t master_mix_scb = { 749 + struct dsp_mix_only_scb master_mix_scb = { 751 750 /* 0 */ { 0, 752 751 /* 1 */ 0, 753 752 /* 2 */ mix_buffer_addr, ··· 779 778 } 780 779 781 780 782 - dsp_scb_descriptor_t * 783 - cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name, 784 - u16 mix_buffer_addr,u16 writeback_spb,u32 dest, 785 - dsp_scb_descriptor_t * parent_scb, 781 + struct dsp_scb_descriptor * 782 + cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name, 783 + u16 mix_buffer_addr, u16 writeback_spb, u32 dest, 784 + struct dsp_scb_descriptor * parent_scb, 786 785 int scb_child_type) 787 786 { 788 - dsp_scb_descriptor_t * scb; 787 + struct dsp_scb_descriptor * scb; 789 788 790 - mix2_ostream_scb_t mix2_ostream_scb = { 789 + struct dsp_mix2_ostream_scb mix2_ostream_scb = { 791 790 /* Basic (non scatter/gather) DMA requestor (4 ints) */ 792 791 { 793 792 DMA_RQ_C1_SOURCE_MOD64 + ··· 833 832 } 834 833 835 834 836 - dsp_scb_descriptor_t * 837 - cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name, 835 + struct dsp_scb_descriptor * 836 + cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip,char * scb_name, 838 837 u16 vari_buffer_addr0, 839 838 u16 vari_buffer_addr1, 840 839 u32 dest, 841 - dsp_scb_descriptor_t * parent_scb, 840 + struct dsp_scb_descriptor * parent_scb, 842 841 int scb_child_type) 843 842 { 844 843 845 - dsp_scb_descriptor_t * scb; 844 + struct dsp_scb_descriptor * scb; 846 845 847 - vari_decimate_scb_t vari_decimate_scb = { 846 + struct dsp_vari_decimate_scb vari_decimate_scb = { 848 847 0x0028,0x00c8, 849 848 0x5555,0x0000, 850 849 0x0000,0x0000, ··· 877 876 } 878 877 879 878 880 - static dsp_scb_descriptor_t * 881 - cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest, 882 - dsp_scb_descriptor_t * input_scb, 883 - dsp_scb_descriptor_t * parent_scb, 879 + static struct dsp_scb_descriptor * 880 + cs46xx_dsp_create_pcm_serial_input_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 881 + struct dsp_scb_descriptor * input_scb, 882 + struct dsp_scb_descriptor * parent_scb, 884 883 int scb_child_type) 885 884 { 886 885 887 - dsp_scb_descriptor_t * scb; 886 + struct dsp_scb_descriptor * scb; 888 887 889 888 890 - pcm_serial_input_scb_t pcm_serial_input_scb = { 889 + struct dsp_pcm_serial_input_scb pcm_serial_input_scb = { 891 890 { 0, 892 891 0, 893 892 0, ··· 920 919 } 921 920 922 921 923 - static dsp_scb_descriptor_t * 924 - cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest, 922 + static struct dsp_scb_descriptor * 923 + cs46xx_dsp_create_asynch_fg_tx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 925 924 u16 hfg_scb_address, 926 925 u16 asynch_buffer_address, 927 - dsp_scb_descriptor_t * parent_scb, 926 + struct dsp_scb_descriptor * parent_scb, 928 927 int scb_child_type) 929 928 { 930 929 931 - dsp_scb_descriptor_t * scb; 930 + struct dsp_scb_descriptor * scb; 932 931 933 - asynch_fg_tx_scb_t asynch_fg_tx_scb = { 932 + struct dsp_asynch_fg_tx_scb asynch_fg_tx_scb = { 934 933 0xfc00,0x03ff, /* Prototype sample buffer size of 256 dwords */ 935 934 0x0058,0x0028, /* Min Delta 7 dwords == 28 bytes */ 936 935 /* : Max delta 25 dwords == 100 bytes */ ··· 967 966 } 968 967 969 968 970 - dsp_scb_descriptor_t * 971 - cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest, 969 + struct dsp_scb_descriptor * 970 + cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 972 971 u16 hfg_scb_address, 973 972 u16 asynch_buffer_address, 974 - dsp_scb_descriptor_t * parent_scb, 973 + struct dsp_scb_descriptor * parent_scb, 975 974 int scb_child_type) 976 975 { 977 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 978 - dsp_scb_descriptor_t * scb; 976 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 977 + struct dsp_scb_descriptor * scb; 979 978 980 - asynch_fg_rx_scb_t asynch_fg_rx_scb = { 979 + struct dsp_asynch_fg_rx_scb asynch_fg_rx_scb = { 981 980 0xfe00,0x01ff, /* Prototype sample buffer size of 128 dwords */ 982 981 0x0064,0x001c, /* Min Delta 7 dwords == 28 bytes */ 983 982 /* : Max delta 25 dwords == 100 bytes */ ··· 1017 1016 1018 1017 1019 1018 #if 0 /* not used */ 1020 - dsp_scb_descriptor_t * 1021 - cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, 1019 + struct dsp_scb_descriptor * 1020 + cs46xx_dsp_create_output_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 1022 1021 u16 snoop_buffer_address, 1023 - dsp_scb_descriptor_t * snoop_scb, 1024 - dsp_scb_descriptor_t * parent_scb, 1022 + struct dsp_scb_descriptor * snoop_scb, 1023 + struct dsp_scb_descriptor * parent_scb, 1025 1024 int scb_child_type) 1026 1025 { 1027 1026 1028 - dsp_scb_descriptor_t * scb; 1027 + struct dsp_scb_descriptor * scb; 1029 1028 1030 - output_snoop_scb_t output_snoop_scb = { 1029 + struct dsp_output_snoop_scb output_snoop_scb = { 1031 1030 { 0, /* not used. Zero */ 1032 1031 0, 1033 1032 0, ··· 1059 1058 #endif /* not used */ 1060 1059 1061 1060 1062 - dsp_scb_descriptor_t * 1063 - cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest, 1064 - dsp_scb_descriptor_t * parent_scb, 1061 + struct dsp_scb_descriptor * 1062 + cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 1063 + struct dsp_scb_descriptor * parent_scb, 1065 1064 int scb_child_type) 1066 1065 { 1067 - dsp_scb_descriptor_t * scb; 1066 + struct dsp_scb_descriptor * scb; 1068 1067 1069 - spio_write_scb_t spio_write_scb = { 1068 + struct dsp_spio_write_scb spio_write_scb = { 1070 1069 0,0, /* SPIOWAddress2:SPIOWAddress1; */ 1071 1070 0, /* SPIOWData1; */ 1072 1071 0, /* SPIOWData2; */ ··· 1095 1094 return scb; 1096 1095 } 1097 1096 1098 - dsp_scb_descriptor_t * cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, 1099 - u16 snoop_buffer_address, 1100 - dsp_scb_descriptor_t * snoop_scb, 1101 - dsp_scb_descriptor_t * parent_scb, 1102 - int scb_child_type) 1097 + struct dsp_scb_descriptor * 1098 + cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest, 1099 + u16 snoop_buffer_address, 1100 + struct dsp_scb_descriptor * snoop_scb, 1101 + struct dsp_scb_descriptor * parent_scb, 1102 + int scb_child_type) 1103 1103 { 1104 - dsp_scb_descriptor_t * scb; 1104 + struct dsp_scb_descriptor * scb; 1105 1105 1106 - magic_snoop_task_t magic_snoop_scb = { 1106 + struct dsp_magic_snoop_task magic_snoop_scb = { 1107 1107 /* 0 */ 0, /* i0 */ 1108 1108 /* 1 */ 0, /* i1 */ 1109 1109 /* 2 */ snoop_buffer_address << 0x10, ··· 1131 1129 return scb; 1132 1130 } 1133 1131 1134 - static dsp_scb_descriptor_t * find_next_free_scb (cs46xx_t * chip,dsp_scb_descriptor_t * from) 1132 + static struct dsp_scb_descriptor * 1133 + find_next_free_scb (struct snd_cs46xx * chip, struct dsp_scb_descriptor * from) 1135 1134 { 1136 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1137 - dsp_scb_descriptor_t * scb = from; 1135 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1136 + struct dsp_scb_descriptor * scb = from; 1138 1137 1139 1138 while (scb->next_scb_ptr != ins->the_null_scb) { 1140 1139 snd_assert (scb->next_scb_ptr != NULL, return NULL); ··· 1215 1212 0x2B00 1216 1213 }; 1217 1214 1218 - pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip, 1219 - u32 sample_rate, void * private_data, 1220 - u32 hw_dma_addr, 1221 - int pcm_channel_id) 1215 + struct dsp_pcm_channel_descriptor * 1216 + cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, 1217 + u32 sample_rate, void * private_data, 1218 + u32 hw_dma_addr, 1219 + int pcm_channel_id) 1222 1220 { 1223 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1224 - dsp_scb_descriptor_t * src_scb = NULL,* pcm_scb, * mixer_scb = NULL; 1225 - dsp_scb_descriptor_t * src_parent_scb = NULL; 1221 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1222 + struct dsp_scb_descriptor * src_scb = NULL, * pcm_scb, * mixer_scb = NULL; 1223 + struct dsp_scb_descriptor * src_parent_scb = NULL; 1226 1224 1227 - /* dsp_scb_descriptor_t * pcm_parent_scb; */ 1225 + /* struct dsp_scb_descriptor * pcm_parent_scb; */ 1228 1226 char scb_name[DSP_MAX_SCB_NAME]; 1229 - int i,pcm_index = -1, insert_point, src_index = -1,pass_through = 0; 1227 + int i, pcm_index = -1, insert_point, src_index = -1, pass_through = 0; 1230 1228 unsigned long flags; 1231 1229 1232 1230 switch (pcm_channel_id) { ··· 1375 1371 return (ins->pcm_channels + pcm_index); 1376 1372 } 1377 1373 1378 - int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip, 1379 - pcm_channel_descriptor_t * pcm_channel, 1374 + int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip, 1375 + struct dsp_pcm_channel_descriptor * pcm_channel, 1380 1376 int period_size) 1381 1377 { 1382 1378 u32 temp = snd_cs46xx_peek (chip,pcm_channel->pcm_reader_scb->address << 2); ··· 1414 1410 return 0; 1415 1411 } 1416 1412 1417 - int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip, 1413 + int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, 1418 1414 int period_size) 1419 1415 { 1420 1416 u32 temp = snd_cs46xx_peek (chip,WRITEBACK_SCB_ADDR << 2); ··· 1452 1448 return 0; 1453 1449 } 1454 1450 1455 - void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel) 1451 + void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip, 1452 + struct dsp_pcm_channel_descriptor * pcm_channel) 1456 1453 { 1457 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1454 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1458 1455 unsigned long flags; 1459 1456 1460 1457 snd_assert(pcm_channel->active, return ); ··· 1483 1478 } 1484 1479 } 1485 1480 1486 - int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel) 1481 + int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip, 1482 + struct dsp_pcm_channel_descriptor * pcm_channel) 1487 1483 { 1488 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1484 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1489 1485 unsigned long flags; 1490 1486 1491 1487 snd_assert(pcm_channel->active,return -EIO); ··· 1509 1503 return 0; 1510 1504 } 1511 1505 1512 - int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel) 1506 + int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip, 1507 + struct dsp_pcm_channel_descriptor * pcm_channel) 1513 1508 { 1514 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1515 - dsp_scb_descriptor_t * parent_scb; 1516 - dsp_scb_descriptor_t * src_scb = pcm_channel->src_scb; 1509 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1510 + struct dsp_scb_descriptor * parent_scb; 1511 + struct dsp_scb_descriptor * src_scb = pcm_channel->src_scb; 1517 1512 unsigned long flags; 1518 1513 1519 1514 spin_lock(&pcm_channel->src_scb->lock); ··· 1551 1544 return 0; 1552 1545 } 1553 1546 1554 - dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source, 1555 - u16 addr,char * scb_name) 1547 + struct dsp_scb_descriptor * 1548 + cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source, 1549 + u16 addr, char * scb_name) 1556 1550 { 1557 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1558 - dsp_scb_descriptor_t * parent; 1559 - dsp_scb_descriptor_t * pcm_input; 1551 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1552 + struct dsp_scb_descriptor * parent; 1553 + struct dsp_scb_descriptor * pcm_input; 1560 1554 int insert_point; 1561 1555 1562 1556 snd_assert (ins->record_mixer_scb != NULL,return NULL); ··· 1577 1569 return pcm_input; 1578 1570 } 1579 1571 1580 - int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src) 1572 + int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src) 1581 1573 { 1582 1574 snd_assert (src->parent_scb_ptr != NULL, return -EINVAL ); 1583 1575 ··· 1589 1581 return 0; 1590 1582 } 1591 1583 1592 - int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src) 1584 + int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src) 1593 1585 { 1594 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1595 - dsp_scb_descriptor_t * parent_scb; 1586 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1587 + struct dsp_scb_descriptor * parent_scb; 1596 1588 1597 1589 snd_assert (src->parent_scb_ptr == NULL, return -EINVAL ); 1598 1590 snd_assert(ins->master_mix_scb !=NULL, return -EINVAL ); ··· 1613 1605 return 0; 1614 1606 } 1615 1607 1616 - int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip) 1608 + int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip) 1617 1609 { 1618 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1610 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1619 1611 1620 1612 if ( ! (ins->spdif_status_out & DSP_SPDIF_STATUS_HW_ENABLED) ) { 1621 1613 cs46xx_dsp_enable_spdif_hw (chip); ··· 1661 1653 return 0; 1662 1654 } 1663 1655 1664 - int cs46xx_dsp_disable_spdif_out (cs46xx_t *chip) 1656 + int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip) 1665 1657 { 1666 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1658 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1667 1659 1668 1660 /* dont touch anything if SPDIF is open */ 1669 1661 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) { ··· 1693 1685 return 0; 1694 1686 } 1695 1687 1696 - int cs46xx_iec958_pre_open (cs46xx_t *chip) 1688 + int cs46xx_iec958_pre_open (struct snd_cs46xx *chip) 1697 1689 { 1698 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1690 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1699 1691 1700 1692 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED ) { 1701 1693 /* remove AsynchFGTxSCB and and PCMSerialInput_II */ ··· 1726 1718 return 0; 1727 1719 } 1728 1720 1729 - int cs46xx_iec958_post_close (cs46xx_t *chip) 1721 + int cs46xx_iec958_post_close (struct snd_cs46xx *chip) 1730 1722 { 1731 - dsp_spos_instance_t * ins = chip->dsp_spos_instance; 1723 + struct dsp_spos_instance * ins = chip->dsp_spos_instance; 1732 1724 1733 1725 snd_assert (ins->asynch_tx_scb != NULL, return -EINVAL); 1734 1726
+3 -3
sound/pci/cs46xx/imgs/cwc4630.h
··· 3 3 #ifndef __HEADER_cwc4630_H__ 4 4 #define __HEADER_cwc4630_H__ 5 5 6 - static symbol_entry_t cwc4630_symbols[] = { 6 + static struct dsp_symbol_entry cwc4630_symbols[] = { 7 7 { 0x0000, "BEGINADDRESS",0x00 }, 8 8 { 0x8000, "EXECCHILD",0x03 }, 9 9 { 0x8001, "EXECCHILD_98",0x03 }, ··· 302 302 }; /* #PARAMETER_END */ 303 303 304 304 305 - static segment_desc_t cwc4630_segments[] = { 305 + static struct dsp_segment_desc cwc4630_segments[] = { 306 306 { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000328, cwc4630_code }, 307 307 { SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000080, cwc4630_parameter }, 308 308 }; 309 309 310 - static dsp_module_desc_t cwc4630_module = { 310 + static struct dsp_module_desc cwc4630_module = { 311 311 "cwc4630", 312 312 { 313 313 38,
+3 -3
sound/pci/cs46xx/imgs/cwcasync.h
··· 3 3 #ifndef __HEADER_cwcasync_H__ 4 4 #define __HEADER_cwcasync_H__ 5 5 6 - static symbol_entry_t cwcasync_symbols[] = { 6 + static struct dsp_symbol_entry cwcasync_symbols[] = { 7 7 { 0x8000, "EXECCHILD",0x03 }, 8 8 { 0x8001, "EXECCHILD_98",0x03 }, 9 9 { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, ··· 159 159 }; 160 160 /* #CODE_END */ 161 161 162 - static segment_desc_t cwcasync_segments[] = { 162 + static struct dsp_segment_desc cwcasync_segments[] = { 163 163 { SEGTYPE_SP_PROGRAM, 0x00000000, 0x000001b6, cwcasync_code }, 164 164 }; 165 165 166 - static dsp_module_desc_t cwcasync_module = { 166 + static struct dsp_module_desc cwcasync_module = { 167 167 "cwcasync", 168 168 { 169 169 32,
+3 -3
sound/pci/cs46xx/imgs/cwcbinhack.h
··· 4 4 #ifndef __HEADER_cwcbinhack_H__ 5 5 #define __HEADER_cwcbinhack_H__ 6 6 7 - static symbol_entry_t cwcbinhack_symbols[] = { 7 + static struct dsp_symbol_entry cwcbinhack_symbols[] = { 8 8 { 0x02c8, "OVERLAYBEGINADDRESS",0x00 }, 9 9 { 0x02c8, "MAGICSNOOPTASK",0x03 }, 10 10 { 0x0308, "#CODE_END",0x00 }, ··· 31 31 }; 32 32 /* #CODE_END */ 33 33 34 - static segment_desc_t cwcbinhack_segments[] = { 34 + static struct dsp_segment_desc cwcbinhack_segments[] = { 35 35 { SEGTYPE_SP_PROGRAM, 0x00000000, 64, cwcbinhack_code }, 36 36 }; 37 37 38 - static dsp_module_desc_t cwcbinhack_module = { 38 + static struct dsp_module_desc cwcbinhack_module = { 39 39 "cwcbinhack", 40 40 { 41 41 3,
+3 -3
sound/pci/cs46xx/imgs/cwcdma.h
··· 3 3 #ifndef __HEADER_cwcdma_H__ 4 4 #define __HEADER_cwcdma_H__ 5 5 6 - static symbol_entry_t cwcdma_symbols[] = { 6 + static struct dsp_symbol_entry cwcdma_symbols[] = { 7 7 { 0x8000, "EXECCHILD",0x03 }, 8 8 { 0x8001, "EXECCHILD_98",0x03 }, 9 9 { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, ··· 51 51 52 52 /* #CODE_END */ 53 53 54 - static segment_desc_t cwcdma_segments[] = { 54 + static struct dsp_segment_desc cwcdma_segments[] = { 55 55 { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000030, cwcdma_code }, 56 56 }; 57 57 58 - static dsp_module_desc_t cwcdma_module = { 58 + static struct dsp_module_desc cwcdma_module = { 59 59 "cwcdma", 60 60 { 61 61 27,
+3 -3
sound/pci/cs46xx/imgs/cwcemb80.h
··· 3 3 #ifndef __HEADER_cwcemb80_H__ 4 4 #define __HEADER_cwcemb80_H__ 5 5 6 - static symbol_entry_t cwcemb80_symbols[] = { 6 + static struct dsp_symbol_entry cwcemb80_symbols[] = { 7 7 { 0x0000, "BEGINADDRESS",0x00 }, 8 8 { 0x8000, "EXECCHILD",0x03 }, 9 9 { 0x8001, "EXECCHILD_98",0x03 }, ··· 1588 1588 }; /* #SAMPLE_END */ 1589 1589 1590 1590 1591 - static segment_desc_t cwcemb80_segments[] = { 1591 + static struct dsp_segment_desc cwcemb80_segments[] = { 1592 1592 { SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000031c, cwcemb80_code }, 1593 1593 { SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000697, cwcemb80_parameter }, 1594 1594 { SEGTYPE_SP_SAMPLE, 0x00000000, 0x00000e00, cwcemb80_sample }, 1595 1595 }; 1596 1596 1597 - static dsp_module_desc_t cwcemb80_module = { 1597 + static struct dsp_module_desc cwcemb80_module = { 1598 1598 "cwcemb80", 1599 1599 { 1600 1600 38,
+3 -3
sound/pci/cs46xx/imgs/cwcsnoop.h
··· 3 3 #ifndef __HEADER_cwcsnoop_H__ 4 4 #define __HEADER_cwcsnoop_H__ 5 5 6 - static symbol_entry_t cwcsnoop_symbols[] = { 6 + static struct dsp_symbol_entry cwcsnoop_symbols[] = { 7 7 { 0x0500, "OVERLAYBEGINADDRESS",0x00 }, 8 8 { 0x0500, "OUTPUTSNOOP",0x03 }, 9 9 { 0x051f, "#CODE_END",0x00 }, ··· 29 29 }; 30 30 /* #CODE_END */ 31 31 32 - static segment_desc_t cwcsnoop_segments[] = { 32 + static struct dsp_segment_desc cwcsnoop_segments[] = { 33 33 { SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000003e, cwcsnoop_code }, 34 34 }; 35 35 36 - static dsp_module_desc_t cwcsnoop_module = { 36 + static struct dsp_module_desc cwcsnoop_module = { 37 37 "cwcsnoop", 38 38 { 39 39 3,