aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:48:14 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:45 -0500
commit3d19f804ef5f1d15fe001fc8d1ed58fac9d591fb (patch)
treee3fd21398754a5c970a2c36f745a910c17db3794 /include
parentaf26367f69a474ed809e4a59abb5855b47daaff4 (diff)
[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>
Diffstat (limited to 'include')
-rw-r--r--include/sound/cs46xx.h87
-rw-r--r--include/sound/cs46xx_dsp_scb_types.h145
-rw-r--r--include/sound/cs46xx_dsp_spos.h119
-rw-r--r--include/sound/cs46xx_dsp_task_types.h35
4 files changed, 189 insertions, 197 deletions
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h
index b0c0e192eb56..b33ca2a36300 100644
--- a/include/sound/cs46xx.h
+++ b/include/sound/cs46xx.h
@@ -1631,42 +1631,41 @@
1631#define CS46XX_MIXER_SPDIF_INPUT_ELEMENT 1 1631#define CS46XX_MIXER_SPDIF_INPUT_ELEMENT 1
1632#define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT 2 1632#define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT 2
1633 1633
1634typedef struct _snd_cs46xx cs46xx_t;
1635 1634
1636typedef struct _snd_cs46xx_pcm_t { 1635struct snd_cs46xx_pcm {
1637 struct snd_dma_buffer hw_buf; 1636 struct snd_dma_buffer hw_buf;
1638 1637
1639 unsigned int ctl; 1638 unsigned int ctl;
1640 unsigned int shift; /* Shift count to trasform frames in bytes */ 1639 unsigned int shift; /* Shift count to trasform frames in bytes */
1641 snd_pcm_indirect_t pcm_rec; 1640 struct snd_pcm_indirect pcm_rec;
1642 snd_pcm_substream_t *substream; 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 int pcm_channel_id; /* Fron Rear, Center Lfe ... */ 1645 int pcm_channel_id; /* Fron Rear, Center Lfe ... */
1647} cs46xx_pcm_t; 1646};
1648 1647
1649typedef struct { 1648struct snd_cs46xx_region {
1650 char name[24]; 1649 char name[24];
1651 unsigned long base; 1650 unsigned long base;
1652 void __iomem *remap_addr; 1651 void __iomem *remap_addr;
1653 unsigned long size; 1652 unsigned long size;
1654 struct resource *resource; 1653 struct resource *resource;
1655} snd_cs46xx_region_t; 1654};
1656 1655
1657struct _snd_cs46xx { 1656struct snd_cs46xx {
1658 int irq; 1657 int irq;
1659 unsigned long ba0_addr; 1658 unsigned long ba0_addr;
1660 unsigned long ba1_addr; 1659 unsigned long ba1_addr;
1661 union { 1660 union {
1662 struct { 1661 struct {
1663 snd_cs46xx_region_t ba0; 1662 struct snd_cs46xx_region ba0;
1664 snd_cs46xx_region_t data0; 1663 struct snd_cs46xx_region data0;
1665 snd_cs46xx_region_t data1; 1664 struct snd_cs46xx_region data1;
1666 snd_cs46xx_region_t pmem; 1665 struct snd_cs46xx_region pmem;
1667 snd_cs46xx_region_t reg; 1666 struct snd_cs46xx_region reg;
1668 } name; 1667 } name;
1669 snd_cs46xx_region_t idx[5]; 1668 struct snd_cs46xx_region idx[5];
1670 } region; 1669 } region;
1671 1670
1672 unsigned int mode; 1671 unsigned int mode;
@@ -1676,34 +1675,34 @@ struct _snd_cs46xx {
1676 1675
1677 unsigned int ctl; 1676 unsigned int ctl;
1678 unsigned int shift; /* Shift count to trasform frames in bytes */ 1677 unsigned int shift; /* Shift count to trasform frames in bytes */
1679 snd_pcm_indirect_t pcm_rec; 1678 struct snd_pcm_indirect pcm_rec;
1680 snd_pcm_substream_t *substream; 1679 struct snd_pcm_substream *substream;
1681 } capt; 1680 } capt;
1682 1681
1683 1682
1684 int nr_ac97_codecs; 1683 int nr_ac97_codecs;
1685 ac97_bus_t *ac97_bus; 1684 struct snd_ac97_bus *ac97_bus;
1686 ac97_t *ac97[MAX_NR_AC97]; 1685 struct snd_ac97 *ac97[MAX_NR_AC97];
1687 1686
1688 struct pci_dev *pci; 1687 struct pci_dev *pci;
1689 snd_card_t *card; 1688 struct snd_card *card;
1690 snd_pcm_t *pcm; 1689 struct snd_pcm *pcm;
1691 1690
1692 snd_rawmidi_t *rmidi; 1691 struct snd_rawmidi *rmidi;
1693 snd_rawmidi_substream_t *midi_input; 1692 struct snd_rawmidi_substream *midi_input;
1694 snd_rawmidi_substream_t *midi_output; 1693 struct snd_rawmidi_substream *midi_output;
1695 1694
1696 spinlock_t reg_lock; 1695 spinlock_t reg_lock;
1697 unsigned int midcr; 1696 unsigned int midcr;
1698 unsigned int uartm; 1697 unsigned int uartm;
1699 1698
1700 int amplifier; 1699 int amplifier;
1701 void (*amplifier_ctrl)(cs46xx_t *, int); 1700 void (*amplifier_ctrl)(struct snd_cs46xx *, int);
1702 void (*active_ctrl)(cs46xx_t *, int); 1701 void (*active_ctrl)(struct snd_cs46xx *, int);
1703 void (*mixer_init)(cs46xx_t *); 1702 void (*mixer_init)(struct snd_cs46xx *);
1704 1703
1705 int acpi_port; 1704 int acpi_port;
1706 snd_kcontrol_t *eapd_switch; /* for amplifier hack */ 1705 struct snd_kcontrol *eapd_switch; /* for amplifier hack */
1707 int accept_valid; /* accept mmap valid (for OSS) */ 1706 int accept_valid; /* accept mmap valid (for OSS) */
1708 1707
1709 struct gameport *gameport; 1708 struct gameport *gameport;
@@ -1714,29 +1713,29 @@ struct _snd_cs46xx {
1714#ifdef CONFIG_SND_CS46XX_NEW_DSP 1713#ifdef CONFIG_SND_CS46XX_NEW_DSP
1715 struct semaphore spos_mutex; 1714 struct semaphore spos_mutex;
1716 1715
1717 dsp_spos_instance_t * dsp_spos_instance; 1716 struct dsp_spos_instance * dsp_spos_instance;
1718 1717
1719 snd_pcm_t *pcm_rear; 1718 struct snd_pcm *pcm_rear;
1720 snd_pcm_t *pcm_center_lfe; 1719 struct snd_pcm *pcm_center_lfe;
1721 snd_pcm_t *pcm_iec958; 1720 struct snd_pcm *pcm_iec958;
1722#else /* for compatibility */ 1721#else /* for compatibility */
1723 cs46xx_pcm_t *playback_pcm; 1722 struct snd_cs46xx_pcm *playback_pcm;
1724 unsigned int play_ctl; 1723 unsigned int play_ctl;
1725#endif 1724#endif
1726}; 1725};
1727 1726
1728int snd_cs46xx_create(snd_card_t *card, 1727int snd_cs46xx_create(struct snd_card *card,
1729 struct pci_dev *pci, 1728 struct pci_dev *pci,
1730 int external_amp, int thinkpad, 1729 int external_amp, int thinkpad,
1731 cs46xx_t **rcodec); 1730 struct snd_cs46xx **rcodec);
1732 1731
1733int snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1732int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
1734int snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1733int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
1735int snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1734int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
1736int snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **rpcm); 1735int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
1737int snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device); 1736int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device);
1738int snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rmidi); 1737int snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rmidi);
1739int snd_cs46xx_start_dsp(cs46xx_t *chip); 1738int snd_cs46xx_start_dsp(struct snd_cs46xx *chip);
1740int snd_cs46xx_gameport(cs46xx_t *chip); 1739int snd_cs46xx_gameport(struct snd_cs46xx *chip);
1741 1740
1742#endif /* __SOUND_CS46XX_H */ 1741#endif /* __SOUND_CS46XX_H */
diff --git a/include/sound/cs46xx_dsp_scb_types.h b/include/sound/cs46xx_dsp_scb_types.h
index 3f990a3a6903..9cb6c7d09567 100644
--- a/include/sound/cs46xx_dsp_scb_types.h
+++ b/include/sound/cs46xx_dsp_scb_types.h
@@ -41,7 +41,7 @@
41 41
42/* This structs are used internally by the SP */ 42/* This structs are used internally by the SP */
43 43
44typedef struct _basic_dma_req_t { 44struct dsp_basic_dma_req {
45 /* DMA Requestor Word 0 (DCW) fields: 45 /* DMA Requestor Word 0 (DCW) fields:
46 46
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] 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,9 +53,9 @@ typedef struct _basic_dma_req_t {
53 u32 dmw; /* DMA Mode Word */ 53 u32 dmw; /* DMA Mode Word */
54 u32 saw; /* Source Address Word */ 54 u32 saw; /* Source Address Word */
55 u32 daw; /* Destination Address Word */ 55 u32 daw; /* Destination Address Word */
56} basic_dma_req_t; 56};
57 57
58typedef struct _scatter_gather_ext_t { 58struct dsp_scatter_gather_ext {
59 u32 npaw; /* Next-Page Address Word */ 59 u32 npaw; /* Next-Page Address Word */
60 60
61 /* DMA Requestor Word 5 (NPCW) fields: 61 /* DMA Requestor Word 5 (NPCW) fields:
@@ -69,9 +69,9 @@ typedef struct _scatter_gather_ext_t {
69 u32 lbaw; /* Loop-Begin Address Word */ 69 u32 lbaw; /* Loop-Begin Address Word */
70 u32 nplbaw; /* Next-Page after Loop-Begin Address Word */ 70 u32 nplbaw; /* Next-Page after Loop-Begin Address Word */
71 u32 sgaw; /* Scatter/Gather Address Word */ 71 u32 sgaw; /* Scatter/Gather Address Word */
72} scatter_gather_ext_t; 72};
73 73
74typedef struct _volume_control_t { 74struct dsp_volume_control {
75 ___DSP_DUAL_16BIT_ALLOC( 75 ___DSP_DUAL_16BIT_ALLOC(
76 rightTarg, /* Target volume for left & right channels */ 76 rightTarg, /* Target volume for left & right channels */
77 leftTarg 77 leftTarg
@@ -80,10 +80,10 @@ typedef struct _volume_control_t {
80 rightVol, /* Current left & right channel volumes */ 80 rightVol, /* Current left & right channel volumes */
81 leftVol 81 leftVol
82 ) 82 )
83} volume_control_t; 83};
84 84
85/* Generic stream control block (SCB) structure definition */ 85/* Generic stream control block (SCB) structure definition */
86typedef struct _generic_scb_t { 86struct dsp_generic_scb {
87 /* For streaming I/O, the DSP should never alter any words in the DMA 87 /* For streaming I/O, the DSP should never alter any words in the DMA
88 requestor or the scatter/gather extension. Only ad hoc DMA request 88 requestor or the scatter/gather extension. Only ad hoc DMA request
89 streams are free to alter the requestor (currently only occur in the 89 streams are free to alter the requestor (currently only occur in the
@@ -99,13 +99,13 @@ typedef struct _generic_scb_t {
99 99
100 /* Initialized by the host, only modified by DMA 100 /* Initialized by the host, only modified by DMA
101 R/O for the DSP task */ 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 /* Scatter/gather DMA requestor extension (5 ints) 104 /* Scatter/gather DMA requestor extension (5 ints)
105 Initialized by the host, only modified by DMA 105 Initialized by the host, only modified by DMA
106 DSP task never needs to even read these. 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 /* Sublist pointer & next stream control block (SCB) link. 110 /* Sublist pointer & next stream control block (SCB) link.
111 Initialized & modified by the host R/O for the DSP task 111 Initialized & modified by the host R/O for the DSP task
@@ -179,11 +179,11 @@ typedef struct _generic_scb_t {
179 179
180 These two 32-bit words are redefined for wavetable & 3-D voices. 180 These two 32-bit words are redefined for wavetable & 3-D voices.
181 */ 181 */
182 volume_control_t vol_ctrl_t; /* Optional */ 182 struct dsp_volume_control vol_ctrl_t; /* Optional */
183} generic_scb_t; 183};
184 184
185 185
186typedef struct _spos_control_block_t { 186struct dsp_spos_control_block {
187 /* WARNING: Certain items in this structure are modified by the host 187 /* WARNING: Certain items in this structure are modified by the host
188 Any dword that can be modified by the host, must not be 188 Any dword that can be modified by the host, must not be
189 modified by the SP as the host can only do atomic dword 189 modified by the SP as the host can only do atomic dword
@@ -273,10 +273,10 @@ typedef struct _spos_control_block_t {
273 u32 r32_save_for_spurious_int; 273 u32 r32_save_for_spurious_int;
274 u32 r32_save_for_trap; 274 u32 r32_save_for_trap;
275 u32 r32_save_for_HFG; 275 u32 r32_save_for_HFG;
276} spos_control_block_t; 276};
277 277
278/* SPB for MIX_TO_OSTREAM algorithm family */ 278/* SPB for MIX_TO_OSTREAM algorithm family */
279typedef struct _mix2_ostream_spb_t 279struct dsp_mix2_ostream_spb
280{ 280{
281 /* 16b.16b integer.frac approximation to the 281 /* 16b.16b integer.frac approximation to the
282 number of 3 sample triplets to output each 282 number of 3 sample triplets to output each
@@ -290,13 +290,13 @@ typedef struct _mix2_ostream_spb_t
290 output triplets since the start of group 290 output triplets since the start of group
291 */ 291 */
292 u32 accumOutTriplets; 292 u32 accumOutTriplets;
293} mix2_ostream_spb_t; 293};
294 294
295/* SCB for Timing master algorithm */ 295/* SCB for Timing master algorithm */
296typedef struct _timing_master_scb_t { 296struct dsp_timing_master_scb {
297 /* First 12 dwords from generic_scb_t */ 297 /* First 12 dwords from generic_scb_t */
298 basic_dma_req_t basic_req; /* Optional */ 298 struct dsp_basic_dma_req basic_req; /* Optional */
299 scatter_gather_ext_t sg_ext; /* Optional */ 299 struct dsp_scatter_gather_ext sg_ext; /* Optional */
300 ___DSP_DUAL_16BIT_ALLOC( 300 ___DSP_DUAL_16BIT_ALLOC(
301 next_scb, /* REQUIRED */ 301 next_scb, /* REQUIRED */
302 sub_list_ptr /* REQUIRED */ 302 sub_list_ptr /* REQUIRED */
@@ -358,13 +358,13 @@ typedef struct _timing_master_scb_t {
358 number of samples to output each frame. 358 number of samples to output each frame.
359 (approximation must be floor, to insure */ 359 (approximation must be floor, to insure */
360 u32 nsamp_per_frm_q15; 360 u32 nsamp_per_frm_q15;
361} timing_master_scb_t; 361};
362 362
363/* SCB for CODEC output algorithm */ 363/* SCB for CODEC output algorithm */
364typedef struct _codec_output_scb_t { 364struct dsp_codec_output_scb {
365 /* First 13 dwords from generic_scb_t */ 365 /* First 13 dwords from generic_scb_t */
366 basic_dma_req_t basic_req; /* Optional */ 366 struct dsp_basic_dma_req basic_req; /* Optional */
367 scatter_gather_ext_t sg_ext; /* Optional */ 367 struct dsp_scatter_gather_ext sg_ext; /* Optional */
368 ___DSP_DUAL_16BIT_ALLOC( 368 ___DSP_DUAL_16BIT_ALLOC(
369 next_scb, /* REQUIRED */ 369 next_scb, /* REQUIRED */
370 sub_list_ptr /* REQUIRED */ 370 sub_list_ptr /* REQUIRED */
@@ -422,13 +422,13 @@ typedef struct _codec_output_scb_t {
422 reserved, 422 reserved,
423 last_sub_ptr 423 last_sub_ptr
424 ) 424 )
425} codec_output_scb_t; 425};
426 426
427/* SCB for CODEC input algorithm */ 427/* SCB for CODEC input algorithm */
428typedef struct _codec_input_scb_t { 428struct dsp_codec_input_scb {
429 /* First 13 dwords from generic_scb_t */ 429 /* First 13 dwords from generic_scb_t */
430 basic_dma_req_t basic_req; /* Optional */ 430 struct dsp_basic_dma_req basic_req; /* Optional */
431 scatter_gather_ext_t sg_ext; /* Optional */ 431 struct dsp_scatter_gather_ext sg_ext; /* Optional */
432 ___DSP_DUAL_16BIT_ALLOC( 432 ___DSP_DUAL_16BIT_ALLOC(
433 next_scb, /* REQUIRED */ 433 next_scb, /* REQUIRED */
434 sub_list_ptr /* REQUIRED */ 434 sub_list_ptr /* REQUIRED */
@@ -479,13 +479,13 @@ typedef struct _codec_input_scb_t {
479 ) 479 )
480 480
481 u32 reserved2; 481 u32 reserved2;
482} codec_input_scb_t; 482};
483 483
484 484
485typedef struct _pcm_serial_input_scb_t { 485struct dsp_pcm_serial_input_scb {
486 /* First 13 dwords from generic_scb_t */ 486 /* First 13 dwords from generic_scb_t */
487 basic_dma_req_t basic_req; /* Optional */ 487 struct dsp_basic_dma_req basic_req; /* Optional */
488 scatter_gather_ext_t sg_ext; /* Optional */ 488 struct dsp_scatter_gather_ext sg_ext; /* Optional */
489 ___DSP_DUAL_16BIT_ALLOC( 489 ___DSP_DUAL_16BIT_ALLOC(
490 next_scb, /* REQUIRED */ 490 next_scb, /* REQUIRED */
491 sub_list_ptr /* REQUIRED */ 491 sub_list_ptr /* REQUIRED */
@@ -512,11 +512,11 @@ typedef struct _pcm_serial_input_scb_t {
512 ) 512 )
513 513
514 /* Initialized by the host (host updates target volumes) */ 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
519typedef struct _src_task_scb_t { 519struct dsp_src_task_scb {
520 ___DSP_DUAL_16BIT_ALLOC( 520 ___DSP_DUAL_16BIT_ALLOC(
521 frames_left_in_gof, 521 frames_left_in_gof,
522 gofs_left_in_sec 522 gofs_left_in_sec
@@ -571,10 +571,10 @@ typedef struct _src_task_scb_t {
571 571
572 u32 phiIncr6int_26frac; 572 u32 phiIncr6int_26frac;
573 573
574 volume_control_t src_vol_ctrl; 574 struct dsp_volume_control src_vol_ctrl;
575} src_task_scb_t; 575};
576 576
577typedef struct _decimate_by_pow2_scb_t { 577struct dsp_decimate_by_pow2_scb {
578 /* decimationFactor = 2, 4, or 8 (larger factors waste too much memory 578 /* decimationFactor = 2, 4, or 8 (larger factors waste too much memory
579 when compared to cascading decimators) 579 when compared to cascading decimators)
580 */ 580 */
@@ -648,10 +648,10 @@ typedef struct _decimate_by_pow2_scb_t {
648 648
649 u32 dec2_reserved4; 649 u32 dec2_reserved4;
650 650
651 volume_control_t dec2_vol_ctrl; /* Not used! */ 651 struct dsp_volume_control dec2_vol_ctrl; /* Not used! */
652} decimate_by_pow2_scb_t; 652};
653 653
654typedef struct _vari_decimate_scb_t { 654struct dsp_vari_decimate_scb {
655 ___DSP_DUAL_16BIT_ALLOC( 655 ___DSP_DUAL_16BIT_ALLOC(
656 vdec_frames_left_in_gof, 656 vdec_frames_left_in_gof,
657 vdec_gofs_left_in_sec 657 vdec_gofs_left_in_sec
@@ -711,15 +711,15 @@ typedef struct _vari_decimate_scb_t {
711 711
712 u32 vdec_phi_incr_6int_26frac; 712 u32 vdec_phi_incr_6int_26frac;
713 713
714 volume_control_t vdec_vol_ctrl; 714 struct dsp_volume_control vdec_vol_ctrl;
715} vari_decimate_scb_t; 715};
716 716
717 717
718/* SCB for MIX_TO_OSTREAM algorithm family */ 718/* SCB for MIX_TO_OSTREAM algorithm family */
719typedef struct _mix2_ostream_scb_t { 719struct dsp_mix2_ostream_scb {
720 /* First 13 dwords from generic_scb_t */ 720 /* First 13 dwords from generic_scb_t */
721 basic_dma_req_t basic_req; /* Optional */ 721 struct dsp_basic_dma_req basic_req; /* Optional */
722 scatter_gather_ext_t sg_ext; /* Optional */ 722 struct dsp_scatter_gather_ext sg_ext; /* Optional */
723 ___DSP_DUAL_16BIT_ALLOC( 723 ___DSP_DUAL_16BIT_ALLOC(
724 next_scb, /* REQUIRED */ 724 next_scb, /* REQUIRED */
725 sub_list_ptr /* REQUIRED */ 725 sub_list_ptr /* REQUIRED */
@@ -758,14 +758,14 @@ typedef struct _mix2_ostream_scb_t {
758 const_FFFF, 758 const_FFFF,
759 const_zero 759 const_zero
760 ) 760 )
761} mix2_ostream_scb_t; 761};
762 762
763 763
764/* SCB for S16_MIX algorithm */ 764/* SCB for S16_MIX algorithm */
765typedef struct _mix_only_scb_t { 765struct dsp_mix_only_scb {
766 /* First 13 dwords from generic_scb_t */ 766 /* First 13 dwords from generic_scb_t */
767 basic_dma_req_t basic_req; /* Optional */ 767 struct dsp_basic_dma_req basic_req; /* Optional */
768 scatter_gather_ext_t sg_ext; /* Optional */ 768 struct dsp_scatter_gather_ext sg_ext; /* Optional */
769 ___DSP_DUAL_16BIT_ALLOC( 769 ___DSP_DUAL_16BIT_ALLOC(
770 next_scb, /* REQUIRED */ 770 next_scb, /* REQUIRED */
771 sub_list_ptr /* REQUIRED */ 771 sub_list_ptr /* REQUIRED */
@@ -780,11 +780,11 @@ typedef struct _mix_only_scb_t {
780 u32 strm_buf_ptr; /* REQUIRED */ 780 u32 strm_buf_ptr; /* REQUIRED */
781 781
782 u32 reserved; 782 u32 reserved;
783 volume_control_t vol_ctrl; 783 struct dsp_volume_control vol_ctrl;
784} mix_only_scb_t; 784};
785 785
786/* SCB for the async. CODEC input algorithm */ 786/* SCB for the async. CODEC input algorithm */
787typedef struct _async_codec_input_scb_t { 787struct dsp_async_codec_input_scb {
788 u32 io_free2; 788 u32 io_free2;
789 789
790 u32 io_current_total; 790 u32 io_current_total;
@@ -837,11 +837,11 @@ typedef struct _async_codec_input_scb_t {
837 ) 837 )
838 838
839 u32 i_free; 839 u32 i_free;
840} async_codec_input_scb_t; 840};
841 841
842 842
843/* SCB for the SP/DIF CODEC input and output */ 843/* SCB for the SP/DIF CODEC input and output */
844typedef struct _spdifiscb_t { 844struct dsp_spdifiscb {
845 ___DSP_DUAL_16BIT_ALLOC( 845 ___DSP_DUAL_16BIT_ALLOC(
846 status_ptr, 846 status_ptr,
847 status_start_ptr 847 status_start_ptr
@@ -895,12 +895,11 @@ typedef struct _spdifiscb_t {
895 ) 895 )
896 896
897 u32 free1; 897 u32 free1;
898} spdifiscb_t; 898};
899 899
900 900
901/* SCB for the SP/DIF CODEC input and output */ 901/* SCB for the SP/DIF CODEC input and output */
902typedef struct _spdifoscb_t { 902struct dsp_spdifoscb {
903
904 903
905 u32 free2; 904 u32 free2;
906 905
@@ -941,11 +940,10 @@ typedef struct _spdifoscb_t {
941 ) 940 )
942 941
943 u32 free1; 942 u32 free1;
944} spdifoscb_t; 943};
945
946 944
947 945
948typedef struct _asynch_fg_rx_scb_t { 946struct dsp_asynch_fg_rx_scb {
949 ___DSP_DUAL_16BIT_ALLOC( 947 ___DSP_DUAL_16BIT_ALLOC(
950 bot_buf_mask, 948 bot_buf_mask,
951 buf_Mask 949 buf_Mask
@@ -993,11 +991,10 @@ typedef struct _asynch_fg_rx_scb_t {
993 right_vol, 991 right_vol,
994 left_vol 992 left_vol
995 ) 993 )
996} asynch_fg_rx_scb_t; 994};
997
998 995
999 996
1000typedef struct _asynch_fg_tx_scb_t { 997struct dsp_asynch_fg_tx_scb {
1001 ___DSP_DUAL_16BIT_ALLOC( 998 ___DSP_DUAL_16BIT_ALLOC(
1002 not_buf_mask, 999 not_buf_mask,
1003 buf_mask 1000 buf_mask
@@ -1052,13 +1049,13 @@ typedef struct _asynch_fg_tx_scb_t {
1052 unused_right_vol, 1049 unused_right_vol,
1053 unused_left_vol 1050 unused_left_vol
1054 ) 1051 )
1055} asynch_fg_tx_scb_t; 1052};
1056 1053
1057 1054
1058typedef struct _output_snoop_scb_t { 1055struct dsp_output_snoop_scb {
1059 /* First 13 dwords from generic_scb_t */ 1056 /* First 13 dwords from generic_scb_t */
1060 basic_dma_req_t basic_req; /* Optional */ 1057 struct dsp_basic_dma_req basic_req; /* Optional */
1061 scatter_gather_ext_t sg_ext; /* Optional */ 1058 struct dsp_scatter_gather_ext sg_ext; /* Optional */
1062 ___DSP_DUAL_16BIT_ALLOC( 1059 ___DSP_DUAL_16BIT_ALLOC(
1063 next_scb, /* REQUIRED */ 1060 next_scb, /* REQUIRED */
1064 sub_list_ptr /* REQUIRED */ 1061 sub_list_ptr /* REQUIRED */
@@ -1083,9 +1080,9 @@ typedef struct _output_snoop_scb_t {
1083 reserved, 1080 reserved,
1084 input_scb 1081 input_scb
1085 ) 1082 )
1086} output_snoop_scb_t; 1083};
1087 1084
1088typedef struct _spio_write_scb_t { 1085struct dsp_spio_write_scb {
1089 ___DSP_DUAL_16BIT_ALLOC( 1086 ___DSP_DUAL_16BIT_ALLOC(
1090 address1, 1087 address1,
1091 address2 1088 address2
@@ -1122,9 +1119,9 @@ typedef struct _spio_write_scb_t {
1122 ) 1119 )
1123 1120
1124 u32 unused3[5]; 1121 u32 unused3[5];
1125} spio_write_scb_t; 1122};
1126 1123
1127typedef struct _magic_snoop_task_t { 1124struct dsp_magic_snoop_task {
1128 u32 i0; 1125 u32 i0;
1129 u32 i1; 1126 u32 i1;
1130 1127
@@ -1155,11 +1152,11 @@ typedef struct _magic_snoop_task_t {
1155 1152
1156 u32 i8; 1153 u32 i8;
1157 1154
1158 volume_control_t vdec_vol_ctrl; 1155 struct dsp_volume_control vdec_vol_ctrl;
1159} magic_snoop_task_t; 1156};
1160 1157
1161 1158
1162typedef struct _filter_scb_t { 1159struct dsp_filter_scb {
1163 ___DSP_DUAL_16BIT_ALLOC( 1160 ___DSP_DUAL_16BIT_ALLOC(
1164 a0_right, /* 0x00 */ 1161 a0_right, /* 0x00 */
1165 a0_left 1162 a0_left
@@ -1212,5 +1209,5 @@ typedef struct _filter_scb_t {
1212 b2_right, /* 0x0F */ 1209 b2_right, /* 0x0F */
1213 b2_left 1210 b2_left
1214 ) 1211 )
1215} filter_scb_t; 1212};
1216#endif /* __DSP_SCB_TYPES_H__ */ 1213#endif /* __DSP_SCB_TYPES_H__ */
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h
index 10014cb62423..da934def31e9 100644
--- a/include/sound/cs46xx_dsp_spos.h
+++ b/include/sound/cs46xx_dsp_spos.h
@@ -65,133 +65,130 @@
65#define DSP_SPDIF_STATUS_HW_ENABLED 4 65#define DSP_SPDIF_STATUS_HW_ENABLED 4
66#define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8 66#define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8
67 67
68struct _dsp_module_desc_t; 68struct dsp_symbol_entry {
69
70typedef struct _symbol_entry_t {
71 u32 address; 69 u32 address;
72 char symbol_name[DSP_MAX_SYMBOL_NAME]; 70 char symbol_name[DSP_MAX_SYMBOL_NAME];
73 int symbol_type; 71 int symbol_type;
74 72
75 /* initialized by driver */ 73 /* initialized by driver */
76 struct _dsp_module_desc_t * module; 74 struct dsp_module_desc * module;
77 int deleted; 75 int deleted;
78} symbol_entry_t; 76};
79 77
80typedef struct _symbol_desc_t { 78struct dsp_symbol_desc {
81 int nsymbols; 79 int nsymbols;
82 80
83 symbol_entry_t * symbols; 81 struct dsp_symbol_entry *symbols;
84 82
85 /* initialized by driver */ 83 /* initialized by driver */
86 int highest_frag_index; 84 int highest_frag_index;
87} symbol_desc_t; 85};
88
89 86
90typedef struct _segment_desc_t { 87struct dsp_segment_desc {
91 int segment_type; 88 int segment_type;
92 u32 offset; 89 u32 offset;
93 u32 size; 90 u32 size;
94 u32 * data; 91 u32 * data;
95} segment_desc_t; 92};
96 93
97typedef struct _dsp_module_desc_t { 94struct dsp_module_desc {
98 char * module_name; 95 char * module_name;
99 symbol_desc_t symbol_table; 96 struct dsp_symbol_desc symbol_table;
100 int nsegments; 97 int nsegments;
101 segment_desc_t * segments; 98 struct dsp_segment_desc * segments;
102 99
103 /* initialized by driver */ 100 /* initialized by driver */
104 u32 overlay_begin_address; 101 u32 overlay_begin_address;
105 u32 load_address; 102 u32 load_address;
106 int nfixups; 103 int nfixups;
107} dsp_module_desc_t; 104};
108 105
109typedef struct _dsp_scb_descriptor_t { 106struct dsp_scb_descriptor {
110 char scb_name[DSP_MAX_SCB_NAME]; 107 char scb_name[DSP_MAX_SCB_NAME];
111 u32 address; 108 u32 address;
112 int index; 109 int index;
113 110
114 struct _dsp_scb_descriptor_t * sub_list_ptr; 111 struct dsp_scb_descriptor * sub_list_ptr;
115 struct _dsp_scb_descriptor_t * next_scb_ptr; 112 struct dsp_scb_descriptor * next_scb_ptr;
116 struct _dsp_scb_descriptor_t * parent_scb_ptr; 113 struct dsp_scb_descriptor * parent_scb_ptr;
117 114
118 symbol_entry_t * task_entry; 115 struct dsp_symbol_entry * task_entry;
119 symbol_entry_t * scb_symbol; 116 struct dsp_symbol_entry * scb_symbol;
120 117
121 snd_info_entry_t *proc_info; 118 struct snd_info_entry *proc_info;
122 int ref_count; 119 int ref_count;
123 spinlock_t lock; 120 spinlock_t lock;
124 121
125 int deleted; 122 int deleted;
126} dsp_scb_descriptor_t; 123};
127 124
128typedef struct _dsp_task_descriptor_t { 125struct dsp_task_descriptor {
129 char task_name[DSP_MAX_TASK_NAME]; 126 char task_name[DSP_MAX_TASK_NAME];
130 int size; 127 int size;
131 u32 address; 128 u32 address;
132 int index; 129 int index;
133} dsp_task_descriptor_t; 130};
134 131
135typedef struct _pcm_channel_descriptor_t { 132struct dsp_pcm_channel_descriptor {
136 int active; 133 int active;
137 int src_slot; 134 int src_slot;
138 int pcm_slot; 135 int pcm_slot;
139 u32 sample_rate; 136 u32 sample_rate;
140 u32 unlinked; 137 u32 unlinked;
141 dsp_scb_descriptor_t * pcm_reader_scb; 138 struct dsp_scb_descriptor * pcm_reader_scb;
142 dsp_scb_descriptor_t * src_scb; 139 struct dsp_scb_descriptor * src_scb;
143 dsp_scb_descriptor_t * mixer_scb; 140 struct dsp_scb_descriptor * mixer_scb;
144 141
145 void * private_data; 142 void * private_data;
146} pcm_channel_descriptor_t; 143};
147 144
148typedef struct _dsp_spos_instance_t { 145struct dsp_spos_instance {
149 symbol_desc_t symbol_table; /* currently availble loaded symbols in SP */ 146 struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */
150 147
151 int nmodules; 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 /* Main PCM playback mixer */ 153 /* Main PCM playback mixer */
157 dsp_scb_descriptor_t * master_mix_scb; 154 struct dsp_scb_descriptor * master_mix_scb;
158 u16 dac_volume_right; 155 u16 dac_volume_right;
159 u16 dac_volume_left; 156 u16 dac_volume_left;
160 157
161 /* Rear/surround PCM playback mixer */ 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 /* Center/LFE mixer */ 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 int npcm_channels; 164 int npcm_channels;
168 int nsrc_scb; 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 int src_scb_slots[DSP_MAX_SRC_NR]; 167 int src_scb_slots[DSP_MAX_SRC_NR];
171 168
172 /* cache this symbols */ 169 /* cache this symbols */
173 symbol_entry_t * null_algorithm; /* used by PCMreaderSCB's */ 170 struct dsp_symbol_entry * null_algorithm; /* used by PCMreaderSCB's */
174 symbol_entry_t * s16_up; /* used by SRCtaskSCB's */ 171 struct dsp_symbol_entry * s16_up; /* used by SRCtaskSCB's */
175 172
176 /* proc fs */ 173 /* proc fs */
177 snd_card_t * snd_card; 174 struct snd_card *snd_card;
178 snd_info_entry_t * proc_dsp_dir; 175 struct snd_info_entry * proc_dsp_dir;
179 snd_info_entry_t * proc_sym_info_entry; 176 struct snd_info_entry * proc_sym_info_entry;
180 snd_info_entry_t * proc_modules_info_entry; 177 struct snd_info_entry * proc_modules_info_entry;
181 snd_info_entry_t * proc_parameter_dump_info_entry; 178 struct snd_info_entry * proc_parameter_dump_info_entry;
182 snd_info_entry_t * proc_sample_dump_info_entry; 179 struct snd_info_entry * proc_sample_dump_info_entry;
183 180
184 /* SCB's descriptors */ 181 /* SCB's descriptors */
185 int nscb; 182 int nscb;
186 int scb_highest_frag_index; 183 int scb_highest_frag_index;
187 dsp_scb_descriptor_t scbs[DSP_MAX_SCB_DESC]; 184 struct dsp_scb_descriptor scbs[DSP_MAX_SCB_DESC];
188 snd_info_entry_t * proc_scb_info_entry; 185 struct snd_info_entry * proc_scb_info_entry;
189 dsp_scb_descriptor_t * the_null_scb; 186 struct dsp_scb_descriptor * the_null_scb;
190 187
191 /* Task's descriptors */ 188 /* Task's descriptors */
192 int ntask; 189 int ntask;
193 dsp_task_descriptor_t tasks[DSP_MAX_TASK_DESC]; 190 struct dsp_task_descriptor tasks[DSP_MAX_TASK_DESC];
194 snd_info_entry_t * proc_task_info_entry; 191 struct snd_info_entry * proc_task_info_entry;
195 192
196 /* SPDIF status */ 193 /* SPDIF status */
197 int spdif_status_out; 194 int spdif_status_out;
@@ -204,30 +201,30 @@ typedef struct _dsp_spos_instance_t {
204 unsigned int spdif_csuv_stream; 201 unsigned int spdif_csuv_stream;
205 202
206 /* SPDIF input sample rate converter */ 203 /* SPDIF input sample rate converter */
207 dsp_scb_descriptor_t * spdif_in_src; 204 struct dsp_scb_descriptor * spdif_in_src;
208 /* SPDIF input asynch. receiver */ 205 /* SPDIF input asynch. receiver */
209 dsp_scb_descriptor_t * asynch_rx_scb; 206 struct dsp_scb_descriptor * asynch_rx_scb;
210 207
211 /* Capture record mixer SCB */ 208 /* Capture record mixer SCB */
212 dsp_scb_descriptor_t * record_mixer_scb; 209 struct dsp_scb_descriptor * record_mixer_scb;
213 210
214 /* CODEC input SCB */ 211 /* CODEC input SCB */
215 dsp_scb_descriptor_t * codec_in_scb; 212 struct dsp_scb_descriptor * codec_in_scb;
216 213
217 /* reference snooper */ 214 /* reference snooper */
218 dsp_scb_descriptor_t * ref_snoop_scb; 215 struct dsp_scb_descriptor * ref_snoop_scb;
219 216
220 /* SPDIF output PCM reference */ 217 /* SPDIF output PCM reference */
221 dsp_scb_descriptor_t * spdif_pcm_input_scb; 218 struct dsp_scb_descriptor * spdif_pcm_input_scb;
222 219
223 /* asynch TX task */ 220 /* asynch TX task */
224 dsp_scb_descriptor_t * asynch_tx_scb; 221 struct dsp_scb_descriptor * asynch_tx_scb;
225 222
226 /* record sources */ 223 /* record sources */
227 dsp_scb_descriptor_t * pcm_input; 224 struct dsp_scb_descriptor * pcm_input;
228 dsp_scb_descriptor_t * adc_input; 225 struct dsp_scb_descriptor * adc_input;
229 226
230 int spdif_in_sample_rate; 227 int spdif_in_sample_rate;
231} dsp_spos_instance_t; 228};
232 229
233#endif /* __DSP_SPOS_H__ */ 230#endif /* __DSP_SPOS_H__ */
diff --git a/include/sound/cs46xx_dsp_task_types.h b/include/sound/cs46xx_dsp_task_types.h
index 5dd3bf69cb03..b3076c487de6 100644
--- a/include/sound/cs46xx_dsp_task_types.h
+++ b/include/sound/cs46xx_dsp_task_types.h
@@ -71,7 +71,7 @@ Ptr____Call (c)
71 at the end of BG */ 71 at the end of BG */
72 72
73/* Minimal context save area for Hyper Forground */ 73/* Minimal context save area for Hyper Forground */
74typedef struct _hf_save_area_t { 74struct dsp_hf_save_area {
75 u32 r10_save; 75 u32 r10_save;
76 u32 r54_save; 76 u32 r54_save;
77 u32 r98_save; 77 u32 r98_save;
@@ -96,11 +96,11 @@ typedef struct _hf_save_area_t {
96 rsa2Save 96 rsa2Save
97 ) 97 )
98 /* saved as part of HFG context */ 98 /* saved as part of HFG context */
99} hf_save_area_t; 99};
100 100
101 101
102/* Task link data structure */ 102/* Task link data structure */
103typedef struct _tree_link_t { 103struct dsp_tree_link {
104 ___DSP_DUAL_16BIT_ALLOC( 104 ___DSP_DUAL_16BIT_ALLOC(
105 /* Pointer to sibling task control block */ 105 /* Pointer to sibling task control block */
106 next_scb, 106 next_scb,
@@ -114,10 +114,10 @@ typedef struct _tree_link_t {
114 /* Pointer to local data */ 114 /* Pointer to local data */
115 this_spb 115 this_spb
116 ) 116 )
117} tree_link_t; 117};
118 118
119 119
120typedef struct _task_tree_data_t { 120struct dsp_task_tree_data {
121 ___DSP_DUAL_16BIT_ALLOC( 121 ___DSP_DUAL_16BIT_ALLOC(
122 /* Initial tock count; controls task tree execution rate */ 122 /* Initial tock count; controls task tree execution rate */
123 tock_count_limit, 123 tock_count_limit,
@@ -155,11 +155,10 @@ typedef struct _task_tree_data_t {
155 data_stack_base_ptr 155 data_stack_base_ptr
156 ) 156 )
157 157
158} task_tree_data_t; 158};
159 159
160 160
161 161struct dsp_interval_timer_data
162typedef struct _interval_timer_data_t
163{ 162{
164 /* These data items have the same relative locations to those */ 163 /* These data items have the same relative locations to those */
165 ___DSP_DUAL_16BIT_ALLOC( 164 ___DSP_DUAL_16BIT_ALLOC(
@@ -172,12 +171,12 @@ typedef struct _interval_timer_data_t
172 num_FG_ticks_this_interval, 171 num_FG_ticks_this_interval,
173 num_intervals 172 num_intervals
174 ) 173 )
175} interval_timer_data_t; 174};
176 175
177 176
178/* This structure contains extra storage for the task tree 177/* This structure contains extra storage for the task tree
179 Currently, this additional data is related only to a full context save */ 178 Currently, this additional data is related only to a full context save */
180typedef struct _task_tree_context_block_t { 179struct dsp_task_tree_context_block {
181 /* Up to 10 values are saved onto the stack. 8 for the task tree, 1 for 180 /* Up to 10 values are saved onto the stack. 8 for the task tree, 1 for
182 The access to the context switch (call or interrupt), and 1 spare that 181 The access to the context switch (call or interrupt), and 1 spare that
183 users should never use. This last may be required by the system */ 182 users should never use. This last may be required by the system */
@@ -238,16 +237,16 @@ typedef struct _task_tree_context_block_t {
238 u32 saveaux2xaux3x; 237 u32 saveaux2xaux3x;
239 u32 savershouthl; 238 u32 savershouthl;
240 u32 savershoutxmacmode; 239 u32 savershoutxmacmode;
241} task_tree_context_block_t; 240};
242 241
243 242
244typedef struct _task_tree_control_block_t { 243struct dsp_task_tree_control_block {
245 hf_save_area_t context; 244 struct dsp_hf_save_area context;
246 tree_link_t links; 245 struct dsp_tree_link links;
247 task_tree_data_t data; 246 struct dsp_task_tree_data data;
248 task_tree_context_block_t context_blk; 247 struct dsp_task_tree_context_block context_blk;
249 interval_timer_data_t int_timer; 248 struct dsp_interval_timer_data int_timer;
250} task_tree_control_block_t; 249};
251 250
252 251
253#endif /* __DSP_TASK_TYPES_H__ */ 252#endif /* __DSP_TASK_TYPES_H__ */