#ifndef __SOUND_HDAUDIO_EXT_H #define __SOUND_HDAUDIO_EXT_H #include /** * hdac_ext_bus: HDAC extended bus for extended HDA caps * * @bus: hdac bus * @num_streams: streams supported * @hlink_list: link list of HDA links * @lock: lock for link mgmt * @cmd_dma_state: state of cmd DMAs: CORB and RIRB */ struct hdac_ext_bus { struct hdac_bus bus; int num_streams; int idx; struct list_head hlink_list; struct mutex lock; bool cmd_dma_state; }; int snd_hdac_ext_bus_init(struct hdac_ext_bus *sbus, struct device *dev, const struct hdac_bus_ops *ops, const struct hdac_io_ops *io_ops); void snd_hdac_ext_bus_exit(struct hdac_ext_bus *sbus); int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *sbus, int addr); void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev); void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus); #define ebus_to_hbus(ebus) (&(ebus)->bus) #define hbus_to_ebus(_bus) \ container_of(_bus, struct hdac_ext_bus, bus) #define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \ { .vendor_id = (_vid), .rev_id = (_rev), .name = (_name), \ .api_version = HDA_DEV_ASOC, \ .driver_data = (unsigned long)(drv_data) } #define HDA_CODEC_EXT_ENTRY(_vid, _revid, _name, _drv_data) \ HDA_CODEC_REV_EXT_ENTRY(_vid, _revid, _name, _drv_data) void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable); void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable); void snd_hdac_ext_stream_spbcap_enable(struct hdac_ext_bus *chip, bool enable, int index); int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_ext_bus *bus); struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_ext_bus *bus, const char *codec_name); enum hdac_ext_stream_type { HDAC_EXT_STREAM_TYPE_COUPLED = 0, HDAC_EXT_STREAM_TYPE_HOST, HDAC_EXT_STREAM_TYPE_LINK }; /** * hdac_ext_stream: HDAC extended stream for extended HDA caps * * @hstream: hdac_stream * @pphc_addr: processing pipe host stream pointer * @pplc_addr: processing pipe link stream pointer * @spib_addr: software position in buffers stream pointer * @fifo_addr: software position Max fifos stream pointer * @dpibr_addr: DMA position in buffer resume pointer * @dpib: DMA position in buffer * @lpib: Linear position in buffer * @decoupled: stream host and link is decoupled * @link_locked: link is locked * @link_prepared: link is prepared * link_substream: link substream */ struct hdac_ext_stream { struct hdac_stream hstream; void __iomem *pphc_addr; void __iomem *pplc_addr; void __iomem *spib_addr; void __iomem *fifo_addr; void __iomem *dpibr_addr; u32 dpib; u32 lpib; bool decoupled:1; bool link_locked:1; bool link_prepared; struct snd_pcm_substream *link_substream; }; #define hdac_stream(s) (&(s)->hstream) #define stream_to_hdac_ext_stream(s) \ container_of(s, struct hdac_ext_stream, hstream) void snd_hdac_ext_stream_init(struct hdac_ext_bus *bus, struct hdac_ext_stream *stream, int idx, int direction, int tag); int snd_hdac_ext_stream_init_all(struct hdac_ext_bus *ebus, int start_idx, int num_stream, int dir); void snd_hdac_stream_free_all(struct hdac_ext_bus *ebus); void snd_hdac_link_free_all(struct hdac_ext_bus *ebus); struct hdac_ext_stream *snd_hdac_ext_stream_assign(struct hdac_ext_bus *bus, struct snd_pcm_substream *substream, int type); void snd_hdac_ext_stream_release(struct hdac_ext_stream *azx_dev, int type); void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *bus, struct hdac_ext_stream *azx_dev, bool decouple); void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus); int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus, struct hdac_ext_stream *stream, u32 value); int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_ext_bus *ebus, struct hdac_ext_stream *stream); void snd_hdac_ext_stream_drsm_enable(struct hdac_ext_bus *ebus, bool enable, int index); int snd_hdac_ext_stream_set_dpibr(struct hdac_ext_bus *ebus, struct hdac_ext_stream *stream, u32 value); int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value); void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream); void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream); void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream); int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *stream, int fmt); struct hdac_ext_link { struct hdac_bus *bus; int index; void __iomem *ml_addr; /* link output stream reg pointer */ u32 lcaps; /* link capablities */ u16 lsdiid; /* link sdi identifier */ int ref_count; struct list_head list; }; int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link); int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link); int snd_hdac_ext_bus_link_power_up_all(struct hdac_ext_bus *ebus); int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus); void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, int stream); void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link, int stream); int snd_hdac_ext_bus_link_get(struct hdac_ext_bus *ebus, struct hdac_ext_link *link); int snd_hdac_ext_bus_link_put(struct hdac_ext_bus *ebus, struct hdac_ext_link *link); /* update register macro */ #define snd_hdac_updatel(addr, reg, mask, val) \ writel(((readl(addr + reg) & ~(mask)) | (val)), \ addr + reg) #define snd_hdac_updatew(addr, reg, mask, val) \ writew(((readw(addr + reg) & ~(mask)) | (val)), \ addr + reg) struct hdac_ext_device; /* ops common to all codec drivers */ struct hdac_ext_codec_ops { int (*build_controls)(struct hdac_ext_device *dev); int (*init)(struct hdac_ext_device *dev); void (*free)(struct hdac_ext_device *dev); }; struct hda_dai_map { char *dai_name; hda_nid_t nid; u32 maxbps; }; #define HDA_MAX_NIDS 16 /** * struct hdac_ext_device - HDAC Ext device * * @hdac: hdac core device * @nid_list - the dai map which matches the dai-name with the nid * @map_cur_idx - the idx in use in dai_map * @ops - the hda codec ops common to all codec drivers * @pvt_data - private data, for asoc contains asoc codec object */ struct hdac_ext_device { struct hdac_device hdac; struct hdac_ext_bus *ebus; /* soc-dai to nid map */ struct hda_dai_map nid_list[HDA_MAX_NIDS]; unsigned int map_cur_idx; /* codec ops */ struct hdac_ext_codec_ops ops; struct snd_card *card; void *scodec; void *private_data; }; struct hdac_ext_dma_params { u32 format; u8 stream_tag; }; #define to_ehdac_device(dev) (container_of((dev), \ struct hdac_ext_device, hdac)) /* * HD-audio codec base driver */ struct hdac_ext_driver { struct hdac_driver hdac; int (*probe)(struct hdac_ext_device *dev); int (*remove)(struct hdac_ext_device *dev); void (*shutdown)(struct hdac_ext_device *dev); }; int snd_hda_ext_driver_register(struct hdac_ext_driver *drv); void snd_hda_ext_driver_unregister(struct hdac_ext_driver *drv); #define to_ehdac_driver(_drv) container_of(_drv, struct hdac_ext_driver, hdac) #endif /* __SOUND_HDAUDIO_EXT_H */ lock/bcm-nsp.h?id=2d47b8aac7ba697ffe05f839a3b4c3c628b4e430'>plain -rw-r--r--bcm21664.h1984logplain -rw-r--r--bcm281xx.h2456logplain -rw-r--r--bcm2835-aux.h635logplain -rw-r--r--bcm2835.h1962logplain -rw-r--r--berlin2.h1034logplain -rw-r--r--berlin2q.h695logplain -rw-r--r--clps711x-clock.h718logplain -rw-r--r--efm32-cmu.h1112logplain -rw-r--r--exynos-audss-clk.h597logplain -rw-r--r--exynos3250.h9083logplain -rw-r--r--exynos4.h8284logplain -rw-r--r--exynos4415.h9828logplain -rw-r--r--exynos5250.h4616logplain -rw-r--r--exynos5260-clk.h14876logplain -rw-r--r--exynos5410.h1689logplain -rw-r--r--exynos5420.h6857logplain -rw-r--r--exynos5433.h45372logplain -rw-r--r--exynos5440.h1141logplain -rw-r--r--exynos7-clk.h5281logplain -rw-r--r--gxbb-aoclkc.h2866logplain -rw-r--r--gxbb-clkc.h592logplain -rw-r--r--hi3516cv300-clock.h1668logplain -rw-r--r--hi3519-clock.h1328logplain -rw-r--r--hi3620-clock.h4496logplain -rw-r--r--hi6220-clock.h4508logplain -rw-r--r--hip04-clock.h1137logplain -rw-r--r--histb-clock.h2012logplain -rw-r--r--hix5hd2-clock.h2415logplain -rw-r--r--imx1-clock.h1055logplain -rw-r--r--imx21-clock.h2461logplain -rw-r--r--imx27-clock.h3494logplain -rw-r--r--imx5-clock.h7212logplain -rw-r--r--imx6qdl-clock.h9593logplain -rw-r--r--imx6sl-clock.h5849logplain -rw-r--r--imx6sx-clock.h9099logplain -rw-r--r--imx6ul-clock.h8203logplain -rw-r--r--imx7d-clock.h15974logplain -rw-r--r--jz4740-cgu.h1028logplain -rw-r--r--jz4780-cgu.h2470logplain -rw-r--r--lpc18xx-ccu.h2134logplain -rw-r--r--lpc18xx-cgu.h1142logplain -rw-r--r--lpc32xx-clock.h1633logplain -rw-r--r--lsi,axm5516-clks.h974logplain -rw-r--r--marvell,mmp2.h2022logplain -rw-r--r--marvell,pxa168.h1654logplain -rw-r--r--marvell,pxa1928.h1535logplain -rw-r--r--marvell,pxa910.h1598logplain -rw-r--r--maxim,max77620.h632logplain -rw-r--r--maxim,max77686.h648logplain -rw-r--r--maxim,max77802.h630logplain -rw-r--r--meson8b-clkc.h523logplain -rw-r--r--microchip,pic32-clock.h1150logplain -rw-r--r--mpc512x-clock.h2236logplain -rw-r--r--mt2701-clk.h13832logplain -rw-r--r--mt8135-clk.h5641logplain -rw-r--r--mt8173-clk.h9293logplain -rw-r--r--oxsemi,ox810se.h1002logplain -rw-r--r--oxsemi,ox820.h1203logplain -rw-r--r--pistachio-clk.h4863logplain -rw-r--r--pxa-clock.h1715logplain -rw-r--r--qcom,gcc-apq8084.h12872logplain -rw-r--r--qcom,gcc-ipq4019.h5423logplain -rw-r--r--qcom,gcc-ipq806x.h8574logplain -rw-r--r--qcom,gcc-mdm9615.h9497logplain -rw-r--r--qcom,gcc-msm8660.h7932logplain -rw-r--r--qcom,gcc-msm8916.h6190logplain -rw-r--r--qcom,gcc-msm8960.h9342logplain -rw-r--r--qcom,gcc-msm8974.h12340logplain -rw-r--r--qcom,gcc-msm8994.h4858logplain -rw-r--r--qcom,gcc-msm8996.h12575logplain -rw-r--r--qcom,lcc-ipq806x.h899logplain -rw-r--r--qcom,lcc-mdm9615.h1701logplain -rw-r--r--qcom,lcc-msm8960.h1616logplain -rw-r--r--qcom,mmcc-apq8084.h5722logplain -rw-r--r--qcom,mmcc-msm8960.h4109logplain -rw-r--r--qcom,mmcc-msm8974.h5223logplain -rw-r--r--qcom,mmcc-msm8996.h9403logplain -rw-r--r--qcom,rpmcc.h2101logplain -rw-r--r--r7s72100-clock.h1218logplain -rw-r--r--r8a73a4-clock.h1596logplain -rw-r--r--r8a7740-clock.h1992logplain -rw-r--r--r8a7743-cpg-mssr.h1269logplain -rw-r--r--r8a7745-cpg-mssr.h1298logplain -rw-r--r--r8a7778-clock.h1855logplain -rw-r--r--r8a7779-clock.h1647logplain -rw-r--r--r8a7790-clock.h4367logplain -rw-r--r--r8a7791-clock.h4388logplain -rw-r--r--r8a7792-clock.h2562logplain -rw-r--r--r8a7793-clock.h4561logplain -rw-r--r--r8a7794-clock.h3679logplain -rw-r--r--r8a7795-cpg-mssr.h1890logplain -rw-r--r--r8a7796-cpg-mssr.h2066logplain -rw-r--r--renesas-cpg-mssr.h542logplain -rw-r--r--rk1108-cru.h6605logplain -rw-r--r--rk3036-cru.h4584logplain -rw-r--r--rk3066a-cru.h1068logplain -rw-r--r--rk3188-cru-common.h6105logplain -rw-r--r--rk3188-cru.h1435logplain