diff options
Diffstat (limited to 'sound/soc/atmel')
| -rw-r--r-- | sound/soc/atmel/Kconfig | 11 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel-classd.c | 3 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel-pcm-pdc.c | 4 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel-pdmic.c | 4 | ||||
| -rw-r--r-- | sound/soc/atmel/mchp-pdmc.c | 2 | ||||
| -rw-r--r-- | sound/soc/atmel/mchp-spdifrx.c | 6 | ||||
| -rw-r--r-- | sound/soc/atmel/sam9g20_wm8731.c | 2 | ||||
| -rw-r--r-- | sound/soc/atmel/tse850-pcm5142.c | 43 |
8 files changed, 28 insertions, 47 deletions
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig index 5d59e00be823..4f51612f3dd2 100644 --- a/sound/soc/atmel/Kconfig +++ b/sound/soc/atmel/Kconfig @@ -1,13 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -config SND_ATMEL_SOC - tristate "SoC Audio for the Atmel System-on-Chip" +menu "Atmel" depends on HAS_IOMEM - help - Say Y or M if you want to add support for codecs attached to - the ATMEL SSC interface. You will also need - to select the audio interfaces to support below. - -if SND_ATMEL_SOC config SND_ATMEL_SOC_PDC bool @@ -176,4 +169,4 @@ config SND_MCHP_SOC_PDMC 2 data lines. The signal path includes an audio grade programmable decimation filter and outputs 24-bit audio words. -endif +endmenu diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index ba314b279919..1f8c60d2de82 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -11,6 +11,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <linux/string_choices.h> #include <sound/core.h> #include <sound/dmaengine_pcm.h> #include <sound/pcm_params.h> @@ -275,7 +276,7 @@ static int atmel_classd_component_probe(struct snd_soc_component *component) dev_info(component->dev, "PWM modulation type is %s, non-overlapping is %s\n", pwm_type[pdata->pwm_type], - pdata->non_overlap_enable?"enabled":"disabled"); + str_enabled_disabled(pdata->non_overlap_enable)); return 0; } diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c index 7db8df85c54f..374f93fa6e0b 100644 --- a/sound/soc/atmel/atmel-pcm-pdc.c +++ b/sound/soc/atmel/atmel-pcm-pdc.c @@ -288,7 +288,7 @@ static int atmel_pcm_open(struct snd_soc_component *component, if (ret < 0) goto out; - prtd = kzalloc(sizeof(struct atmel_runtime_data), GFP_KERNEL); + prtd = kzalloc_obj(struct atmel_runtime_data); if (prtd == NULL) { ret = -ENOMEM; goto out; @@ -316,7 +316,7 @@ static const struct snd_soc_component_driver atmel_soc_platform = { .prepare = atmel_pcm_prepare, .trigger = atmel_pcm_trigger, .pointer = atmel_pcm_pointer, - .pcm_construct = atmel_pcm_new, + .pcm_new = atmel_pcm_new, }; int atmel_pcm_pdc_platform_register(struct device *dev) diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index fa29dd8ef208..4dfc7e5ca8ff 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -280,7 +280,7 @@ static const DECLARE_TLV_DB_RANGE(mic_gain_tlv, static int pdmic_get_mic_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); unsigned int dgain_val, scale_val; int i; @@ -304,7 +304,7 @@ static int pdmic_put_mic_volsw(struct snd_kcontrol *kcontrol, { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); int max = mc->max; unsigned int val; int ret; diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 06dc3c48e7e8..ec7233ce1f78 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -706,7 +706,7 @@ static int mchp_pdmc_add_chmap_ctls(struct snd_pcm *pcm, struct mchp_pdmc *dd) if (WARN_ON(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].chmap_kctl)) return -EBUSY; - info = kzalloc(sizeof(*info), GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; info->pcm = pcm; diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index fb820609c043..521bee4998f8 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -577,7 +577,6 @@ static int mchp_spdifrx_cs_get(struct mchp_spdifrx_dev *dev, sizeof(ch_stat->data)); pm_runtime_put: - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: mutex_unlock(&dev->mlock); @@ -660,7 +659,6 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev, sizeof(user_data->data)); pm_runtime_put: - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: mutex_unlock(&dev->mlock); @@ -726,7 +724,6 @@ static int mchp_spdifrx_ulock_get(struct snd_kcontrol *kcontrol, uvalue->value.integer.value[0] = ctrl->ulock; - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: mutex_unlock(&dev->mlock); @@ -762,7 +759,6 @@ static int mchp_spdifrx_badf_get(struct snd_kcontrol *kcontrol, ctrl->badf = 0; } - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: mutex_unlock(&dev->mlock); @@ -811,7 +807,6 @@ static int mchp_spdifrx_signal_get(struct snd_kcontrol *kcontrol, regmap_read(dev->regmap, SPDIFRX_RSR, &val); } - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: @@ -875,7 +870,6 @@ static int mchp_spdifrx_rate_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = rate / (32 * SPDIFRX_RSR_IFS(val)); pm_runtime_put: - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); unlock: mutex_unlock(&dev->mlock); diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 335e216ea7b4..be54a63f43d5 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -80,7 +80,7 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd) } #ifndef ENABLE_MIC_INPUT - snd_soc_dapm_nc_pin(&rtd->card->dapm, "Int Mic"); + snd_soc_dapm_disable_pin(snd_soc_card_to_dapm(rtd->card), "Int Mic"); #endif return 0; diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index 0a9efd5f2861..0b4927d07f25 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -58,8 +58,8 @@ struct tse850_priv { static int tse850_get_mux1(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->loop1_cache; @@ -70,8 +70,8 @@ static int tse850_get_mux1(struct snd_kcontrol *kctrl, static int tse850_put_mux1(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int val = ucontrol->value.enumerated.item[0]; @@ -88,8 +88,8 @@ static int tse850_put_mux1(struct snd_kcontrol *kctrl, static int tse850_get_mux2(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->loop2_cache; @@ -100,8 +100,8 @@ static int tse850_get_mux2(struct snd_kcontrol *kctrl, static int tse850_put_mux2(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int val = ucontrol->value.enumerated.item[0]; @@ -118,8 +118,8 @@ static int tse850_put_mux2(struct snd_kcontrol *kctrl, static int tse850_get_mix(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->add_cache; @@ -130,8 +130,8 @@ static int tse850_get_mix(struct snd_kcontrol *kctrl, static int tse850_put_mix(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); int connect = !!ucontrol->value.integer.value[0]; @@ -152,8 +152,8 @@ static int tse850_put_mix(struct snd_kcontrol *kctrl, static int tse850_get_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); int ret; @@ -185,8 +185,8 @@ static int tse850_get_ana(struct snd_kcontrol *kctrl, static int tse850_put_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int uV = ucontrol->value.enumerated.item[0]; @@ -227,16 +227,9 @@ static const struct snd_kcontrol_new mux1 = static const struct snd_kcontrol_new mux2 = SOC_DAPM_ENUM_EXT("MUX2", mux_enum, tse850_get_mux2, tse850_put_mux2); -#define TSE850_DAPM_SINGLE_EXT(xname, reg, shift, max, invert, xget, xput) \ -{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ - .info = snd_soc_info_volsw, \ - .get = xget, \ - .put = xput, \ - .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } - static const struct snd_kcontrol_new mix[] = { - TSE850_DAPM_SINGLE_EXT("IN Switch", SND_SOC_NOPM, 0, 1, 0, - tse850_get_mix, tse850_put_mix), + SOC_SINGLE_EXT("IN Switch", SND_SOC_NOPM, 0, 1, 0, + tse850_get_mix, tse850_put_mix), }; static const char * const ana_text[] = { |
