public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Get TSC2101 and TSC2102 drivers in sync with new ALSA struct naming
@ 2007-05-04  2:44 andrzej zaborowski
  2007-05-04 17:09 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: andrzej zaborowski @ 2007-05-04  2:44 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

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>

[-- Attachment #2: 0004-Update-TSC2101-and-TSC2102-drivers-with-new-ALSA-structure-names.txt --]
[-- Type: text/plain, Size: 19451 bytes --]

From 0800f9eaf98b9c525303a44e5582124a34187560 Mon Sep 17 00:00:00 2001
From: Andrzej Zaborowski <balrog@zabor.org>
Date: Fri, 4 May 2007 05:30:40 +0200
Subject: [PATCH] Update TSC2101 and TSC2102 drivers with new ALSA structure names.

---
 sound/arm/omap/omap-alsa-tsc2101-mixer.c |   83 ++++++++++++++++++++----------
 sound/arm/omap/omap-alsa-tsc2101-mixer.h |    2 +-
 sound/arm/omap/omap-alsa-tsc2101.c       |    6 +-
 sound/arm/omap/omap-alsa-tsc2101.h       |    2 +-
 sound/arm/omap/omap-alsa-tsc2102-mixer.c |   54 ++++++++++----------
 sound/arm/omap/omap-alsa-tsc2102.c       |    4 +-
 6 files changed, 89 insertions(+), 62 deletions(-)

diff --git a/sound/arm/omap/omap-alsa-tsc2101-mixer.c b/sound/arm/omap/omap-alsa-tsc2101-mixer.c
index 0f92266..8faba95 100644
--- a/sound/arm/omap/omap-alsa-tsc2101-mixer.c
+++ b/sound/arm/omap/omap-alsa-tsc2101-mixer.c
@@ -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,
diff --git a/sound/arm/omap/omap-alsa-tsc2101-mixer.h b/sound/arm/omap/omap-alsa-tsc2101-mixer.h
index 3f27e27..26fabfb 100644
--- a/sound/arm/omap/omap-alsa-tsc2101-mixer.h
+++ b/sound/arm/omap/omap-alsa-tsc2101-mixer.h
@@ -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.
  *
diff --git a/sound/arm/omap/omap-alsa-tsc2101.c b/sound/arm/omap/omap-alsa-tsc2101.c
index 9bbf0c7..24b0cc6 100644
--- a/sound/arm/omap/omap-alsa-tsc2101.c
+++ b/sound/arm/omap/omap-alsa-tsc2101.c
@@ -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
diff --git a/sound/arm/omap/omap-alsa-tsc2101.h b/sound/arm/omap/omap-alsa-tsc2101.h
index 803d215..6cb2db3 100644
--- a/sound/arm/omap/omap-alsa-tsc2101.h
+++ b/sound/arm/omap/omap-alsa-tsc2101.h
@@ -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.
  *
diff --git a/sound/arm/omap/omap-alsa-tsc2102-mixer.c b/sound/arm/omap/omap-alsa-tsc2102-mixer.c
index 2e06d70..d1c8b65 100644
--- a/sound/arm/omap/omap-alsa-tsc2102-mixer.c
+++ b/sound/arm/omap/omap-alsa-tsc2102-mixer.c
@@ -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)
diff --git a/sound/arm/omap/omap-alsa-tsc2102.c b/sound/arm/omap/omap-alsa-tsc2102.c
index 41e2d07..2e1643a 100644
--- a/sound/arm/omap/omap-alsa-tsc2102.c
+++ b/sound/arm/omap/omap-alsa-tsc2102.c
@@ -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,
-- 
1.4.4.3


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-04 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04  2:44 [PATCH] Get TSC2101 and TSC2102 drivers in sync with new ALSA struct naming andrzej zaborowski
2007-05-04 17:09 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox