|
@@ -125,9 +125,9 @@ static int mop500_ab8500_set_mclk(struct device *dev,
|
|
|
static int mclk_input_control_get(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
|
{
|
|
|
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
|
|
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
|
|
|
struct mop500_ab8500_drvdata *drvdata =
|
|
|
- snd_soc_card_get_drvdata(codec->card);
|
|
|
+ snd_soc_card_get_drvdata(card);
|
|
|
|
|
|
ucontrol->value.enumerated.item[0] = drvdata->mclk_sel;
|
|
|
|
|
@@ -137,9 +137,9 @@ static int mclk_input_control_get(struct snd_kcontrol *kcontrol,
|
|
|
static int mclk_input_control_put(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
|
{
|
|
|
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
|
|
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
|
|
|
struct mop500_ab8500_drvdata *drvdata =
|
|
|
- snd_soc_card_get_drvdata(codec->card);
|
|
|
+ snd_soc_card_get_drvdata(card);
|
|
|
unsigned int val = ucontrol->value.enumerated.item[0];
|
|
|
|
|
|
if (val > (unsigned int)MCLK_ULPCLK)
|
|
@@ -160,16 +160,6 @@ static struct snd_kcontrol_new mop500_ab8500_ctrls[] = {
|
|
|
SOC_ENUM_EXT("Master Clock Select",
|
|
|
soc_enum_mclk,
|
|
|
mclk_input_control_get, mclk_input_control_put),
|
|
|
- /* Digital interface - Clocks */
|
|
|
- SOC_SINGLE("Digital Interface Master Generator Switch",
|
|
|
- AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENMASTGEN,
|
|
|
- 1, 0),
|
|
|
- SOC_SINGLE("Digital Interface 0 Bit-clock Switch",
|
|
|
- AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK0,
|
|
|
- 1, 0),
|
|
|
- SOC_SINGLE("Digital Interface 1 Bit-clock Switch",
|
|
|
- AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK1,
|
|
|
- 1, 0),
|
|
|
SOC_DAPM_PIN_SWITCH("Headset Left"),
|
|
|
SOC_DAPM_PIN_SWITCH("Headset Right"),
|
|
|
SOC_DAPM_PIN_SWITCH("Earpiece"),
|
|
@@ -193,7 +183,7 @@ static struct snd_kcontrol_new mop500_ab8500_ctrls[] = {
|
|
|
|
|
|
/* ASoC */
|
|
|
|
|
|
-int mop500_ab8500_startup(struct snd_pcm_substream *substream)
|
|
|
+static int mop500_ab8500_startup(struct snd_pcm_substream *substream)
|
|
|
{
|
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
|
|
|
@@ -202,7 +192,7 @@ int mop500_ab8500_startup(struct snd_pcm_substream *substream)
|
|
|
snd_soc_card_get_drvdata(rtd->card));
|
|
|
}
|
|
|
|
|
|
-void mop500_ab8500_shutdown(struct snd_pcm_substream *substream)
|
|
|
+static void mop500_ab8500_shutdown(struct snd_pcm_substream *substream)
|
|
|
{
|
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
|
struct device *dev = rtd->card->dev;
|
|
@@ -216,7 +206,7 @@ void mop500_ab8500_shutdown(struct snd_pcm_substream *substream)
|
|
|
rx_slots = DEF_RX_SLOTS;
|
|
|
}
|
|
|
|
|
|
-int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
|
|
|
+static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
|
|
|
struct snd_pcm_hw_params *params)
|
|
|
{
|
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
@@ -385,7 +375,7 @@ int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
|
|
|
drvdata->mclk_sel = MCLK_ULPCLK;
|
|
|
|
|
|
/* Add controls */
|
|
|
- ret = snd_soc_add_codec_controls(codec, mop500_ab8500_ctrls,
|
|
|
+ ret = snd_soc_add_card_controls(codec->card, mop500_ab8500_ctrls,
|
|
|
ARRAY_SIZE(mop500_ab8500_ctrls));
|
|
|
if (ret < 0) {
|
|
|
pr_err("%s: Failed to add machine-controls (%d)!\n",
|