Skip to content

Commit

Permalink
Merge pull request torvalds#57 from mpredfearn/ci20-v3.18-audio-fixup
Browse files Browse the repository at this point in the history
Ci20 v3.18 audio fixup
  • Loading branch information
ZubairLK committed Jul 27, 2015
2 parents 17b6872 + 0ec3dfc commit 677ac02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions sound/soc/codecs/jz4780.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ static const struct snd_soc_dapm_widget jz4780_codec_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("AIP2"),
SND_SOC_DAPM_INPUT("AIP3"),

SND_SOC_DAPM_OUTPUT("SYSCLK"),

SND_SOC_DAPM_OUTPUT("AOHPL"),
SND_SOC_DAPM_OUTPUT("AOHPR"),
};
Expand All @@ -258,6 +260,12 @@ static const struct snd_soc_dapm_route jz4780_codec_dapm_routes[] = {

{"AOHPL", NULL, "Output Mixer"},
{"AOHPR", NULL, "Output Mixer"},

/* SYSCLK output from the codec to the AIC is required to keep the
* DMA transfer going during playback when all audible outputs have
* been disabled.
*/
{"SYSCLK", NULL, "DAC" },
};

static int jz4780_codec_hw_params(struct snd_pcm_substream *substream,
Expand Down
6 changes: 2 additions & 4 deletions sound/soc/jz4780/ci20.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,14 @@ static int ingenic_asoc_ci20_probe(struct platform_device *pdev)
ci20_dai_link[0].codec_name = NULL;
}

ret = gpio_request(GPIO_HP_MUTE, "Headphone Mute");
ret = devm_gpio_request(&pdev->dev, GPIO_HP_MUTE, "Headphone Mute");
if (ret < 0)
dev_warn(&pdev->dev, "Failed to request mute GPIO: %d\n",
ret);

gpio_direction_output(GPIO_HP_MUTE, 1);

ret = gpio_request(GPIO_MIC_SW_EN, "Mic Switch Enable");
ret = devm_gpio_request(&pdev->dev, GPIO_MIC_SW_EN, "Mic Switch Enable");
if (ret < 0)
dev_warn(&pdev->dev,
"Failed to request mic switch enable GPIO: %d\n",
Expand All @@ -273,8 +273,6 @@ static int ingenic_asoc_ci20_remove(struct platform_device *pdev)

snd_soc_unregister_card(card);
snd_soc_jack_free_gpios(&ci20_hp_jack, 1, &ci20_hp_jack_gpio);
gpio_free(GPIO_MIC_SW_EN);
gpio_free(GPIO_HP_MUTE);

return 0;
}
Expand Down

0 comments on commit 677ac02

Please sign in to comment.