From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/sound/soc/omap/rx51.c | 45 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) (limited to 'kernel/sound/soc/omap/rx51.c') diff --git a/kernel/sound/soc/omap/rx51.c b/kernel/sound/soc/omap/rx51.c index c2ddf0fbf..5e21f0857 100644 --- a/kernel/sound/soc/omap/rx51.c +++ b/kernel/sound/soc/omap/rx51.c @@ -107,8 +107,7 @@ static int rx51_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_card *card = rtd->card; - snd_pcm_hw_constraint_minmax(runtime, - SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); + snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); rx51_ext_control(&card->dapm); return 0; @@ -245,6 +244,8 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "HPLOUT"}, {"Ext Spk", NULL, "HPROUT"}, + {"Ext Spk", NULL, "HPLCOM"}, + {"Ext Spk", NULL, "HPRCOM"}, {"Headphone Jack", NULL, "LLOUT"}, {"Headphone Jack", NULL, "RLOUT"}, {"FM Transmitter", NULL, "LLOUT"}, @@ -288,21 +289,14 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_codec *codec = rtd->codec; struct snd_soc_card *card = rtd->card; struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); - - struct snd_soc_dapm_context *dapm = &codec->dapm; int err; - /* Set up NC codec pins */ - snd_soc_dapm_nc_pin(dapm, "MIC3L"); - snd_soc_dapm_nc_pin(dapm, "MIC3R"); - snd_soc_dapm_nc_pin(dapm, "LINE1R"); - err = tpa6130a2_add_controls(codec); if (err < 0) { dev_err(card->dev, "Failed to add TPA6130A2 controls\n"); return err; } - snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); + snd_soc_limit_volume(card, "TPA6130A2 Headphone Playback Volume", 42); err = omap_mcbsp_st_add_controls(rtd, 2); if (err < 0) { @@ -383,6 +377,7 @@ static struct snd_soc_card rx51_sound_card = { .num_aux_devs = ARRAY_SIZE(rx51_aux_dev), .codec_conf = rx51_codec_conf, .num_configs = ARRAY_SIZE(rx51_codec_conf), + .fully_routed = true, .controls = aic34_rx51_controls, .num_controls = ARRAY_SIZE(aic34_rx51_controls), @@ -455,50 +450,36 @@ static int rx51_soc_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(card, pdata); pdata->tvout_selection_gpio = devm_gpiod_get(card->dev, - "tvout-selection"); + "tvout-selection", + GPIOD_OUT_LOW); if (IS_ERR(pdata->tvout_selection_gpio)) { dev_err(card->dev, "could not get tvout selection gpio\n"); return PTR_ERR(pdata->tvout_selection_gpio); } - err = gpiod_direction_output(pdata->tvout_selection_gpio, 0); - if (err) { - dev_err(card->dev, "could not setup tvout selection gpio\n"); - return err; - } - pdata->jack_detection_gpio = devm_gpiod_get(card->dev, - "jack-detection"); + "jack-detection", + GPIOD_ASIS); if (IS_ERR(pdata->jack_detection_gpio)) { dev_err(card->dev, "could not get jack detection gpio\n"); return PTR_ERR(pdata->jack_detection_gpio); } - pdata->eci_sw_gpio = devm_gpiod_get(card->dev, "eci-switch"); + pdata->eci_sw_gpio = devm_gpiod_get(card->dev, "eci-switch", + GPIOD_OUT_HIGH); if (IS_ERR(pdata->eci_sw_gpio)) { dev_err(card->dev, "could not get eci switch gpio\n"); return PTR_ERR(pdata->eci_sw_gpio); } - err = gpiod_direction_output(pdata->eci_sw_gpio, 1); - if (err) { - dev_err(card->dev, "could not setup eci switch gpio\n"); - return err; - } - pdata->speaker_amp_gpio = devm_gpiod_get(card->dev, - "speaker-amplifier"); + "speaker-amplifier", + GPIOD_OUT_LOW); if (IS_ERR(pdata->speaker_amp_gpio)) { dev_err(card->dev, "could not get speaker enable gpio\n"); return PTR_ERR(pdata->speaker_amp_gpio); } - err = gpiod_direction_output(pdata->speaker_amp_gpio, 0); - if (err) { - dev_err(card->dev, "could not setup speaker enable gpio\n"); - return err; - } - err = devm_snd_soc_register_card(card->dev, card); if (err) { dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", err); -- cgit 1.2.3-korg