ARM: OMAP: Convert OMAP ALSA core and AIC23 to new ALSA struct usage
PATCH 1/1 ARM: OMAP: Convert OMAP ALSA core and AIC23 to new ALSA struct usage
ARM: OMAP: Convert OMAP ALSA core and AIC23 to new ALSA struct usage.
Signed-off-by Dirk Behme <[email protected]>
sound/arm/omap/omap-alsa-aic23-mixer.c +26 -23
@@ -139,7 +139,8 @@ u16 snd_sidetone[6] = {/* Begin Bool Functions */ -static int snd_omap_info_bool (snd_kcontrol_t *kcontrol,snd_ctl_elem_info_t * uinfo) +static int snd_omap_info_bool (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_info * uinfo) { uinfo->type =SNDRV_CTL_ELEM_TYPE_BOOLEAN ; uinfo->count =1 ;
@@ -149,8 +150,8 @@ static int snd_omap_info_bool(snd_kcontrreturn 0 ; } -static int snd_omap_get_bool (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_get_bool (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {int mic_index = (kcontrol->private_value >>8 ) &0x03 ;u16 mask = (kcontrol->private_value >>12 ) &0xff ;
@@ -166,8 +167,8 @@ static int snd_omap_get_bool(snd_kcontroreturn 0 ; } -static int snd_omap_put_bool (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_put_bool (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {int mic_index = (kcontrol->private_value >>8 ) &0x03 ;u16 mask = (kcontrol->private_value >>12 ) &0xff ;
@@ -196,8 +197,8 @@ static int snd_omap_put_bool(snd_kcontro/* Begin Mux Functions */ -static int snd_omap_info_mux (snd_kcontrol_t *kcontrol, -snd_ctl_elem_info_t * uinfo) +static int snd_omap_info_mux (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_info * uinfo) {/* Mic = 0 * Line = 1 */
@@ -216,8 +217,8 @@ static int snd_omap_info_mux(snd_kcontroreturn 0 ; } -static int snd_omap_get_mux (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_get_mux (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {u16 mask = (kcontrol->private_value >>10 ) &0xff ;int mux_index = (kcontrol->private_value >>8 ) &0x03 ;
@@ -228,8 +229,8 @@ static int snd_omap_get_mux(snd_kcontrolreturn 0 ; } -static int snd_omap_put_mux (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_put_mux (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {u16 reg = kcontrol->private_value &0xff ;u16 mask = (kcontrol->private_value >>10 ) &0xff ;
@@ -251,8 +252,8 @@ static int snd_omap_put_mux(snd_kcontrol/* Begin Single Functions */ -static int snd_omap_info_single (snd_kcontrol_t *kcontrol, -snd_ctl_elem_info_t * uinfo) +static int snd_omap_info_single (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_info * uinfo) {int mask = (kcontrol->private_value >>18 ) &0xff ;int reg_val = (kcontrol->private_value >>8 ) &0xff ;
@@ -266,8 +267,8 @@ static int snd_omap_info_single(snd_kconreturn 0 ; } -static int snd_omap_get_single (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_get_single (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {u16 reg_val = (kcontrol->private_value >>8 ) &0xff ;
@@ -276,8 +277,8 @@ static int snd_omap_get_single(snd_kcontreturn 0 ; } -static int snd_omap_put_single (snd_kcontrol_t * kcontrol, -snd_ctl_elem_value_t * ucontrol) +static int snd_omap_put_single (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {u16 reg_index = (kcontrol->private_value >>16 ) &0x03 ;u16 mask = (kcontrol->private_value >>18 ) &0x1ff ;
@@ -308,8 +309,8 @@ static int snd_omap_put_single(snd_kcont/* Begin Double Functions */ -static int snd_omap_info_double (snd_kcontrol_t *kcontrol, -snd_ctl_elem_info_t * uinfo) +static int snd_omap_info_double (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_info * uinfo) {/* mask == 0 : Switch * mask != 0 : Volume */
@@ -324,7 +325,8 @@ static int snd_omap_info_double(snd_kconreturn 0 ; } -static int snd_omap_get_double (snd_kcontrol_t * kcontrol,snd_ctl_elem_value_t * ucontrol) +static int snd_omap_get_double (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {/* mask == 0 : Switch * mask != 0 : Volume */
@@ -343,7 +345,8 @@ static int snd_omap_get_double(snd_kcontreturn 0 ; } -static int snd_omap_put_double (snd_kcontrol_t * kcontrol,snd_ctl_elem_value_t * ucontrol) +static int snd_omap_put_double (struct snd_kcontrol * kcontrol, +struct snd_ctl_elem_value * ucontrol) {/* mask == 0 : Switch * mask != 0 : Volume */
@@ -393,7 +396,7 @@ static int snd_omap_put_double(snd_kcont/* End Double Functions */ -static snd_kcontrol_new_t snd_omap_controls[] = { +static struct snd_kcontrol_new snd_omap_controls[] = {OMAP_DOUBLE ("PCM Playback Switch" ,0 ,LEFT_CHANNEL_VOLUME_ADDR ,RIGHT_CHANNEL_VOLUME_ADDR ,PCM_INDEX ,0x00 ), OMAP_DOUBLE("PCM Playback Volume", 0, LEFT_CHANNEL_VOLUME_ADDR, RIGHT_CHANNEL_VOLUME_ADDR,
@@ -475,7 +478,7 @@ void snd_omap_init_mixer(void)int snd_omap_mixer (struct snd_card_omap_codec *chip) { -snd_card_t *card; +struct snd_card *card;unsigned int idx;int err;
sound/arm/omap/omap-alsa-aic23.c +3 -3
@@ -60,13 +60,13 @@ static unsigned int rates[] = { 48000, 88200, 96000, }; -static snd_pcm_hw_constraint_list_t aic23_hw_constraints_rates = { +static struct snd_pcm_hw_constraint_list aic23_hw_constraints_rates = { .count =ARRAY_SIZE (rates), .list = rates, .mask =0 , }; -static snd_pcm_hardware_t aic23_snd_omap_alsa_playback = { +static struct snd_pcm_hardware aic23_snd_omap_alsa_playback = { .info = (SNDRV_PCM_INFO_INTERLEAVED |SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP |SNDRV_PCM_INFO_MMAP_VALID ), .formats = (SNDRV_PCM_FMTBIT_S16_LE ),
@@ -87,7 +87,7 @@ static snd_pcm_hardware_t aic23_snd_omap .fifo_size = 0, }; -static snd_pcm_hardware_t aic23_snd_omap_alsa_capture = { +static struct snd_pcm_hardware aic23_snd_omap_alsa_capture = { .info = (SNDRV_PCM_INFO_INTERLEAVED |SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP |SNDRV_PCM_INFO_MMAP_VALID ), .formats = (SNDRV_PCM_FMTBIT_S16_LE ),
sound/arm/omap/omap-alsa.c +23 -22
156 lines not on this page · raw message
Quoted 3 lines · Dirk Behme
ARM: OMAP: Convert OMAP ALSA core and AIC23 to new ALSA struct usage.
Thanks, pushing today.
Tony