aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97/ac97_pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:21:36 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:12 -0500
commitee42381e71c56328db9e9d64d19a4de7a2f09a93 (patch)
tree641cdecfa64347efb7d402c707412e0a45fe7ced /sound/pci/ac97/ac97_pcm.c
parentdc4cafbadad1ae2322e598f2cb72720ef4095fee (diff)
[ALSA] Remove xxx_t typedefs: AC97
Modules: AC97 Codec Remove xxx_t typedefs from the AC97 codec support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97/ac97_pcm.c')
-rw-r--r--sound/pci/ac97/ac97_pcm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
index ded13165d635..c3e590bf7a02 100644
--- a/sound/pci/ac97/ac97_pcm.c
+++ b/sound/pci/ac97/ac97_pcm.c
@@ -170,7 +170,7 @@ static unsigned char get_slot_reg(struct ac97_pcm *pcm, unsigned short cidx,
170 return rate_cregs[slot - 3]; 170 return rate_cregs[slot - 3];
171} 171}
172 172
173static int set_spdif_rate(ac97_t *ac97, unsigned short rate) 173static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate)
174{ 174{
175 unsigned short old, bits, reg, mask; 175 unsigned short old, bits, reg, mask;
176 unsigned int sbits; 176 unsigned int sbits;
@@ -254,7 +254,7 @@ static int set_spdif_rate(ac97_t *ac97, unsigned short rate)
254 * 254 *
255 * Returns zero if successful, or a negative error code on failure. 255 * Returns zero if successful, or a negative error code on failure.
256 */ 256 */
257int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate) 257int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate)
258{ 258{
259 int dbl; 259 int dbl;
260 unsigned int tmp; 260 unsigned int tmp;
@@ -315,7 +315,7 @@ int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate)
315 return 0; 315 return 0;
316} 316}
317 317
318static unsigned short get_pslots(ac97_t *ac97, unsigned char *rate_table, unsigned short *spdif_slots) 318static unsigned short get_pslots(struct snd_ac97 *ac97, unsigned char *rate_table, unsigned short *spdif_slots)
319{ 319{
320 if (!ac97_is_audio(ac97)) 320 if (!ac97_is_audio(ac97))
321 return 0; 321 return 0;
@@ -390,7 +390,7 @@ static unsigned short get_pslots(ac97_t *ac97, unsigned char *rate_table, unsign
390 } 390 }
391} 391}
392 392
393static unsigned short get_cslots(ac97_t *ac97) 393static unsigned short get_cslots(struct snd_ac97 *ac97)
394{ 394{
395 unsigned short slots; 395 unsigned short slots;
396 396
@@ -437,7 +437,7 @@ static unsigned int get_rates(struct ac97_pcm *pcm, unsigned int cidx, unsigned
437 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members 437 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members
438 * are reduced and might be zero. 438 * are reduced and might be zero.
439 */ 439 */
440int snd_ac97_pcm_assign(ac97_bus_t *bus, 440int snd_ac97_pcm_assign(struct snd_ac97_bus *bus,
441 unsigned short pcms_count, 441 unsigned short pcms_count,
442 const struct ac97_pcm *pcms) 442 const struct ac97_pcm *pcms)
443{ 443{
@@ -449,7 +449,7 @@ int snd_ac97_pcm_assign(ac97_bus_t *bus,
449 unsigned short tmp, slots; 449 unsigned short tmp, slots;
450 unsigned short spdif_slots[4]; 450 unsigned short spdif_slots[4];
451 unsigned int rates; 451 unsigned int rates;
452 ac97_t *codec; 452 struct snd_ac97 *codec;
453 453
454 rpcms = kcalloc(pcms_count, sizeof(struct ac97_pcm), GFP_KERNEL); 454 rpcms = kcalloc(pcms_count, sizeof(struct ac97_pcm), GFP_KERNEL);
455 if (rpcms == NULL) 455 if (rpcms == NULL)
@@ -560,7 +560,7 @@ int snd_ac97_pcm_assign(ac97_bus_t *bus,
560int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, 560int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
561 enum ac97_pcm_cfg cfg, unsigned short slots) 561 enum ac97_pcm_cfg cfg, unsigned short slots)
562{ 562{
563 ac97_bus_t *bus; 563 struct snd_ac97_bus *bus;
564 int i, cidx, r, ok_flag; 564 int i, cidx, r, ok_flag;
565 unsigned int reg_ok[4] = {0,0,0,0}; 565 unsigned int reg_ok[4] = {0,0,0,0};
566 unsigned char reg; 566 unsigned char reg;
@@ -639,7 +639,7 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
639 */ 639 */
640int snd_ac97_pcm_close(struct ac97_pcm *pcm) 640int snd_ac97_pcm_close(struct ac97_pcm *pcm)
641{ 641{
642 ac97_bus_t *bus; 642 struct snd_ac97_bus *bus;
643 unsigned short slots = pcm->aslots; 643 unsigned short slots = pcm->aslots;
644 int i, cidx; 644 int i, cidx;
645 645
@@ -656,31 +656,31 @@ int snd_ac97_pcm_close(struct ac97_pcm *pcm)
656 return 0; 656 return 0;
657} 657}
658 658
659static int double_rate_hw_constraint_rate(snd_pcm_hw_params_t *params, 659static int double_rate_hw_constraint_rate(struct snd_pcm_hw_params *params,
660 snd_pcm_hw_rule_t *rule) 660 struct snd_pcm_hw_rule *rule)
661{ 661{
662 snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 662 struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
663 if (channels->min > 2) { 663 if (channels->min > 2) {
664 static const snd_interval_t single_rates = { 664 static const struct snd_interval single_rates = {
665 .min = 1, 665 .min = 1,
666 .max = 48000, 666 .max = 48000,
667 }; 667 };
668 snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 668 struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
669 return snd_interval_refine(rate, &single_rates); 669 return snd_interval_refine(rate, &single_rates);
670 } 670 }
671 return 0; 671 return 0;
672} 672}
673 673
674static int double_rate_hw_constraint_channels(snd_pcm_hw_params_t *params, 674static int double_rate_hw_constraint_channels(struct snd_pcm_hw_params *params,
675 snd_pcm_hw_rule_t *rule) 675 struct snd_pcm_hw_rule *rule)
676{ 676{
677 snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 677 struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
678 if (rate->min > 48000) { 678 if (rate->min > 48000) {
679 static const snd_interval_t double_rate_channels = { 679 static const struct snd_interval double_rate_channels = {
680 .min = 2, 680 .min = 2,
681 .max = 2, 681 .max = 2,
682 }; 682 };
683 snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 683 struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
684 return snd_interval_refine(channels, &double_rate_channels); 684 return snd_interval_refine(channels, &double_rate_channels);
685 } 685 }
686 return 0; 686 return 0;
@@ -693,7 +693,7 @@ static int double_rate_hw_constraint_channels(snd_pcm_hw_params_t *params,
693 * Installs the hardware constraint rules to prevent using double rates and 693 * Installs the hardware constraint rules to prevent using double rates and
694 * more than two channels at the same time. 694 * more than two channels at the same time.
695 */ 695 */
696int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime) 696int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime)
697{ 697{
698 int err; 698 int err;
699 699