summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWallace Wang <r59996@freescale.com>2008-03-25 11:11:42 +0800
committerDaniel Schaeffer <daniel.schaeffer@timesys.com>2008-08-25 15:20:53 -0400
commit950b7c2e75edba5a267b2df14a2be7c1a76152a7 (patch)
treebfb3b95bd8ef3af6d42b5d78a3bb424f1e8a5b49 /sound
parent3bfa05d80bfb634e944c3be1ba102838fa37eab5 (diff)
ENGR00068611 PMIC AUDIO and SSI drivers can not be loadable modules
Merge ENGR0006861 Remove platform_device register in mxc-alsa-pmic.c Move clk_put to device.c Signed-off-by: Wallace Wang <r59996@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/arm/Makefile3
-rw-r--r--sound/arm/mxc-alsa-mixer.c4
-rw-r--r--sound/arm/mxc-alsa-pmic.c33
3 files changed, 29 insertions, 11 deletions
diff --git a/sound/arm/Makefile b/sound/arm/Makefile
index a8a75b5da3d0..e666aa5509a4 100644
--- a/sound/arm/Makefile
+++ b/sound/arm/Makefile
@@ -18,7 +18,8 @@ snd-pxa2xx-ac97-objs := pxa2xx-ac97.o
# Define the header file locations for PMIC drivers.
#
CFLAGS_mxc-alsa-pmic.o = -I$(TOPDIR)/drivers/mxc
-obj-$(CONFIG_SND_MXC_PMIC) += mxc-alsa-pmic.o mxc-alsa-mixer.o
+obj-$(CONFIG_SND_MXC_PMIC) += snd-mxc-alsa.o
+snd-mxc-alsa-objs := mxc-alsa-pmic.o mxc-alsa-mixer.o
CFLGS_mxc_alsa_spdif.o = -I$(TOPDIR)/drivers/mxc
obj-$(CONFIG_SND_MXC_SPDIF) += mxc-alsa-spdif.o
diff --git a/sound/arm/mxc-alsa-mixer.c b/sound/arm/mxc-alsa-mixer.c
index 0676c93916d1..f11b50c202e0 100644
--- a/sound/arm/mxc-alsa-mixer.c
+++ b/sound/arm/mxc-alsa-mixer.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -357,3 +357,5 @@ int mxc_alsa_create_ctl(struct snd_card *card, void *p_value)
return 0;
}
+
+EXPORT_SYMBOL(mxc_alsa_create_ctl);
diff --git a/sound/arm/mxc-alsa-pmic.c b/sound/arm/mxc-alsa-pmic.c
index 6392c596e8c6..3665f30091bd 100644
--- a/sound/arm/mxc-alsa-pmic.c
+++ b/sound/arm/mxc-alsa-pmic.c
@@ -502,8 +502,6 @@ static struct snd_pcm_hw_constraint_list hw_capture_rates = {
.mask = 0,
};
-static struct platform_device *device;
-
#ifdef CONFIG_HEADSET_DETECT_ENABLE
static PMIC_HS_STATE hs_state;
@@ -1147,6 +1145,8 @@ int set_mixer_input_device(PMIC_AUDIO_HANDLE handle, INPUT_DEVICES dev,
return 0;
}
+EXPORT_SYMBOL(set_mixer_input_device);
+
int get_mixer_input_device()
{
int val;
@@ -1154,6 +1154,8 @@ int get_mixer_input_device()
return val;
}
+EXPORT_SYMBOL(get_mixer_input_device);
+
/*!
* This function sets the PMIC input device's gain.
* Note that the gain is the input volume
@@ -1189,6 +1191,8 @@ int set_mixer_input_gain(PMIC_AUDIO_HANDLE handle, int val)
return 0;
}
+EXPORT_SYMBOL(set_mixer_input_gain);
+
int get_mixer_input_gain()
{
int val;
@@ -1196,6 +1200,8 @@ int get_mixer_input_gain()
return val;
}
+EXPORT_SYMBOL(get_mixer_input_gain);
+
/*!
* This function sets the PMIC output device's volume.
*
@@ -1238,6 +1244,8 @@ int set_mixer_output_volume(PMIC_AUDIO_HANDLE handle, int volume,
return 0;
}
+EXPORT_SYMBOL(set_mixer_output_volume);
+
int get_mixer_output_volume()
{
int val;
@@ -1245,6 +1253,8 @@ int get_mixer_output_volume()
return val;
}
+EXPORT_SYMBOL(get_mixer_output_volume);
+
/*!
* This function sets the PMIC output device's balance.
*
@@ -1292,6 +1302,8 @@ int set_mixer_output_balance(int bal)
return 0;
}
+EXPORT_SYMBOL(set_mixer_output_balance);
+
int get_mixer_output_balance()
{
int val;
@@ -1299,6 +1311,8 @@ int get_mixer_output_balance()
return val;
}
+EXPORT_SYMBOL(get_mixer_output_balance);
+
/*!
* This function sets the PMIC output device's mono adder config.
*
@@ -1325,6 +1339,8 @@ int set_mixer_output_mono_adder(PMIC_AUDIO_MONO_ADDER_MODE mode)
return 0;
}
+EXPORT_SYMBOL(set_mixer_output_mono_adder);
+
int get_mixer_output_mono_adder()
{
int val;
@@ -1332,6 +1348,8 @@ int get_mixer_output_mono_adder()
return val;
}
+EXPORT_SYMBOL(get_mixer_output_mono_adder);
+
/*!
* This function sets the output device(s) in PMIC. It takes an
* ALSA value and modifies registers using PMIC-specific values.
@@ -1482,6 +1500,8 @@ int set_mixer_output_device(PMIC_AUDIO_HANDLE handle, OUTPUT_SOURCE src,
}
+EXPORT_SYMBOL(set_mixer_output_device);
+
int get_mixer_output_device()
{
int val;
@@ -1489,6 +1509,8 @@ int get_mixer_output_device()
return val;
}
+EXPORT_SYMBOL(get_mixer_output_device);
+
/*!
* This function configures the CODEC for playback/recording.
*
@@ -3842,12 +3864,6 @@ static int __init mxc_alsa_audio_probe(struct platform_device *pdev)
static int mxc_alsa_audio_remove(struct platform_device *dev)
{
- if (audio_data->ssi_num == 1) {
- clk_put(audio_data->ssi_clk[SSI1]);
- } else {
- clk_put(audio_data->ssi_clk[SSI1]);
- clk_put(audio_data->ssi_clk[SSI2]);
- }
snd_card_free(mxc_audio->card);
kfree(mxc_audio);
platform_set_drvdata(dev, NULL);
@@ -3879,7 +3895,6 @@ static int __init mxc_alsa_audio_init(void)
static void __exit mxc_alsa_audio_exit(void)
{
- platform_device_unregister(device);
platform_driver_unregister(&mxc_alsa_audio_driver);
}