]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Get TSC2101 and TSC2102 drivers in sync with new ALSA struct naming
authorandrzej zaborowski <balrogg@gmail.com>
Fri, 4 May 2007 02:44:12 +0000 (04:44 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 4 May 2007 17:09:27 +0000 (10:09 -0700)
Update the TSC2101/2102 drivers to use the new ALSA type names. This
makes the TSC2102 driver build again - TSC2101 is still broken though.
Contains also minor formatting fix in TSC2101 code.

Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
sound/arm/omap/omap-alsa-tsc2101-mixer.c
sound/arm/omap/omap-alsa-tsc2101-mixer.h
sound/arm/omap/omap-alsa-tsc2101.c
sound/arm/omap/omap-alsa-tsc2101.h
sound/arm/omap/omap-alsa-tsc2102-mixer.c
sound/arm/omap/omap-alsa-tsc2102.c

index 0f922661a98de82aaad8c58438ad5845bc76eab4..8faba95735286e93f221885b15c342f5f863ba64 100644 (file)
@@ -699,7 +699,8 @@ void snd_omap_init_mixer(void)
        FN_OUT(0);
 }
 
-static int __pcm_playback_target_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __pcm_playback_target_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        static char *texts[PLAYBACK_TARGET_COUNT] = {
                "Loudspeaker", "Headphone", "Cellphone"
@@ -716,13 +717,15 @@ static int __pcm_playback_target_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
        return 0;
 }
 
-static int __pcm_playback_target_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_target_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        ucontrol->value.integer.value[0] = current_playback_target;
        return 0;
 }
 
-static int __pcm_playback_target_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_target_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        int     retVal;
        int     curVal;
@@ -749,7 +752,8 @@ static int __pcm_playback_target_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
        return retVal;
 }      
 
-static int __pcm_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __pcm_playback_volume_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count                    = 2;
@@ -762,7 +766,8 @@ static int __pcm_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
  * Alsa mixer interface function for getting the volume read from the DGC in a 
  * 0 -100 alsa mixer format.
  */
-static int __pcm_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_volume_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 volL;
        u16 volR;       
@@ -786,13 +791,15 @@ static int __pcm_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
        return 0;
 }
 
-static int __pcm_playback_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_volume_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return set_mixer_volume_as_dac_gain_control_volume(ucontrol->value.integer.value[0], 
                                                        ucontrol->value.integer.value[1]);
 }
 
-static int __pcm_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __pcm_playback_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 2;
@@ -806,7 +813,8 @@ static int __pcm_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
  * When DGC_DALMU is 0, left channel is not muted.
  * Same logic apply also for the right channel.
  */
-static int __pcm_playback_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val = omap_tsc2101_audio_read(TSC2101_DAC_GAIN_CTRL);
        
@@ -815,13 +823,15 @@ static int __pcm_playback_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
        return 0;
 }
 
-static int __pcm_playback_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return dac_gain_control_unmute(ucontrol->value.integer.value[0], 
                                        ucontrol->value.integer.value[1]);
 }
 
-static int __headset_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __headset_playback_volume_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count                    = 1;
@@ -830,7 +840,8 @@ static int __headset_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
        return 0;
 }
 
-static int __headset_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __headset_playback_volume_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val;
        u16 vol;
@@ -847,12 +858,14 @@ static int __headset_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_
        return 0;
 }
 
-static int __headset_playback_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __headset_playback_volume_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return set_mixer_volume_as_headset_gain_control_volume(ucontrol->value.integer.value[0]);       
 }
 
-static int __headset_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __headset_playback_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -864,14 +877,16 @@ static int __headset_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
 /* When HGC_ADMUT_HED (bit 15) is 1, the headset is muted.
  * When HGC_ADMUT_HED is 0, headset is not muted.
  */
-static int __headset_playback_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __headset_playback_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val = omap_tsc2101_audio_read(TSC2101_HEADSET_GAIN_CTRL);
        ucontrol->value.integer.value[0]        = IS_UNMUTED(15, val);
        return 0;
 }
 
-static int __headset_playback_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __headset_playback_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        // mute/unmute headset
        return adc_pga_unmute_control(ucontrol->value.integer.value[0],
@@ -879,7 +894,8 @@ static int __headset_playback_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_
                                15);
 }
 
-static int __handset_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __handset_playback_volume_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count                    = 1;
@@ -888,7 +904,8 @@ static int __handset_playback_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
        return 0;
 }
 
-static int __handset_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __handset_playback_volume_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val;
        u16 vol;
@@ -904,12 +921,14 @@ static int __handset_playback_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_
        return 0;
 }
 
-static int __handset_playback_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __handset_playback_volume_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return set_mixer_volume_as_handset_gain_control_volume(ucontrol->value.integer.value[0]);       
 }
 
