Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: wsa88xx: add support for static port

Merge series from srinivas.kandagatla@linaro.org:

Existing way of allocating soundwire master ports on Qualcommm platforms is
dynamic, and in linear order starting from 1 to MAX_PORTS.
This will work as long as soundwire device ports are 1:1 mapped
linearly. However on most Qcom SoCs like SM8550, SM8650, x1e80100, these
are NOT mapped in that order.

The result of this is that only one speaker among the pair of speakers
is always silent, With recent changes for WSA codec to support codec
versions and along with these patches we are able to get all speakers
working on these SoCs.

+32
+8
Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
··· 32 32 vdd-supply: 33 33 description: VDD Supply for the Codec 34 34 35 + qcom,port-mapping: 36 + description: | 37 + Specifies static port mapping between slave and master ports. 38 + In the order of slave port index. 39 + $ref: /schemas/types.yaml#/definitions/uint32-array 40 + minItems: 4 41 + maxItems: 4 42 + 35 43 '#thermal-sensor-cells': 36 44 const: 0 37 45
+8
Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml
··· 32 32 description: Powerdown/Shutdown line to use (pin SD_N) 33 33 maxItems: 1 34 34 35 + qcom,port-mapping: 36 + description: | 37 + Specifies static port mapping between slave and master ports. 38 + In the order of slave port index. 39 + $ref: /schemas/types.yaml#/definitions/uint32-array 40 + minItems: 6 41 + maxItems: 6 42 + 35 43 '#sound-dai-cells': 36 44 const: 0 37 45
+8
sound/soc/codecs/wsa883x.c
··· 1398 1398 wsa883x->sconfig.direction = SDW_DATA_DIR_RX; 1399 1399 wsa883x->sconfig.type = SDW_STREAM_PDM; 1400 1400 1401 + /** 1402 + * Port map index starts with 0, however the data port for this codec 1403 + * are from index 1 1404 + */ 1405 + if (of_property_read_u32_array(dev->of_node, "qcom,port-mapping", &pdev->m_port_map[1], 1406 + WSA883X_MAX_SWR_PORTS)) 1407 + dev_dbg(dev, "Static Port mapping not specified\n"); 1408 + 1401 1409 pdev->prop.sink_ports = GENMASK(WSA883X_MAX_SWR_PORTS, 0); 1402 1410 pdev->prop.simple_clk_stop_capable = true; 1403 1411 pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop;
+8
sound/soc/codecs/wsa884x.c
··· 1887 1887 wsa884x->sconfig.direction = SDW_DATA_DIR_RX; 1888 1888 wsa884x->sconfig.type = SDW_STREAM_PDM; 1889 1889 1890 + /** 1891 + * Port map index starts with 0, however the data port for this codec 1892 + * are from index 1 1893 + */ 1894 + if (of_property_read_u32_array(dev->of_node, "qcom,port-mapping", &pdev->m_port_map[1], 1895 + WSA884X_MAX_SWR_PORTS)) 1896 + dev_dbg(dev, "Static Port mapping not specified\n"); 1897 + 1890 1898 pdev->prop.sink_ports = GENMASK(WSA884X_MAX_SWR_PORTS, 0); 1891 1899 pdev->prop.simple_clk_stop_capable = true; 1892 1900 pdev->prop.sink_dpn_prop = wsa884x_sink_dpn_prop;