aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/thinkpad_helper.c4
-rw-r--r--sound/x86/intel_hdmi_audio.c26
2 files changed, 7 insertions, 23 deletions
diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c
index 97f49b751e6e..568575b72f2f 100644
--- a/sound/pci/hda/thinkpad_helper.c
+++ b/sound/pci/hda/thinkpad_helper.c
@@ -58,8 +58,8 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
58 removefunc = false; 58 removefunc = false;
59 } 59 }
60 if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0 && 60 if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0 &&
61 snd_hda_gen_add_micmute_led(codec, 61 !snd_hda_gen_add_micmute_led(codec,
62 update_tpacpi_micmute) > 0) 62 update_tpacpi_micmute))
63 removefunc = false; 63 removefunc = false;
64 } 64 }
65 65
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 83d76c345940..00c92eb854ce 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1648,7 +1648,7 @@ static int had_create_jack(struct snd_intelhad *ctx,
1648 * PM callbacks 1648 * PM callbacks
1649 */ 1649 */
1650 1650
1651static int hdmi_lpe_audio_runtime_suspend(struct device *dev) 1651static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1652{ 1652{
1653 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); 1653 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1654 int port; 1654 int port;
@@ -1664,23 +1664,8 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
1664 } 1664 }
1665 } 1665 }
1666 1666
1667 return 0; 1667 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1668}
1669
1670static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1671{
1672 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1673 int err;
1674 1668
1675 err = hdmi_lpe_audio_runtime_suspend(dev);
1676 if (!err)
1677 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D3hot);
1678 return err;
1679}
1680
1681static int hdmi_lpe_audio_runtime_resume(struct device *dev)
1682{
1683 pm_runtime_mark_last_busy(dev);
1684 return 0; 1669 return 0;
1685} 1670}
1686 1671
@@ -1688,8 +1673,10 @@ static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
1688{ 1673{
1689 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev); 1674 struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
1690 1675
1691 hdmi_lpe_audio_runtime_resume(dev); 1676 pm_runtime_mark_last_busy(dev);
1677
1692 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0); 1678 snd_power_change_state(card_ctx->card, SNDRV_CTL_POWER_D0);
1679
1693 return 0; 1680 return 0;
1694} 1681}
1695 1682
@@ -1877,7 +1864,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
1877 1864
1878 pm_runtime_use_autosuspend(&pdev->dev); 1865 pm_runtime_use_autosuspend(&pdev->dev);
1879 pm_runtime_mark_last_busy(&pdev->dev); 1866 pm_runtime_mark_last_busy(&pdev->dev);
1880 pm_runtime_set_active(&pdev->dev);
1881 1867
1882 dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__); 1868 dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__);
1883 for_each_port(card_ctx, port) { 1869 for_each_port(card_ctx, port) {
@@ -1908,8 +1894,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev)
1908 1894
1909static const struct dev_pm_ops hdmi_lpe_audio_pm = { 1895static const struct dev_pm_ops hdmi_lpe_audio_pm = {
1910 SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume) 1896 SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
1911 SET_RUNTIME_PM_OPS(hdmi_lpe_audio_runtime_suspend,
1912 hdmi_lpe_audio_runtime_resume, NULL)
1913}; 1897};
1914 1898
1915static struct platform_driver hdmi_lpe_audio_driver = { 1899static struct platform_driver hdmi_lpe_audio_driver = {