-static int __handset_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __handset_playback_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -921,14 +940,16 @@ static int __handset_playback_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
 /* When HNGC_ADMUT_HND (bit 15) is 1, the handset is muted.
  * When HNGC_ADMUT_HND is 0, handset is not muted.
  */
-static int __handset_playback_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __handset_playback_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val = omap_tsc2101_audio_read(TSC2101_HANDSET_GAIN_CTRL);
        ucontrol->value.integer.value[0]        = IS_UNMUTED(15, val);
        return 0;
 }
 
-static int __handset_playback_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __handset_playback_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        // handset mute/unmute
        return adc_pga_unmute_control(ucontrol->value.integer.value[0],
@@ -936,7 +957,8 @@ static int __handset_playback_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_
                                15);
 }
 
-static int __cellphone_input_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __cellphone_input_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -948,21 +970,24 @@ static int __cellphone_input_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 /* When BGC_MUT_CP (bit 15) = 1, power down cellphone input pga.
  * When BGC_MUT_CP = 0, power up cellphone input pga.
  */
-static int __cellphone_input_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __cellphone_input_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val = omap_tsc2101_audio_read(TSC2101_BUZZER_GAIN_CTRL);
        ucontrol->value.integer.value[0]        = IS_UNMUTED(15, val);
        return 0;
 }
 
-static int __cellphone_input_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __cellphone_input_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return adc_pga_unmute_control(ucontrol->value.integer.value[0],
                                TSC2101_BUZZER_GAIN_CTRL,
                                15);    
 }
 
-static int __buzzer_input_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 
+static int __buzzer_input_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -974,21 +999,23 @@ static int __buzzer_input_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
 /* When BGC_MUT_BU (bit 6) = 1, power down cellphone input pga.
  * When BGC_MUT_BU = 0, power up cellphone input pga.
  */
-static int __buzzer_input_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __buzzer_input_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        u16 val = omap_tsc2101_audio_read(TSC2101_BUZZER_GAIN_CTRL);
        ucontrol->value.integer.value[0]        = IS_UNMUTED(6, val);
        return 0;
 }
 
-static int __buzzer_input_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __buzzer_input_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        return adc_pga_unmute_control(ucontrol->value.integer.value[0],
                                TSC2101_BUZZER_GAIN_CTRL,
                                6);     
 }
 
