: Qualcomm's lpass-hdmi ASoC driver to support audio over dp port
Subsystems (5)
cover : Qualcomm's lpass-hdmi ASoC driver to support audio over dp port
These patches are to support audio over DP port on Qualcomm's SC7180 LPASS Asoc. It includes machine driver, cpu driver, platform driver updates for HDMI path support, device tree documention, lpass variant structure optimization and configuration changes. These patches depends on the DP patch series
https://patchwork.kernel.org/project/dri-devel/list/?series=332029
vsujithk (5):
dt-bindings: Add sc7180-lpass HDMI header define
dt-bindings: Add dts entry for lpass-hdmi dp audio
ASoC: qcom: add support for lpass hdmi driver
ASoC: qcom: Add support for audio over DP Optimise lpass variant structure
.../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 42 ++ include/dt-bindings/sound/sc7180-lpass.h | 1 + sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-apq8016.c | 25 +- sound/soc/qcom/lpass-cpu.c | 92 ++- sound/soc/qcom/lpass-hdmi.c | 685 +++++++++++++++++++++ sound/soc/qcom/lpass-hdmi.h | 129 ++++ sound/soc/qcom/lpass-ipq806x.c | 25 +- sound/soc/qcom/lpass-lpaif-reg.h | 51 +- sound/soc/qcom/lpass-platform.c | 287 +++++++-- sound/soc/qcom/lpass-sc7180.c | 147 ++++- sound/soc/qcom/lpass.h | 123 +++- 13 files changed, 1467 insertions(+), 147 deletions(-) create mode 100644 sound/soc/qcom/lpass-hdmi.c create mode 100644 sound/soc/qcom/lpass-hdmi.h
Signature · 1 line
2.7.4
PATCH 1/5 dt-bindings: Add sc7180-lpass HDMI header define
From: vsujithk <[email protected]>
Add header defining HDMI dai-id for SC7180 lpass soc.
--- include/dt-bindings/sound/sc7180-lpass.h | 1 + 1 file changed, 1 insertion(+)
include/dt-bindings/sound/sc7180-lpass.h +1 -0
@@ -4,6 +4,7 @@#define MI2S_PRIMARY 0#define MI2S_SECONDARY 1 +#define HDMI 2#define LPASS_MCLK0 0
Signature · 1 line
2.7.4
PATCH 2/5 dt-bindings: Add dts entry for lpass-hdmi dp audio
In reply to Srinivasa RaoFrom: vsujithk <[email protected]>
Includes dts file entries for supporting lpass-hdmi audio driver over dp port in yaml format
--- .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)
Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml +42 -0
@@ -22,6 +22,7 @@ properties: - qcom,lpass-cpu - qcom,apq8016-lpass-cpu - qcom,sc7180-lpass-cpu + - qcom,sc7180-lpass-hdmi reg: maxItems: 1
@@ -145,6 +146,23 @@ allOf: - iommus - power-domains + - if: + properties: + compatible: + contains: + const: qcom,sc7180-lpass-hdmi + + then: + properties: + clock-names: + items: + - const: pcnoc-sway-clk + - const: audio-core + - const: pcnoc-mport-clk + required: + - iommus + - power-domains + examples: - | #include <dt-bindings/sound/sc7180-lpass.h>
@@ -184,6 +202,30 @@ examples: qcom,capture-sd-lines = <0>; }; }; + + lpassh@62d87000 { + compatible = "qcom,sc7180-lpass-hdmi"; + + reg = <0 0x62d87000 0 0x68000>; + + iommus = <&apps_smmu 0x1032 0>; + + power-domains = <&lpass_hm 0>; + + clocks = <&gcc 131>, + <&lpasscc 6>, + <&lpasscc 10>; + + clock-names = "pcnoc-sway-clk", "audio-core", + "pcnoc-mport-clk"; + + #sound-dai-cells = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + interrupts = <0 268 1>; + }; }; ...
Signature · 1 line
2.7.4
PATCH 5/5 Optimise lpass variant structure
In reply to Srinivasa RaoFrom: vsujithk <[email protected]>
lpass variant structure has I2S and HDMI register fields, which are used exclusively. To optimize memory, replace with union to select either I2S or HDMI register fields.
--- sound/soc/qcom/lpass-apq8016.c | 24 ++++----- sound/soc/qcom/lpass-cpu.c | 28 +++++----- sound/soc/qcom/lpass-hdmi.c | 57 ++++++++++---------- sound/soc/qcom/lpass-hdmi.h | 24 ++++----- sound/soc/qcom/lpass-ipq806x.c | 24 ++++----- sound/soc/qcom/lpass-lpaif-reg.h | 3 +- sound/soc/qcom/lpass-sc7180.c | 114 +++++++++++++++++++-------------------- sound/soc/qcom/lpass.h | 109 ++++++++++++++++++++----------------- 8 files changed, 200 insertions(+), 183 deletions(-)
sound/soc/qcom/lpass-apq8016.c +12 -12
@@ -226,9 +226,9 @@ static int apq8016_lpass_exit(struct platform_device *pdev)static struct lpass_variant apq8016_data = { - .i2sctrl_reg_base =0x1000 , - .i2sctrl_reg_stride =0x1000 , - .i2s_ports =4 , + .intf.i2s_intf.i2sctrl_reg_base =0x1000 , + .intf.i2s_intf.i2sctrl_reg_stride =0x1000 , + .intf.i2s_intf.i2s_ports =4 , .irq_reg_base =0x6000 , .irq_reg_stride =0x1000 , .irq_ports =3 ,
@@ -240,15 +240,15 @@ static struct lpass_variant apq8016_data = { .wrdma_reg_stride = 0x1000, .wrdma_channel_start = 5, .wrdma_channels = 2, - .loopback = REG_FIELD_ID(0x1000, 15, 15, 4, 0x1000), - .spken = REG_FIELD_ID(0x1000, 14, 14, 4, 0x1000), - .spkmode = REG_FIELD_ID(0x1000, 10, 13, 4, 0x1000), - .spkmono = REG_FIELD_ID(0x1000, 9, 9, 4, 0x1000), - .micen = REG_FIELD_ID(0x1000, 8, 8, 4, 0x1000), - .micmode = REG_FIELD_ID(0x1000, 4, 7, 4, 0x1000), - .micmono = REG_FIELD_ID(0x1000, 3, 3, 4, 0x1000), - .wssrc = REG_FIELD_ID(0x1000, 2, 2, 4, 0x1000), - .bitwidth = REG_FIELD_ID(0x1000, 0, 0, 4, 0x1000), + .intf.i2s_intf.loopback = REG_FIELD_ID(0x1000, 15, 15, 4, 0x1000), + .intf.i2s_intf.spken = REG_FIELD_ID(0x1000, 14, 14, 4, 0x1000), + .intf.i2s_intf.spkmode = REG_FIELD_ID(0x1000, 10, 13, 4, 0x1000), + .intf.i2s_intf.spkmono = REG_FIELD_ID(0x1000, 9, 9, 4, 0x1000), + .intf.i2s_intf.micen = REG_FIELD_ID(0x1000, 8, 8, 4, 0x1000), + .intf.i2s_intf.micmode = REG_FIELD_ID(0x1000, 4, 7, 4, 0x1000), + .intf.i2s_intf.micmono = REG_FIELD_ID(0x1000, 3, 3, 4, 0x1000), + .intf.i2s_intf.wssrc = REG_FIELD_ID(0x1000, 2, 2, 4, 0x1000), + .intf.i2s_intf.bitwidth = REG_FIELD_ID(0x1000, 0, 0, 4, 0x1000), .rdma_dyncclk = REG_FIELD_ID(0x8400, 12, 12, 2, 0x1000), .rdma_bursten = REG_FIELD_ID(0x8400, 11, 11, 2, 0x1000),
sound/soc/qcom/lpass-cpu.c +15 -13
@@ -34,16 +34,17 @@ static int lpass_cpu_init_i2sctl_bitfields(struct device *dev, {struct lpass_data *drvdata =dev_get_drvdata (dev);struct lpass_variant *v = drvdata->variant; - - i2sctl->loopback =devm_regmap_field_alloc (dev, map, v->loopback); - i2sctl->spken =devm_regmap_field_alloc (dev, map, v->spken); - i2sctl->spkmode =devm_regmap_field_alloc (dev, map, v->spkmode); - i2sctl->spkmono =devm_regmap_field_alloc (dev, map, v->spkmono); - i2sctl->micen =devm_regmap_field_alloc (dev, map, v->micen); - i2sctl->micmode =devm_regmap_field_alloc (dev, map, v->micmode); - i2sctl->micmono =devm_regmap_field_alloc (dev, map, v->micmono); - i2sctl->wssrc =devm_regmap_field_alloc (dev, map, v->wssrc); - i2sctl->bitwidth =devm_regmap_field_alloc (dev, map, v->bitwidth); +struct lpass_i2s_rsrc *irsrc = &v->intf.i2s_intf; + + i2sctl->loopback =devm_regmap_field_alloc (dev, map, irsrc->loopback); + i2sctl->spken =devm_regmap_field_alloc (dev, map, irsrc->spken); + i2sctl->spkmode =devm_regmap_field_alloc (dev, map, irsrc->spkmode); + i2sctl->spkmono =devm_regmap_field_alloc (dev, map, irsrc->spkmono); + i2sctl->micen =devm_regmap_field_alloc (dev, map, irsrc->micen); + i2sctl->micmode =devm_regmap_field_alloc (dev, map, irsrc->micmode); + i2sctl->micmono =devm_regmap_field_alloc (dev, map, irsrc->micmono); + i2sctl->wssrc =devm_regmap_field_alloc (dev, map, irsrc->wssrc); + i2sctl->bitwidth =devm_regmap_field_alloc (dev, map, irsrc->bitwidth); if (IS_ERR(i2sctl->loopback) || IS_ERR(i2sctl->spken) || IS_ERR(i2sctl->spkmode) || IS_ERR(i2sctl->spkmono) ||
@@ -363,9 +364,10 @@ static bool lpass_cpu_regmap_writeable(struct device *dev, unsigned int reg) {struct lpass_data *drvdata =dev_get_drvdata (dev);struct lpass_variant *v = drvdata->variant; +struct lpass_i2s_rsrc *irsrc = &v->intf.i2s_intf;int i; -for (i =0 ; i < v->i2s_ports; ++i) +for (i =0 ; i < irsrc->i2s_ports; ++i)if (reg ==LPAIF_I2SCTL_REG (v, i))return true;
@@ -405,9 +407,10 @@ static bool lpass_cpu_regmap_readable(struct device *dev, unsigned int reg) {struct lpass_data *drvdata =dev_get_drvdata (dev);struct lpass_variant *v = drvdata->variant; +struct lpass_i2s_rsrc *irsrc = &v->intf.i2s_intf;int i; -for (i =0 ; i < v->i2s_ports; ++i) +for (i =0 ; i < irsrc->i2s_ports; ++i)if (reg ==LPAIF_I2SCTL_REG (v, i))return true;
@@ -584,7 +587,6 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) PTR_ERR((void const __force *)drvdata->lpaif));return PTR_ERR ((void const __force *)drvdata->lpaif); } -if (variant->id ==I2S_INTERFACE ) { lpass_cpu_regmap_config.max_register = LPAIF_WRDMAPER_REG(variant, variant->wrdma_channels +
sound/soc/qcom/lpass-hdmi.c +29 -28
136 lines not on this page · raw message
sound/soc/qcom/lpass-hdmi.h +12 -12
@@ -49,27 +49,27 @@#define LPASS_HDMI_TX_CTL_ADDR (v) \ - (v->hdmi_tx_ctl_addr) + (v->intf.hdmi_intf.hdmi_tx_ctl_addr)#define LPASS_HDMI_TX_LEGACY_ADDR (v) \ - (v->hdmi_legacy_addr) + (v->intf.hdmi_intf.hdmi_legacy_addr)#define LPASS_HDMI_TX_VBIT_CTL_ADDR (v) \ - (v->hdmi_vbit_addr) + (v->intf.hdmi_intf.hdmi_vbit_addr)#define LPASS_HDMI_TX_CH_LSB_ADDR (v, port) \ - (v->hdmi_ch_lsb_addr + \ - v->ch_stride * (port)) + (v->intf.hdmi_intf.hdmi_ch_lsb_addr + \ + v->intf.hdmi_intf.ch_stride * (port))#define LPASS_HDMI_TX_CH_MSB_ADDR (v, port) \ - (v->hdmi_ch_msb_addr + \ - v->ch_stride * (port)) + (v->intf.hdmi_intf.hdmi_ch_msb_addr + \ + v->intf.hdmi_intf.ch_stride * (port))#define LPASS_HDMI_TX_DMA_ADDR (v, port) \ - (v->hdmi_dmactl_addr + \ - v->hdmi_dma_stride * (port)) + (v->intf.hdmi_intf.hdmi_dmactl_addr + \ + v->intf.hdmi_intf.hdmi_dma_stride * (port))#define LPASS_HDMI_TX_PARITY_ADDR (v) \ - (v->hdmi_parity_addr) + (v->intf.hdmi_intf.hdmi_parity_addr)#define LPASS_HDMI_TX_DP_ADDR (v) \ - (v->hdmi_DP_addr) + (v->intf.hdmi_intf.hdmi_DP_addr)#define LPASS_HDMI_TX_SSTREAM_ADDR (v) \ - (v->hdmi_sstream_addr) + (v->intf.hdmi_intf.hdmi_sstream_addr)struct lpass_sstream_ctl {struct regmap_field *sstream_en;
sound/soc/qcom/lpass-ipq806x.c +12 -12
@@ -110,9 +110,9 @@ static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan) }static struct lpass_variant ipq806x_data = { - .i2sctrl_reg_base =0x0010 , - .i2sctrl_reg_stride =0x04 , - .i2s_ports =5 , + .intf.i2s_intf.i2sctrl_reg_base =0x0010 , + .intf.i2s_intf.i2sctrl_reg_stride =0x04 , + .intf.i2s_intf.i2s_ports =5 , .irq_reg_base =0x3000 , .irq_reg_stride =0x1000 , .irq_ports =3 ,
@@ -123,15 +123,15 @@ static struct lpass_variant ipq806x_data = { .wrdma_reg_stride = 0x1000, .wrdma_channel_start = 5, .wrdma_channels = 4, - .loopback = REG_FIELD_ID(0x0010, 15, 15, 5, 0x4), - .spken = REG_FIELD_ID(0x0010, 14, 14, 5, 0x4), - .spkmode = REG_FIELD_ID(0x0010, 10, 13, 5, 0x4), - .spkmono = REG_FIELD_ID(0x0010, 9, 9, 5, 0x4), - .micen = REG_FIELD_ID(0x0010, 8, 8, 5, 0x4), - .micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4), - .micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4), - .wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4), - .bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4), + .intf.i2s_intf.loopback = REG_FIELD_ID(0x0010, 15, 15, 5, 0x4), + .intf.i2s_intf.spken = REG_FIELD_ID(0x0010, 14, 14, 5, 0x4), + .intf.i2s_intf.spkmode = REG_FIELD_ID(0x0010, 10, 13, 5, 0x4), + .intf.i2s_intf.spkmono = REG_FIELD_ID(0x0010, 9, 9, 5, 0x4), + .intf.i2s_intf.micen = REG_FIELD_ID(0x0010, 8, 8, 5, 0x4), + .intf.i2s_intf.micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4), + .intf.i2s_intf.micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4), + .intf.i2s_intf.wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4), + .intf.i2s_intf.bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4), .rdma_dyncclk = REG_FIELD_ID(0x6000, 12, 12, 4, 0x1000), .rdma_bursten = REG_FIELD_ID(0x6000, 11, 11, 4, 0x1000),
sound/soc/qcom/lpass-lpaif-reg.h +2 -1
@@ -9,7 +9,8 @@/* LPAIF I2S */ #define LPAIF_I2SCTL_REG_ADDR (v, addr, port) \ - (v->i2sctrl_reg_base + (addr) + v->i2sctrl_reg_stride * (port)) + (v->intf.i2s_intf.i2sctrl_reg_base + (addr) + \ + v->intf.i2s_intf.i2sctrl_reg_stride * (port))#define LPAIF_I2SCTL_REG (v, port) LPAIF_I2SCTL_REG_ADDR(v, 0x0, (port))
sound/soc/qcom/lpass-sc7180.c +57 -57
142 lines not on this page · raw message
sound/soc/qcom/lpass.h +61 -48
133 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/5 ASoC: qcom: add support for lpass hdmi driver
In reply to Srinivasa RaoFrom: vsujithk <[email protected]>
Add lpass-hdmi.c to support audio over DP.
Also update lpass cpu and platform driver to support audio over DP.
--- sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-apq8016.c | 1 + sound/soc/qcom/lpass-cpu.c | 64 ++-- sound/soc/qcom/lpass-hdmi.c | 684 +++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/lpass-hdmi.h | 129 ++++++++ sound/soc/qcom/lpass-ipq806x.c | 1 + sound/soc/qcom/lpass-lpaif-reg.h | 48 ++- sound/soc/qcom/lpass-platform.c | 287 ++++++++++++---- sound/soc/qcom/lpass.h | 88 ++++- 10 files changed, 1225 insertions(+), 84 deletions(-) create mode 100644 sound/soc/qcom/lpass-hdmi.c create mode 100644 sound/soc/qcom/lpass-hdmi.h
sound/soc/qcom/Kconfig +5 -0
@@ -12,6 +12,10 @@ config SND_SOC_LPASS_CPU tristate select REGMAP_MMIO +config SND_SOC_LPASS_HDMI + tristate + select REGMAP_MMIO + config SND_SOC_LPASS_PLATFORM tristate select REGMAP_MMIO
@@ -30,6 +34,7 @@ config SND_SOC_LPASS_SC7180 tristate select SND_SOC_LPASS_CPU select SND_SOC_LPASS_PLATFORM + select SND_SOC_LPASS_HDMI config SND_SOC_STORM tristate "ASoC I2S support for Storm boards"
sound/soc/qcom/Makefile +2 -0
@@ -1,12 +1,14 @@ # SPDX-License-Identifier: GPL-2.0 # Platform snd-soc-lpass-cpu-objs := lpass-cpu.o +snd-soc-lpass-hdmi-objs := lpass-hdmi.o snd-soc-lpass-platform-objs := lpass-platform.o snd-soc-lpass-ipq806x-objs := lpass-ipq806x.o snd-soc-lpass-apq8016-objs := lpass-apq8016.o snd-soc-lpass-sc7180-objs := lpass-sc7180.o obj-$(CONFIG_SND_SOC_LPASS_CPU) += snd-soc-lpass-cpu.o +obj-$(CONFIG_SND_SOC_LPASS_HDMI) += snd-soc-lpass-hdmi.o obj-$(CONFIG_SND_SOC_LPASS_PLATFORM) += snd-soc-lpass-platform.o obj-$(CONFIG_SND_SOC_LPASS_IPQ806X) += snd-soc-lpass-ipq806x.o obj-$(CONFIG_SND_SOC_LPASS_APQ8016) += snd-soc-lpass-apq8016.o
sound/soc/qcom/lpass-apq8016.c +1 -0
@@ -287,6 +287,7 @@ static struct lpass_variant apq8016_data = { .exit = apq8016_lpass_exit, .alloc_dma_channel = apq8016_lpass_alloc_dma_channel, .free_dma_channel = apq8016_lpass_free_dma_channel, + .id = I2S_INTERFACE, };static const struct of_device_id apq8016_lpass_cpu_device_id[] = {
sound/soc/qcom/lpass-cpu.c +46 -18
95 lines not on this page · raw message
sound/soc/qcom/lpass-hdmi.c new file +684 -0
684 lines not on this page · raw message
sound/soc/qcom/lpass-hdmi.h new file +129 -0
129 lines not on this page · raw message
sound/soc/qcom/lpass-ipq806x.c +1 -0
@@ -159,6 +159,7 @@ static struct lpass_variant ipq806x_data = { .exit = ipq806x_lpass_exit, .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel, .free_dma_channel = ipq806x_lpass_free_dma_channel, + .id = I2S_INTERFACE, };static const struct of_device_id ipq806x_lpass_cpu_device_id[] = {
sound/soc/qcom/lpass-lpaif-reg.h +45 -3
69 lines not on this page · raw message
sound/soc/qcom/lpass-platform.c +225 -62
431 lines not on this page · raw message
sound/soc/qcom/lpass.h +87 -1
134 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 4/5 ASoC: qcom: Add support for audio over DP
In reply to Srinivasa RaoFrom: vsujithk <[email protected]>
Add changes to support audio over DP playback for SC7180.
--- sound/soc/qcom/lpass-sc7180.c | 121 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-)
sound/soc/qcom/lpass-sc7180.c +120 -1
@@ -62,6 +62,24 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { }, }; +static struct snd_soc_dai_driver sc7180_lpass_cpu_hdmi_dai_driver[] = { + [0 ] = { + .id =HDMI , + .name ="Hdmi" , + .playback = { + .stream_name ="Hdmi Playback" , + .formats =SNDRV_PCM_FMTBIT_S24_3LE | +SNDRV_PCM_FMTBIT_S24_LE , + .rates =SNDRV_PCM_RATE_48000 , + .rate_min =48000 , + .rate_max =48000 , + .channels_min =2 , + .channels_max =2 , + }, + .ops = &asoc_qcom_lpass_hdmi_dai_ops, + }, +}; +static int sc7180_lpass_alloc_dma_channel (struct lpass_data *drvdata,int direction) {
@@ -88,13 +106,37 @@ static int sc7180_lpass_alloc_dma_channel(struct lpass_data *drvdata,return chan; } +static int sc7180_lpass_alloc_hdmi_dma_channel (struct lpass_data *drvdata, +int direction) +{ +struct lpass_variant *v = drvdata->variant; +int chan =0 ; + +if (direction ==SNDRV_PCM_STREAM_PLAYBACK ) { + chan =find_first_zero_bit (&drvdata->dma_ch_bit_map, + v->rdma_channels); + +if (chan >= v->rdma_channels) +return -EBUSY ; + } +set_bit (chan, &drvdata->dma_ch_bit_map); + +return chan; +}static int sc7180_lpass_free_dma_channel (struct lpass_data *drvdata,int chan) {clear_bit (chan, &drvdata->dma_ch_bit_map);return 0 ; } +static int sc7180_lpass_free_hdmi_dma_channel (struct lpass_data *drvdata,int chan) +{ +clear_bit (chan, &drvdata->dma_ch_bit_map); + +return 0 ; +} +static int sc7180_lpass_init (struct platform_device *pdev) {
@@ -190,15 +232,92 @@ static struct lpass_variant sc7180_data = {"mi2s-bit-clk0" ,"mi2s-bit-clk1" , }, + .id = I2S_INTERFACE, .init = sc7180_lpass_init, .exit = sc7180_lpass_exit, .alloc_dma_channel = sc7180_lpass_alloc_dma_channel, .free_dma_channel = sc7180_lpass_free_dma_channel, }; +static struct lpass_variant sc7180_hdmi_data = { + .hdmi_tx_ctl_addr =0x1000 , + .hdmi_legacy_addr =0x1008 , + .hdmi_vbit_addr =0x610c0 , + .hdmi_ch_lsb_addr =0x61048 , + .hdmi_ch_msb_addr =0x6104c , + .ch_stride =0x8 , + .hdmi_parity_addr =0x61034 , + .hdmi_dmactl_addr =0x61038 , + .hdmi_dma_stride =0x4 , + .hdmi_DP_addr =0x610c8 , + .hdmi_sstream_addr =0x6101c , + .irq_reg_base =0x63000 , + .irq_ports =1 , + .rdma_reg_base =0x64000 , + .rdma_reg_stride =0x1000 , + .rdma_channels =4 , + + .rdma_dyncclk =REG_FIELD_ID (0x64000 ,14 ,14 ,4 ,0x1000 ), + .rdma_bursten =REG_FIELD_ID (0x64000 ,13 ,13 ,4 ,0x1000 ), + .rdma_burst8 =REG_FIELD_ID (0x64000 ,15 ,15 ,4 ,0x1000 ), + .rdma_burst16 =REG_FIELD_ID (0x64000 ,16 ,16 ,4 ,0x1000 ), + .rdma_dynburst =REG_FIELD_ID (0x64000 ,18 ,18 ,4 ,0x1000 ), + .rdma_wpscnt =REG_FIELD_ID (0x64000 ,10 ,12 ,4 ,0x1000 ), + .rdma_fifowm =REG_FIELD_ID (0x64000 ,1 ,5 ,4 ,0x1000 ), + .rdma_enable =REG_FIELD_ID (0x64000 ,0 ,0 ,4 ,0x1000 ), + + .sstream_en =REG_FIELD (0x6101c ,0 ,0 ), + .dma_sel =REG_FIELD (0x6101c ,1 ,2 ), + .auto_bbit_en =REG_FIELD (0x6101c ,3 ,3 ), + .layout =REG_FIELD (0x6101c ,4 ,4 ), + .layout_sp =REG_FIELD (0x6101c ,5 ,8 ), + .set_sp_on_en =REG_FIELD (0x6101c ,10 ,10 ), + .dp_audio =REG_FIELD (0x6101c ,11 ,11 ), + .dp_staffing_en =REG_FIELD (0x6101c ,12 ,12 ), + .dp_sp_b_hw_en =REG_FIELD (0x6101c ,13 ,13 ), + + .mute =REG_FIELD (0x610c8 ,0 ,0 ), + .as_sdp_cc =REG_FIELD (0x610c8 ,1 ,3 ), + .as_sdp_ct =REG_FIELD (0x610c8 ,4 ,7 ), + .aif_db4 =REG_FIELD (0x610c8 ,8 ,15 ), + .frequency =REG_FIELD (0x610c8 ,16 ,21 ), + .mst_index =REG_FIELD (0x610c8 ,28 ,29 ), + .dptx_index =REG_FIELD (0x610c8 ,30 ,31 ), + + .soft_reset =REG_FIELD (0x1000 ,31 ,31 ), + .force_reset =REG_FIELD (0x1000 ,30 ,30 ), + + .use_hw_chs =REG_FIELD (0x61038 ,0 ,0 ), + .use_hw_usr =REG_FIELD (0x61038 ,1 ,1 ), + .hw_chs_sel =REG_FIELD (0x61038 ,2 ,4 ), + .hw_usr_sel =REG_FIELD (0x61038 ,5 ,6 ), + + .replace_vbit =REG_FIELD (0x610c0 ,0 ,0 ), + .vbit_stream =REG_FIELD (0x610c0 ,1 ,1 ), + + .legacy_en =REG_FIELD (0x1008 ,0 ,0 ), + .calc_en =REG_FIELD (0x61034 ,0 ,0 ), + .lsb_bits =REG_FIELD (0x61048 ,0 ,31 ), + .msb_bits =REG_FIELD (0x6104c ,0 ,31 ), + + .clk_name = (const char *[]) { +"pcnoc-sway-clk" , +"audio-core" , +"pcnoc-mport-clk" , + }, + .num_clks =3 , + .id =HDMI_INTERFACE , + .dai_driver = sc7180_lpass_cpu_hdmi_dai_driver, + .num_dai =ARRAY_SIZE (sc7180_lpass_cpu_hdmi_dai_driver), + .init = sc7180_lpass_init, + .exit = sc7180_lpass_exit, + .alloc_dma_channel = sc7180_lpass_alloc_hdmi_dma_channel, + .free_dma_channel = sc7180_lpass_free_hdmi_dma_channel, + +};static const struct of_device_id sc7180_lpass_cpu_device_id[] = { {.compatible ="qcom,sc7180-lpass-cpu" , .data = &sc7180_data}, - {} + {.compatible ="qcom,sc7180-lpass-hdmi" , .data = &sc7180_hdmi_data} }; static struct platform_driver sc7180_lpass_cpu_platform_driver = {
Signature · 1 line
2.7.4
Mark Brown
maintainerRe: [PATCH 1/5] dt-bindings: Add sc7180-lpass HDMI header define
In reply to Srinivasa RaoQuoted 6 lines · Srinivasa Rao
From: vsujithk <[email protected]>
Add header defining HDMI dai-id for SC7180 lpass soc.
Signed-off-by Srinivasa Rao <[email protected]>---
You haven't provided a signoff for the author "vsujithk" (who presumably has a more complete name?) - these are important, see submitting-patches.rst for details on what the signoff means and why it's needed.
Mark Brown
maintainerRe: [PATCH 5/5] Optimise lpass variant structure
In reply to Srinivasa RaoQuoted 5 lines · Srinivasa Rao
From: vsujithk <[email protected]>
lpass variant structure has I2S and HDMI register fields, which are used exclusively. To optimize memory, replace with union to select either I2S or HDMI register fields.
Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.
kernel test robot
build botRe: [PATCH 3/5] ASoC: qcom: add support for lpass hdmi driver
In reply to Srinivasa RaoThank you for the patch! Yet something to improve:
Hi Srinivasa,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on next-20200825]
[cannot apply to v5.9-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Srinivasa-Rao/dt-bindings-Add-sc7180-lpass-HDMI-header-define/20200826-022843 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: s390-allyesconfig (attached as .config) compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> s390-linux-ld: sound/soc/qcom/lpass-platform.o:(.bss+0x0): multiple definition of `lpass_hdmi_regmap_config'; sound/soc/qcom/lpass-cpu.o:(.bss+0x40): first defined here
s390-linux-ld: sound/soc/qcom/lpass-ipq806x.o:(.bss+0x0): multiple definition of `lpass_hdmi_regmap_config'; sound/soc/qcom/lpass-cpu.o:(.bss+0x40): first defined here
s390-linux-ld: sound/soc/qcom/lpass-apq8016.o:(.bss+0x0): multiple definition of `lpass_hdmi_regmap_config'; sound/soc/qcom/lpass-cpu.o:(.bss+0x40): first defined here
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org