Skip to content

Commit 83b033b

Browse files
committed
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.
2 parents bcab3a6 + 0599730 commit 83b033b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

sound/soc/codecs/rt5670.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ int rt5670_set_jack_detect(struct snd_soc_codec *codec,
567567

568568
rt5670->jack = jack;
569569
rt5670->hp_gpio.gpiod_dev = codec->dev;
570-
rt5670->hp_gpio.name = "headphone detect";
570+
rt5670->hp_gpio.name = "headset";
571571
rt5670->hp_gpio.report = SND_JACK_HEADSET |
572572
SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2;
573573
rt5670->hp_gpio.debounce_time = 150;

sound/soc/generic/simple-card-utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
132132

133133
/* Parse the card name from DT */
134134
ret = snd_soc_of_parse_card_name(card, "label");
135-
if (ret < 0) {
135+
if (ret < 0 || !card->name) {
136136
char prop[128];
137137

138138
snprintf(prop, sizeof(prop), "%sname", prefix);

sound/soc/intel/boards/cht_bsw_rt5672.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,23 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
184184
return 0;
185185
}
186186

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+
187194
static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
188195
{
189196
int ret;
190197
struct snd_soc_dai *codec_dai = runtime->codec_dai;
191198
struct snd_soc_codec *codec = codec_dai->codec;
192199
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
193200

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+
194204
/* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */
195205
ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24);
196206
if (ret < 0) {

0 commit comments

Comments
 (0)