diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-08-31 14:08:26 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-31 14:08:26 +0200 |
commit | 83b033bd33a8b7b16f568e3432d3e27d03ef9c82 (patch) | |
tree | f73c40848c80363b41591ee8511f94b466f69cf8 /sound | |
parent | bcab3a6e64a9647e022b46182c9687a8c3aa9d11 (diff) | |
parent | 05997302b7aa56a7f4a7b9d49d0661865c17874d (diff) | |
download | talos-obmc-linux-83b033bd33a8b7b16f568e3432d3e27d03ef9c82.tar.gz talos-obmc-linux-83b033bd33a8b7b16f568e3432d3e27d03ef9c82.zip |
Merge tag 'asoc-fix-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.13
A couple of fixes, one for a regression in simple-card introduced during
the merge window that was only reported this week and another for a
regression in registration of ACPI GPIOs.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rt5670.c | 2 | ||||
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/boards/cht_bsw_rt5672.c | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 0ec7985ed306..054b613cb0d0 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -567,7 +567,7 @@ int rt5670_set_jack_detect(struct snd_soc_codec *codec, rt5670->jack = jack; rt5670->hp_gpio.gpiod_dev = codec->dev; - rt5670->hp_gpio.name = "headphone detect"; + rt5670->hp_gpio.name = "headset"; rt5670->hp_gpio.report = SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2; rt5670->hp_gpio.debounce_time = 150; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 7d7ab4aee42e..d72f7d58102f 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -132,7 +132,7 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card, /* Parse the card name from DT */ ret = snd_soc_of_parse_card_name(card, "label"); - if (ret < 0) { + if (ret < 0 || !card->name) { char prop[128]; snprintf(prop, sizeof(prop), "%sname", prefix); diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index bc2a52de06a3..f597d5582223 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -184,6 +184,13 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream, return 0; } +static const struct acpi_gpio_params headset_gpios = { 0, 0, false }; + +static const struct acpi_gpio_mapping cht_rt5672_gpios[] = { + { "headset-gpios", &headset_gpios, 1 }, + {}, +}; + static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) { int ret; @@ -191,6 +198,9 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) struct snd_soc_codec *codec = codec_dai->codec; struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); + if (devm_acpi_dev_add_driver_gpios(codec->dev, cht_rt5672_gpios)) + dev_warn(runtime->dev, "Unable to add GPIO mapping table\n"); + /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24); if (ret < 0) { |