]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ALSA: hda: Fix mismatch for register mask and value in ext controller.
authorKeyon Jie <yang.jie@linux.intel.com>
Fri, 28 Sep 2018 09:38:59 +0000 (17:38 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
BugLink: https://bugs.launchpad.net/bugs/1854216
[ Upstream commit c32bf867cb6721d6ea04044d33f19c8bd81280c1 ]

E.g. for snd_hdac_ext_bus_link_power_up(), we should set mask to be
AZX_MLCTL_SPA(it was 0), and AZX_MLCTL_SPA as value to power up it,
here correct it and several similar mismatches.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/hda/ext/hdac_ext_controller.c

index 84f3b81687164d419b4cff063011d774790273f3..bb510c9e4d130444bf7c7696a7ac59e1fc7a2cb8 100644 (file)
@@ -49,9 +49,11 @@ void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *ebus, bool enable)
        }
 
        if (enable)
-               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_GPROCEN);
+               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
+                                AZX_PPCTL_GPROCEN, AZX_PPCTL_GPROCEN);
        else
-               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_GPROCEN, 0);
+               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
+                                AZX_PPCTL_GPROCEN, 0);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_ppcap_enable);
 
@@ -70,9 +72,11 @@ void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *ebus, bool enable)
        }
 
        if (enable)
-               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_PIE);
+               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
+                                AZX_PPCTL_PIE, AZX_PPCTL_PIE);
        else
-               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_PIE, 0);
+               snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
+                                AZX_PPCTL_PIE, 0);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_ppcap_int_enable);
 
@@ -197,7 +201,8 @@ static int check_hdac_link_power_active(struct hdac_ext_link *link, bool enable)
  */
 int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link)
 {
-       snd_hdac_updatel(link->ml_addr, AZX_REG_ML_LCTL, 0, AZX_MLCTL_SPA);
+       snd_hdac_updatel(link->ml_addr, AZX_REG_ML_LCTL,
+                        AZX_MLCTL_SPA, AZX_MLCTL_SPA);
 
        return check_hdac_link_power_active(link, true);
 }
@@ -225,8 +230,8 @@ int snd_hdac_ext_bus_link_power_up_all(struct hdac_ext_bus *ebus)
        int ret;
 
        list_for_each_entry(hlink, &ebus->hlink_list, list) {
-               snd_hdac_updatel(hlink->ml_addr,
-                               AZX_REG_ML_LCTL, 0, AZX_MLCTL_SPA);
+               snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL,
+                                AZX_MLCTL_SPA, AZX_MLCTL_SPA);
                ret = check_hdac_link_power_active(hlink, true);
                if (ret < 0)
                        return ret;
@@ -246,7 +251,8 @@ int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus)
        int ret;
 
        list_for_each_entry(hlink, &ebus->hlink_list, list) {
-               snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL, AZX_MLCTL_SPA, 0);
+               snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL,
+                                AZX_MLCTL_SPA, 0);
                ret = check_hdac_link_power_active(hlink, false);
                if (ret < 0)
                        return ret;