Lines Matching defs:sublink
22 /* worst-case number of sublinks is used for sublink refcount array allocation only */
33 * @slcount: sublink count
131 dev_dbg(dev, "Link %d: HDAudio extended - sublink count %d\n",
191 static int check_sublink_power(u32 __iomem *lctl, int sublink, bool enabled)
193 int mask = BIT(sublink) << AZX_ML_LCTL_CPA_SHIFT;
216 static int hdaml_link_init(u32 __iomem *lctl, int sublink)
219 u32 mask = BIT(sublink) << AZX_ML_LCTL_SPA_SHIFT;
226 return check_sublink_power(lctl, sublink, true);
229 static int hdaml_link_shutdown(u32 __iomem *lctl, int sublink)
235 mask = BIT(sublink) << AZX_ML_LCTL_SPA_SHIFT;
240 return check_sublink_power(lctl, sublink, false);
305 static void hdaml_link_sync_arm(u32 __iomem *lsync, int sublink)
310 val |= (AZX_REG_ML_LSYNC_CMDSYNC << sublink);
574 void hdac_bus_eml_sync_arm_unlocked(struct hdac_bus *bus, bool alt, int elid, int sublink)
588 hdaml_link_sync_arm(hlink->ml_addr + AZX_REG_ML_LSYNC, sublink);
592 void hdac_bus_eml_sdw_sync_arm_unlocked(struct hdac_bus *bus, int sublink)
594 hdac_bus_eml_sync_arm_unlocked(bus, true, AZX_REG_ML_LEPTR_ID_SDW, sublink);
653 static int hdac_bus_eml_power_up_base(struct hdac_bus *bus, bool alt, int elid, int sublink,
664 if (sublink >= h2link->slcount)
676 if (++h2link->sublink_ref_count[sublink] > 1)
680 ret = hdaml_link_init(hlink->ml_addr + AZX_REG_ML_LCTL, sublink);
689 int hdac_bus_eml_power_up(struct hdac_bus *bus, bool alt, int elid, int sublink)
691 return hdac_bus_eml_power_up_base(bus, alt, elid, sublink, true);
695 int hdac_bus_eml_power_up_unlocked(struct hdac_bus *bus, bool alt, int elid, int sublink)
697 return hdac_bus_eml_power_up_base(bus, alt, elid, sublink, false);
701 static int hdac_bus_eml_power_down_base(struct hdac_bus *bus, bool alt, int elid, int sublink,
712 if (sublink >= h2link->slcount)
724 if (--h2link->sublink_ref_count[sublink] > 0)
727 ret = hdaml_link_shutdown(hlink->ml_addr + AZX_REG_ML_LCTL, sublink);
736 int hdac_bus_eml_power_down(struct hdac_bus *bus, bool alt, int elid, int sublink)
738 return hdac_bus_eml_power_down_base(bus, alt, elid, sublink, true);
742 int hdac_bus_eml_power_down_unlocked(struct hdac_bus *bus, bool alt, int elid, int sublink)
744 return hdac_bus_eml_power_down_base(bus, alt, elid, sublink, false);
748 int hdac_bus_eml_sdw_power_up_unlocked(struct hdac_bus *bus, int sublink)
750 return hdac_bus_eml_power_up_unlocked(bus, true, AZX_REG_ML_LEPTR_ID_SDW, sublink);
754 int hdac_bus_eml_sdw_power_down_unlocked(struct hdac_bus *bus, int sublink)
756 return hdac_bus_eml_power_down_unlocked(bus, true, AZX_REG_ML_LEPTR_ID_SDW, sublink);
760 int hdac_bus_eml_sdw_get_lsdiid_unlocked(struct hdac_bus *bus, int sublink, u16 *lsdiid)
771 *lsdiid = hdaml_link_get_lsdiid(hlink->ml_addr + AZX_REG_ML_LSDIID_OFFSET(sublink));
776 int hdac_bus_eml_sdw_set_lsdiid(struct hdac_bus *bus, int sublink, int dev_num)
789 hdaml_link_set_lsdiid(hlink->ml_addr + AZX_REG_ML_LSDIID_OFFSET(sublink), dev_num);
800 int hdac_bus_eml_sdw_map_stream_ch(struct hdac_bus *bus, int sublink, int y,
814 h2link->instance_offset * sublink +
834 dev_dbg(bus->dev, "sublink %d channel_mask %#x stream_id %d dir %d pcmscm %#x\n",
835 sublink, channel_mask, stream_id, dir, val);