-static snd_kcontrol_new_t tsc2101_control[] __devinitdata = {
+static struct snd_kcontrol_new tsc2101_control[] __devinitdata = {
        {
                .name  = "Target Playback Route",
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
index 3f27e27df6eb7488deff7494ff928088497f6eff..26fabfbb060308418d031290548596cfdd08f577 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * sound/arm/omap/omap-alsa-tsc2101-mixer.c
+ * sound/arm/omap/omap-alsa-tsc2101-mixer.h
  * 
  * Alsa Driver for TSC2101 codec for OMAP platform boards.
  *
index 9bbf0c72c13bf20b9d1d1ca2852dc65da7a46e56..24b0cc6caf6dad5ae74f6e745fe02893cc8f08c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/arm/mach-omap1/omap-alsa-tsc2101.c
+ * sound/arm/omap/omap-alsa-tsc2101.c
  * 
  * Alsa codec Driver for TSC2101 chip for OMAP platform boards. 
  * Code obtained from oss omap drivers
@@ -59,7 +59,7 @@ static unsigned int rates[] = {
        29400, 32000, 44100, 48000,
 };
 
-static snd_pcm_hw_constraint_list_t tsc2101_hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list tsc2101_hw_constraints_rates = {
        .count = ARRAY_SIZE(rates),
        .list = rates,
        .mask = 0,
@@ -93,7 +93,7 @@ static const struct tsc2101_samplerate_reg_info
        {48000, 0, 0},          
 };
 
-static snd_pcm_hardware_t tsc2101_snd_omap_alsa_playback = {
+static struct snd_pcm_hardware tsc2101_snd_omap_alsa_playback = {
        .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
                 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID),      
 #ifdef CONFIG_MACH_OMAP_H6300
index 803d215e59ac455dd573d6833ac3fffb0531496c..6cb2db3eacd197889fc53029f8b3331caef4f433 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/arc/mach-omap1/omap-alsa-tsc2101.h
+ * sound/arm/omap/omap-alsa-tsc2101.h
  * 
  * Alsa Driver for TSC2101 codec for OMAP platform boards.
  *
index 2e06d70da72cc4443f807b8849a4c8d9f749b274..d1c8b65c50e3d7c61550ad4b3e2a1607e6a192c6 100644 (file)
@@ -99,8 +99,8 @@ void snd_omap_init_mixer(void)
        FN_OUT(0);
 }
 
-static int __pcm_playback_volume_info(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int __pcm_playback_volume_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count                    = 2;
@@ -109,8 +109,8 @@ static int __pcm_playback_volume_info(
        return 0;
 }
 
-static int __pcm_playback_volume_get(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int __pcm_playback_volume_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        ucontrol->value.integer.value[0] = vol[0];      /* L */
        ucontrol->value.integer.value[1] = vol[1];      /* R */
@@ -118,8 +118,8 @@ static int __pcm_playback_volume_get(
        return 0;
 }
 
-static int __pcm_playback_volume_put(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int __pcm_playback_volume_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        set_dac_gain_stereo(
                        ucontrol->value.integer.value[0],       /* L */
@@ -127,8 +127,8 @@ static int __pcm_playback_volume_put(
        return 1;
 }
 
-static int __pcm_playback_switch_info(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int __pcm_playback_switch_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 2;
@@ -137,8 +137,8 @@ static int __pcm_playback_switch_info(
        return 0;
 }
 
-static int __pcm_playback_switch_get(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int __pcm_playback_switch_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        ucontrol->value.integer.value[0] = !mute[0];            /* L */
        ucontrol->value.integer.value[1] = !mute[1];            /* R */
@@ -146,8 +146,8 @@ static int __pcm_playback_switch_get(
        return 0;
 }
 
-static int __pcm_playback_switch_put(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_switch_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol) 
 {
        mute[0] = (ucontrol->value.integer.value[0] == 0);      /* L */
        mute[1] = (ucontrol->value.integer.value[1] == 0);      /* R */
@@ -156,8 +156,8 @@ static int __pcm_playback_switch_put(
        return 1;
 }
 
-static int __pcm_playback_deemphasis_info(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int __pcm_playback_deemphasis_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -166,15 +166,15 @@ static int __pcm_playback_deemphasis_info(
        return 0;
 }
 
-static int __pcm_playback_deemphasis_get(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int __pcm_playback_deemphasis_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        ucontrol->value.integer.value[0] = filter[0];
        return 0;
 }
 
-static int __pcm_playback_deemphasis_put(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_deemphasis_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol) 
 {
        filter[0] = (ucontrol->value.integer.value[0] > 0);
 
@@ -182,8 +182,8 @@ static int __pcm_playback_deemphasis_put(
        return 1;
 }
 
-static int __pcm_playback_bassboost_info(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int __pcm_playback_bassboost_info(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type                     = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count                    = 1;
@@ -192,15 +192,15 @@ static int __pcm_playback_bassboost_info(
        return 0;
 }
 
-static int __pcm_playback_bassboost_get(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int __pcm_playback_bassboost_get(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol)
 {
        ucontrol->value.integer.value[0] = filter[1];
        return 0;
 }
 
-static int __pcm_playback_bassboost_put(
-               snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 
+static int __pcm_playback_bassboost_put(struct snd_kcontrol *kcontrol,
+               struct snd_ctl_elem_value *ucontrol) 
 {
        filter[1] = (ucontrol->value.integer.value[0] > 0);
 
@@ -208,7 +208,7 @@ static int __pcm_playback_bassboost_put(
        return 1;
 }
 
-static snd_kcontrol_new_t tsc2102_control[] __devinitdata = {
+static struct snd_kcontrol_new tsc2102_controls[] __devinitdata = {
        {
                .name   = "Master Playback Volume",
                .iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -271,9 +271,9 @@ int snd_omap_mixer(struct snd_card_omap_codec *tsc2102)
        if (!tsc2102)
                return -EINVAL;
 
-       for (i = 0; i < ARRAY_SIZE(tsc2102_control); i ++) {
+       for (i = 0; i < ARRAY_SIZE(tsc2102_controls); i ++) {
                err = snd_ctl_add(tsc2102->card,
-                               snd_ctl_new1(&tsc2102_control[i],
+                               snd_ctl_new1(&tsc2102_controls[i],
                                tsc2102->card));
 
                if (err < 0)
index 41e2d079e298c0b7879d9345c7b7151e08478052..2e1643a98eda43e625fce08560010bd74b8e6012 100644 (file)
@@ -38,13 +38,13 @@ static unsigned int rates[] = {
        16000, 22050, 24000, 29400, 32000, 44100, 48000,
 };
 
-static snd_pcm_hw_constraint_list_t tsc2102_hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list tsc2102_hw_constraints_rates = {
        .count = ARRAY_SIZE(rates),
        .list = rates,
        .mask = 0,
 };
 
-static snd_pcm_hardware_t tsc2102_snd_omap_alsa_playback = {
+static struct snd_pcm_hardware tsc2102_snd_omap_alsa_playback = {
        .info                   = SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_MMAP_VALID,