Qualcomm's lpass-hdmi ASoC driver to support audio over dp port
Subsystems (5)
v5 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
Changes Since v4:
-- Updated with single compatible node for both I2S and HDMI.
Changes Since v3:
-- Removed id in lpass variant structure and used snd_soc_dai_driver id.
Changes Since v2:
-- Audio buffer size(i.e. LPASS_PLATFORM_BUFFER_SIZE) in lpass-platform.c increased.
Changes Since v1:
-- Commit messages are updated
-- Addressed Rob Herring review comments
V Sujith Kumar Reddy (5):
ASoC: Add sc7180-lpass binding header hdmi define
ASoC: dt-bindings: Add dt binding for lpass hdmi Asoc:qcom:lpass-cpu:Update dts property read API
ASoC: qcom: Add support for lpass hdmi driver
ASoC: qcom: sc7180: Add support for audio over DP
.../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 74 ++- include/dt-bindings/sound/sc7180-lpass.h | 1 + sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-cpu.c | 39 +- sound/soc/qcom/lpass-hdmi.c | 596 +++++++++++++++++++++ sound/soc/qcom/lpass-hdmi.h | 129 +++++ sound/soc/qcom/lpass-lpaif-reg.h | 52 +- sound/soc/qcom/lpass-platform.c | 468 ++++++++++++---- sound/soc/qcom/lpass-sc7180.c | 116 +++- sound/soc/qcom/lpass.h | 119 +++- 11 files changed, 1447 insertions(+), 154 deletions(-) create mode 100644 sound/soc/qcom/lpass-hdmi.c create mode 100644 sound/soc/qcom/lpass-hdmi.h
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 1/5 ASoC: Add sc7180-lpass binding header hdmi define
From: V Sujith Kumar Reddy <[email protected]>
Add header defining hdmi dai-id for SC7180 lpass soc in dt bindings.
--- 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 LPASS_DP_RX 2#define LPASS_MCLK0 0
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 2/5 ASoC: dt-bindings: Add dt binding for lpass hdmi
In reply to Srinivasa Rao MandadapuFrom: V Sujith Kumar Reddy <[email protected]>
Adds bindings for lpass hdmi interface
which can support audio path over dp.
--- .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 74 +++++++++++++++------- 1 file changed, 52 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml +52 -22
@@ -24,9 +24,10 @@ properties: - qcom,sc7180-lpass-cpu reg: - maxItems: 1 + maxItems: 2 description: LPAIF core registers - + reg-names: + maxItems: 2 clocks: minItems: 3 maxItems: 6
@@ -36,15 +37,16 @@ properties: maxItems: 6 interrupts: - maxItems: 1 + maxItems: 2 description: LPAIF DMA buffer interrupt - + interrupt-names: + maxItems: 2 qcom,adsp: $ref: /schemas/types.yaml#/definitions/phandle description: Phandle for the audio DSP node iommus: - maxItems: 1 + maxItems: 2 description: Phandle to apps_smmu node with sid mask power-domains:
@@ -60,10 +62,12 @@ properties: const: 0 patternProperties: - "(^mi2s-[0-9a-f]$|mi2s)": + "^dai-link@[0-9a-f]$": type: object - description: Required properties for each DAI - + description: | + LPASS CPU dai node for each I2S device. Bindings of each node + depends on the specific driver providing the functionality and + properties. properties: reg: maxItems: 1
@@ -85,9 +89,11 @@ patternProperties: required: - compatible - reg + - reg-names - clocks - clock-names - interrupts + - interrupt-names - '#sound-dai-cells' additionalProperties: false
@@ -134,13 +140,32 @@ allOf: then: properties: clock-names: - items: - - const: pcnoc-sway-clk - - const: audio-core - - const: mclk0 - - const: pcnoc-mport-clk - - const: mi2s-bit-clk0 - - const: mi2s-bit-clk1 + oneOf: + - items: #for I2S + - const: pcnoc-sway-clk + - const: audio-core + - const: mclk0 + - const: pcnoc-mport-clk + - const: mi2s-bit-clk0 + - const: mi2s-bit-clk1 + - items: #for HDMI + - const: pcnoc-sway-clk + - const: audio-core + - const: pcnoc-mport-clk + reg-names: + anyOf: + - items: #for I2S and HDMI + - const: lpass-hdmiif + - const: lpass-lpaif + - items: #for I2S + - const: lpass-lpaif + interrupt-names: + anyOf: + - items: #for I2S and HDMI + - const: lpass-irq-lpaif + - const: lpass-irq-hdmi + - items: #for I2S + - const: lpass-irq-lpaif required: - iommus - power-domains
@@ -152,12 +177,15 @@ examples: soc { #address-cells = <2>; #size-cells = <2>; - lpass@62f00000 { + lpass@62d80000 { compatible = "qcom,sc7180-lpass-cpu"; - reg = <0 0x62f00000 0 0x29000>; - - iommus = <&apps_smmu 0x1020 0>; + reg = <0 0x62d87000 0 0x68000>, + <0 0x62f00000 0 0x29000>; + reg-names = "lpass-hdmiif", + "lpass-lpaif"; + iommus = <&apps_smmu 0x1020 0>, + <&apps_smmu 0x1032 0>; power-domains = <&lpass_hm 0>; clocks = <&gcc 131>,
@@ -171,14 +199,16 @@ examples: "mclk0", "pcnoc-mport-clk", "mi2s-bit-clk0", "mi2s-bit-clk1"; - interrupts = <0 160 1>; - + interrupts = <0 160 1>, + <0 268 1>; + interrupt-names = "lpass-irq-lpaif", + "lpass-irq-hdmi"; #sound-dai-cells = <1>; #address-cells = <1>; #size-cells = <0>; /* Optional to set different MI2S SD lines */ - mi2s-primary@0 { + dai-link@0 { reg = <MI2S_PRIMARY>; qcom,playback-sd-lines = <1>; qcom,capture-sd-lines = <0>;
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 3/5 Asoc:qcom:lpass-cpu:Update dts property read API
In reply to Srinivasa Rao MandadapuFrom: V Sujith Kumar Reddy <[email protected]>
--- sound/soc/qcom/lpass-cpu.c | 2 +- sound/soc/qcom/lpass-platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/qcom/lpass-cpu.c +1 -1
@@ -575,7 +575,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)of_lpass_cpu_parse_dai_data (dev, drvdata); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); + res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"lpass-lpaif" ); drvdata->lpaif =devm_ioremap_resource (dev, res);if (IS_ERR ((void const __force *)drvdata->lpaif)) {
sound/soc/qcom/lpass-platform.c +1 -1
@@ -638,7 +638,7 @@ int asoc_qcom_lpass_platform_register(struct platform_device *pdev)struct lpass_variant *v = drvdata->variant;int ret; - drvdata->lpaif_irq =platform_get_irq (pdev,0 ); + drvdata->lpaif_irq =platform_get_irq_byname (pdev,"lpass-irq-lpaif" );if (drvdata->lpaif_irq <0 )return -ENODEV ;
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 4/5 ASoC: qcom: Add support for lpass hdmi driver
In reply to Srinivasa Rao MandadapuFrom: V Sujith Kumar Reddy <[email protected]>
Upadate lpass cpu and platform driver to support audio over dp. Also add lpass-hdmi.c and lpass-hdmi.h.
--- sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-cpu.c | 37 ++- sound/soc/qcom/lpass-hdmi.c | 596 +++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/lpass-hdmi.h | 129 +++++++++ sound/soc/qcom/lpass-lpaif-reg.h | 52 +++- sound/soc/qcom/lpass-platform.c | 466 ++++++++++++++++++++++++------ sound/soc/qcom/lpass.h | 119 +++++++- 8 files changed, 1290 insertions(+), 116 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-cpu.c +34 -3
@@ -589,13 +589,33 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) variant->wrdma_channel_start); drvdata->lpaif_map =devm_regmap_init_mmio (dev, drvdata->lpaif, - &lpass_cpu_regmap_config); + &lpass_cpu_regmap_config);if (IS_ERR (drvdata->lpaif_map)) {dev_err (dev,"error initializing regmap: %ld\n" ,PTR_ERR (drvdata->lpaif_map));return PTR_ERR (drvdata->lpaif_map); } +#ifdef CONFIG_SND_SOC_LPASS_SC7180 + res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"lpass-hdmiif" ); + drvdata->hdmiif =devm_ioremap_resource (dev, res); +if (IS_ERR ((void const __force *)drvdata->hdmiif)) { +dev_err (dev,"error mapping reg resource: %ld\n" , +PTR_ERR ((void const __force *)drvdata->hdmiif)); +return PTR_ERR ((void const __force *)drvdata->hdmiif); + } + + lpass_hdmi_regmap_config.max_register =LPAIF_HDMI_RDMAPER_REG (variant, + variant->hdmi_rdma_channels); + drvdata->hdmiif_map =devm_regmap_init_mmio (dev, drvdata->hdmiif, + &lpass_hdmi_regmap_config); +if (IS_ERR (drvdata->hdmiif_map)) { +dev_err (dev,"error initializing regmap: %ld\n" , +PTR_ERR (drvdata->hdmiif_map)); +return PTR_ERR (drvdata->hdmiif_map); + } + +#endif if (variant->init) { ret = variant->init (pdev);if (ret) {
@@ -606,6 +626,9 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)for (i =0 ; i < variant->num_dai; i++) { dai_id = variant->dai_driver[i].id; +if (dai_id ==LPASS_DP_RX ) +continue ; + drvdata->mi2s_osr_clk[dai_id] =devm_clk_get (dev, variant->dai_osr_clk_names[i]);if (IS_ERR (drvdata->mi2s_osr_clk[dai_id])) {
@@ -625,10 +648,10 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)"error getting %s: %ld\n" , variant->dai_bit_clk_names[i], PTR_ERR(drvdata->mi2s_bit_clk[dai_id])); +return PTR_ERR (drvdata->mi2s_bit_clk[dai_id]); } } -/* Allocation for i2sctl regmap fields */ drvdata->i2sctl =devm_kzalloc (&pdev->dev,sizeof (struct lpaif_i2sctl ),GFP_KERNEL );
@@ -636,10 +659,18 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)/* Initialize bitfields for dai I2SCTL register */ ret =lpass_cpu_init_i2sctl_bitfields (dev, drvdata->i2sctl, drvdata->lpaif_map); -if (ret) { +if (ret)dev_err (dev,"error init i2sctl field: %d\n" , ret); + +#ifdef CONFIG_SND_SOC_LPASS_SC7180 + ret =lpass_hdmi_init_bitfields (dev, drvdata->hdmiif_map); +if (ret) { +dev_err (dev,"%s error hdmi init failed\n" , __func__);return ret; } +#else +return -EINVAL ; +#endif ret = devm_snd_soc_register_component(dev, &lpass_cpu_comp_driver,
sound/soc/qcom/lpass-hdmi.c new file +596 -0
596 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-lpaif-reg.h +40 -12
78 lines not on this page · raw message
sound/soc/qcom/lpass-platform.c +373 -93
743 lines not on this page · raw message
sound/soc/qcom/lpass.h +111 -8
197 lines not on this page · raw message
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
kernel test robot
build botRe: [PATCH v5 4/5] ASoC: qcom: Add support for lpass hdmi driver
Thank 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-20200917]
[cannot apply to v5.9-rc5]
[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-Mandadapu/Qualcomm-s-lpass-hdmi-ASoC-driver-to-support-audio-over-dp-port/20200917-214328 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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=arc
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>):
sound/soc/qcom/lpass-platform.c: In function 'lpass_platform_pcmops_hw_params':
>> sound/soc/qcom/lpass-platform.c:240:17: warning: variable 'map' set but not used [-Wunused-but-set-variable]
240 | struct regmap *map;
| ^~~ At top level:
sound/soc/qcom/lpass-platform.c:794:20: warning: 'lpass_platform_hdmiif_irq' defined but not used [-Wunused-function]
794 | static irqreturn_t lpass_platform_hdmiif_irq(int irq, void *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--
>> sound/soc/qcom/lpass-ipq806x.c:160:23: error: initialization of 'int (*)(struct lpass_data *, int, unsigned int)' from incompatible pointer type 'int (*)(struct lpass_data *, int)' [-Werror=incompatible-pointer-types]
160 | .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-ipq806x.c:160:23: note: (near initialization for 'ipq806x_data.alloc_dma_channel')
sound/soc/qcom/lpass-ipq806x.c:161:22: error: initialization of 'int (*)(struct lpass_data *, int, unsigned int)' from incompatible pointer type 'int (*)(struct lpass_data *, int)' [-Werror=incompatible-pointer-types]
161 | .free_dma_channel = ipq806x_lpass_free_dma_channel,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-ipq806x.c:161:22: note: (near initialization for 'ipq806x_data.free_dma_channel')
cc1: some warnings being treated as errors
--
>> sound/soc/qcom/lpass-apq8016.c:290:23: error: initialization of 'int (*)(struct lpass_data *, int, unsigned int)' from incompatible pointer type 'int (*)(struct lpass_data *, int)' [-Werror=incompatible-pointer-types]
290 | .alloc_dma_channel = apq8016_lpass_alloc_dma_channel,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-apq8016.c:290:23: note: (near initialization for 'apq8016_data.alloc_dma_channel')
sound/soc/qcom/lpass-apq8016.c:291:22: error: initialization of 'int (*)(struct lpass_data *, int, unsigned int)' from incompatible pointer type 'int (*)(struct lpass_data *, int)' [-Werror=incompatible-pointer-types]
291 | .free_dma_channel = apq8016_lpass_free_dma_channel,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/qcom/lpass-apq8016.c:291:22: note: (near initialization for 'apq8016_data.free_dma_channel')
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/36d10d78e631aecf445a62288278056d499bbee2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivasa-Rao-Mandadapu/Qualcomm-s-lpass-hdmi-ASoC-driver-to-support-audio-over-dp-port/20200917-214328 git checkout 36d10d78e631aecf445a62288278056d499bbee2
vim +160 sound/soc/qcom/lpass-ipq806x.c
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 111
eccad574ef2d74e Lars-Peter Clausen 2015-07-27 112 static struct lpass_variant ipq806x_data = {
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 113 .i2sctrl_reg_base = 0x0010,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 114 .i2sctrl_reg_stride = 0x04,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 115 .i2s_ports = 5,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 116 .irq_reg_base = 0x3000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 117 .irq_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 118 .irq_ports = 3,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 119 .rdma_reg_base = 0x6000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 120 .rdma_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 121 .rdma_channels = 4,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 122 .wrdma_reg_base = 0xB000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 123 .wrdma_reg_stride = 0x1000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 124 .wrdma_channel_start = 5,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 125 .wrdma_channels = 4,
b5022a36d28f6a9 Rohit kumar 2020-08-14 126 .loopback = REG_FIELD_ID(0x0010, 15, 15, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 127 .spken = REG_FIELD_ID(0x0010, 14, 14, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 128 .spkmode = REG_FIELD_ID(0x0010, 10, 13, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 129 .spkmono = REG_FIELD_ID(0x0010, 9, 9, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 130 .micen = REG_FIELD_ID(0x0010, 8, 8, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 131 .micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 132 .micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 133 .wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 134 .bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 135
b5022a36d28f6a9 Rohit kumar 2020-08-14 136 .rdma_dyncclk = REG_FIELD_ID(0x6000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 137 .rdma_bursten = REG_FIELD_ID(0x6000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 138 .rdma_wpscnt = REG_FIELD_ID(0x6000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 139 .rdma_intf = REG_FIELD_ID(0x6000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 140 .rdma_fifowm = REG_FIELD_ID(0x6000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 141 .rdma_enable = REG_FIELD_ID(0x6000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 142
b5022a36d28f6a9 Rohit kumar 2020-08-14 143 .wrdma_dyncclk = REG_FIELD_ID(0xB000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 144 .wrdma_bursten = REG_FIELD_ID(0xB000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 145 .wrdma_wpscnt = REG_FIELD_ID(0xB000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 146 .wrdma_intf = REG_FIELD_ID(0xB000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 147 .wrdma_fifowm = REG_FIELD_ID(0xB000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 148 .wrdma_enable = REG_FIELD_ID(0xB000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 149
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 150 .dai_driver = &ipq806x_lpass_cpu_dai_driver,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 151 .num_dai = 1,
97c52eb969718f0 Linus Walleij 2017-04-05 152 .dai_osr_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 153 "mi2s-osr-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 154 },
97c52eb969718f0 Linus Walleij 2017-04-05 155 .dai_bit_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 156 "mi2s-bit-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 157 },
a503567d70eca91 Rohit kumar 2020-08-14 158 .init = ipq806x_lpass_init,
a503567d70eca91 Rohit kumar 2020-08-14 159 .exit = ipq806x_lpass_exit,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 @160 .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 161 .free_dma_channel = ipq806x_lpass_free_dma_channel,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 162 };9bae4880acee1cd Srinivas Kandagatla 2015-05-16 163
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botRe: [PATCH v5 4/5] ASoC: qcom: Add support for lpass hdmi driver
In reply to Srinivasa Rao MandadapuThank 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-20200917]
[cannot apply to v5.9-rc5]
[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-Mandadapu/Qualcomm-s-lpass-hdmi-ASoC-driver-to-support-audio-over-dp-port/20200917-214328 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: riscv-randconfig-r031-20200917 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1321160a26e7e489baf9b10d6de90a342f898960)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from sound/soc/qcom/lpass-ipq806x.c:17:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> sound/soc/qcom/lpass-ipq806x.c:160:23: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types] .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-ipq806x.c:161:22: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.free_dma_channel = ipq806x_lpass_free_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings and 2 errors generated.
--
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from sound/soc/qcom/lpass-apq8016.c:18:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> sound/soc/qcom/lpass-apq8016.c:290:23: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types] .alloc_dma_channel = apq8016_lpass_alloc_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/qcom/lpass-apq8016.c:291:22: error: incompatible function pointer types initializing 'int (*)(struct lpass_data *, int, unsigned int)' with an expression of type 'int (struct lpass_data *, int)' [-Werror,-Wincompatible-function-pointer-types]
.free_dma_channel = apq8016_lpass_free_dma_channel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings and 2 errors generated.
# https://github.com/0day-ci/linux/commit/36d10d78e631aecf445a62288278056d499bbee2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivasa-Rao-Mandadapu/Qualcomm-s-lpass-hdmi-ASoC-driver-to-support-audio-over-dp-port/20200917-214328 git checkout 36d10d78e631aecf445a62288278056d499bbee2
vim +160 sound/soc/qcom/lpass-ipq806x.c
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 111
eccad574ef2d74e Lars-Peter Clausen 2015-07-27 112 static struct lpass_variant ipq806x_data = {
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 113 .i2sctrl_reg_base = 0x0010,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 114 .i2sctrl_reg_stride = 0x04,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 115 .i2s_ports = 5,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 116 .irq_reg_base = 0x3000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 117 .irq_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 118 .irq_ports = 3,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 119 .rdma_reg_base = 0x6000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 120 .rdma_reg_stride = 0x1000,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 121 .rdma_channels = 4,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 122 .wrdma_reg_base = 0xB000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 123 .wrdma_reg_stride = 0x1000,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 124 .wrdma_channel_start = 5,
0a14a1bf2e81a75 Srinivas Kandagatla 2016-02-11 125 .wrdma_channels = 4,
b5022a36d28f6a9 Rohit kumar 2020-08-14 126 .loopback = REG_FIELD_ID(0x0010, 15, 15, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 127 .spken = REG_FIELD_ID(0x0010, 14, 14, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 128 .spkmode = REG_FIELD_ID(0x0010, 10, 13, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 129 .spkmono = REG_FIELD_ID(0x0010, 9, 9, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 130 .micen = REG_FIELD_ID(0x0010, 8, 8, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 131 .micmode = REG_FIELD_ID(0x0010, 4, 7, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 132 .micmono = REG_FIELD_ID(0x0010, 3, 3, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 133 .wssrc = REG_FIELD_ID(0x0010, 2, 2, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 134 .bitwidth = REG_FIELD_ID(0x0010, 0, 0, 5, 0x4),
b5022a36d28f6a9 Rohit kumar 2020-08-14 135
b5022a36d28f6a9 Rohit kumar 2020-08-14 136 .rdma_dyncclk = REG_FIELD_ID(0x6000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 137 .rdma_bursten = REG_FIELD_ID(0x6000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 138 .rdma_wpscnt = REG_FIELD_ID(0x6000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 139 .rdma_intf = REG_FIELD_ID(0x6000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 140 .rdma_fifowm = REG_FIELD_ID(0x6000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 141 .rdma_enable = REG_FIELD_ID(0x6000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 142
b5022a36d28f6a9 Rohit kumar 2020-08-14 143 .wrdma_dyncclk = REG_FIELD_ID(0xB000, 12, 12, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 144 .wrdma_bursten = REG_FIELD_ID(0xB000, 11, 11, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 145 .wrdma_wpscnt = REG_FIELD_ID(0xB000, 8, 10, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 146 .wrdma_intf = REG_FIELD_ID(0xB000, 4, 7, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 147 .wrdma_fifowm = REG_FIELD_ID(0xB000, 1, 3, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 148 .wrdma_enable = REG_FIELD_ID(0xB000, 0, 0, 4, 0x1000),
b5022a36d28f6a9 Rohit kumar 2020-08-14 149
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 150 .dai_driver = &ipq806x_lpass_cpu_dai_driver,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 151 .num_dai = 1,
97c52eb969718f0 Linus Walleij 2017-04-05 152 .dai_osr_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 153 "mi2s-osr-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 154 },
97c52eb969718f0 Linus Walleij 2017-04-05 155 .dai_bit_clk_names = (const char *[]) {
97c52eb969718f0 Linus Walleij 2017-04-05 156 "mi2s-bit-clk",
97c52eb969718f0 Linus Walleij 2017-04-05 157 },
a503567d70eca91 Rohit kumar 2020-08-14 158 .init = ipq806x_lpass_init,
a503567d70eca91 Rohit kumar 2020-08-14 159 .exit = ipq806x_lpass_exit,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 @160 .alloc_dma_channel = ipq806x_lpass_alloc_dma_channel,
6db1c6ba9544e99 Srinivas Kandagatla 2015-05-16 161 .free_dma_channel = ipq806x_lpass_free_dma_channel,
9bae4880acee1cd Srinivas Kandagatla 2015-05-16 162 };9bae4880acee1cd Srinivas Kandagatla 2015-05-16 163
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
PATCH v5 5/5 ASoC: qcom: sc7180: Add support for audio over DP
In reply to Srinivasa Rao MandadapuFrom: V Sujith Kumar Reddy <[email protected]>
Add support for audio playback over DP in lpass sc7180 platform driver. Update lpass_variant structure for hdmi data configuaration.
--- sound/soc/qcom/lpass-sc7180.c | 116 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 14 deletions(-)
sound/soc/qcom/lpass-sc7180.c +102 -14
@@ -60,38 +60,65 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { .probe = &asoc_qcom_lpass_cpu_dai_probe, .ops = &asoc_qcom_lpass_cpu_dai_ops, }, + [LPASS_DP_RX] = { + .id = LPASS_DP_RX, + .name = "Hdmi", + .playback = { + .stream_name = "Hdmi Playback", + .formats = SNDRV_PCM_FMTBIT_S24, + .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) +int direction,unsigned int dai_id) {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 (dai_id ==LPASS_DP_RX ) { +if (direction ==SNDRV_PCM_STREAM_PLAYBACK ) { + chan =find_first_zero_bit (&drvdata->hdmi_dma_ch_bit_map, + v->hdmi_rdma_channels); + +if (chan >= v->hdmi_rdma_channels) +return -EBUSY ; + } +set_bit (chan, &drvdata->hdmi_dma_ch_bit_map); + }else { +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 ; - }else { - chan =find_next_zero_bit (&drvdata->dma_ch_bit_map, + }else { + chan =find_next_zero_bit (&drvdata->dma_ch_bit_map, v->wrdma_channel_start + v->wrdma_channels, v->wrdma_channel_start); -if (chan >= v->wrdma_channel_start + v->wrdma_channels) -return -EBUSY ; - } - -set_bit (chan, &drvdata->dma_ch_bit_map); +if (chan >= v->wrdma_channel_start + v->wrdma_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) +static int sc7180_lpass_free_dma_channel (struct lpass_data *drvdata,int chan,unsigned int dai_id) { -clear_bit (chan, &drvdata->dma_ch_bit_map); +if (dai_id ==LPASS_DP_RX ) +clear_bit (chan, &drvdata->hdmi_dma_ch_bit_map); +else +clear_bit (chan, &drvdata->dma_ch_bit_map);return 0 ; }
@@ -144,6 +171,9 @@ static struct lpass_variant sc7180_data = { .rdma_reg_base = 0xC000, .rdma_reg_stride = 0x1000, .rdma_channels = 5, + .hdmi_rdma_reg_base = 0x64000, + .hdmi_rdma_reg_stride = 0x1000, + .hdmi_rdma_channels = 4, .dmactl_audif_start = 1, .wrdma_reg_base = 0x18000, .wrdma_reg_stride = 0x1000,
@@ -163,7 +193,7 @@ static struct lpass_variant sc7180_data = { .rdma_dyncclk = REG_FIELD_ID(0xC000, 21, 21, 5, 0x1000), .rdma_bursten = REG_FIELD_ID(0xC000, 20, 20, 5, 0x1000), .rdma_wpscnt = REG_FIELD_ID(0xC000, 16, 19, 5, 0x1000), - .rdma_intf = REG_FIELD_ID(0xC000, 12, 15, 5, 0x1000), + .rdma_intf = REG_FIELD_ID(0xC000, 12, 15, 5, 0x1000), .rdma_fifowm = REG_FIELD_ID(0xC000, 1, 5, 5, 0x1000), .rdma_enable = REG_FIELD_ID(0xC000, 0, 0, 5, 0x1000),
@@ -174,6 +204,64 @@ static struct lpass_variant sc7180_data = { .wrdma_fifowm = REG_FIELD_ID(0x18000, 1, 5, 4, 0x1000), .wrdma_enable = REG_FIELD_ID(0x18000, 0, 0, 4, 0x1000), + .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, + .hdmi_irq_reg_base = 0x63000, + .hdmi_irq_ports = 1, + + .hdmi_rdma_dyncclk = REG_FIELD_ID(0x64000, 14, 14, 4, 0x1000), + .hdmi_rdma_bursten = REG_FIELD_ID(0x64000, 13, 13, 4, 0x1000), + .hdmi_rdma_burst8 = REG_FIELD_ID(0x64000, 15, 15, 4, 0x1000), + .hdmi_rdma_burst16 = REG_FIELD_ID(0x64000, 16, 16, 4, 0x1000), + .hdmi_rdma_dynburst = REG_FIELD_ID(0x64000, 18, 18, 4, 0x1000), + .hdmi_rdma_wpscnt = REG_FIELD_ID(0x64000, 10, 12, 4, 0x1000), + .hdmi_rdma_fifowm = REG_FIELD_ID(0x64000, 1, 5, 4, 0x1000), + .hdmi_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" ,
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.