diff options
author | Mark Brown <broonie@kernel.org> | 2017-09-01 07:12:09 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-09-01 07:12:09 -0400 |
commit | 72aaea38a266639fdc4c8cfc2c421735fd3bbda9 (patch) | |
tree | 910313b19a44c0599767f60ad3f56083fe928104 | |
parent | cc4a41fe5541a73019a864883297bd5043aa6d98 (diff) | |
parent | 05997302b7aa56a7f4a7b9d49d0661865c17874d (diff) |
Merge tag 'asoc-fix-v4.13-rc7' into asoc-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.
# gpg: Signature made Thu 31 Aug 2017 12:50:29 BST
# gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0
# gpg: issuer "broonie@kernel.org"
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [unknown]
# gpg: aka "Mark Brown <broonie@debian.org>" [unknown]
# gpg: aka "Mark Brown <broonie@kernel.org>" [unknown]
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" [unknown]
# gpg: aka "Mark Brown <broonie@linaro.org>" [unknown]
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB
# Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
-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, | |||
567 | 567 | ||
568 | rt5670->jack = jack; | 568 | rt5670->jack = jack; |
569 | rt5670->hp_gpio.gpiod_dev = codec->dev; | 569 | rt5670->hp_gpio.gpiod_dev = codec->dev; |
570 | rt5670->hp_gpio.name = "headphone detect"; | 570 | rt5670->hp_gpio.name = "headset"; |
571 | rt5670->hp_gpio.report = SND_JACK_HEADSET | | 571 | rt5670->hp_gpio.report = SND_JACK_HEADSET | |
572 | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2; | 572 | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2; |
573 | rt5670->hp_gpio.debounce_time = 150; | 573 | 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, | |||
132 | 132 | ||
133 | /* Parse the card name from DT */ | 133 | /* Parse the card name from DT */ |
134 | ret = snd_soc_of_parse_card_name(card, "label"); | 134 | ret = snd_soc_of_parse_card_name(card, "label"); |
135 | if (ret < 0) { | 135 | if (ret < 0 || !card->name) { |
136 | char prop[128]; | 136 | char prop[128]; |
137 | 137 | ||
138 | snprintf(prop, sizeof(prop), "%sname", prefix); | 138 | 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, | |||
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
187 | static const struct acpi_gpio_params headset_gpios = { 0, 0, false }; | ||
188 | |||
189 | static const struct acpi_gpio_mapping cht_rt5672_gpios[] = { | ||
190 | { "headset-gpios", &headset_gpios, 1 }, | ||
191 | {}, | ||
192 | }; | ||
193 | |||
187 | static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) | 194 | static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) |
188 | { | 195 | { |
189 | int ret; | 196 | int ret; |
@@ -191,6 +198,9 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) | |||
191 | struct snd_soc_codec *codec = codec_dai->codec; | 198 | struct snd_soc_codec *codec = codec_dai->codec; |
192 | struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); | 199 | struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); |
193 | 200 | ||
201 | if (devm_acpi_dev_add_driver_gpios(codec->dev, cht_rt5672_gpios)) | ||
202 | dev_warn(runtime->dev, "Unable to add GPIO mapping table\n"); | ||
203 | |||
194 | /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ | 204 | /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ |
195 | ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24); | 205 | ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24); |
196 | if (ret < 0) { | 206 | if (ret < 0) { |