Message ID | 20240626-port-map-v2-2-6cc1c5608cdd@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 1cf3295bd108abbd7f128071ae9775fd18394ca9 |
Headers | show |
Series | ASoC: codecs: wsa88xx: add support for static port mapping. | expand |
On Thu, Jun 27, 2024 at 03:44:39PM GMT, Srinivas Kandagatla wrote: > Add support to parse static master port map information from device tree. > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > --- > sound/soc/codecs/wsa883x.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c > index a2e86ef7d18f..5443a5c4100c 100644 > --- a/sound/soc/codecs/wsa883x.c > +++ b/sound/soc/codecs/wsa883x.c > @@ -1399,6 +1399,14 @@ static int wsa883x_probe(struct sdw_slave *pdev, > wsa883x->sconfig.direction = SDW_DATA_DIR_RX; > wsa883x->sconfig.type = SDW_STREAM_PDM; > > + /** > + * Port map index starts with 0, however the data port for this codec > + * are from index 1 > + */ > + if (of_property_read_u32_array(dev->of_node, "qcom,port-mapping", &pdev->m_port_map[1], > + WSA883X_MAX_SWR_PORTS)) > + dev_dbg(dev, "Static Port mapping not specified\n"); > + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > pdev->prop.sink_ports = GENMASK(WSA883X_MAX_SWR_PORTS, 0); > pdev->prop.simple_clk_stop_capable = true; > pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop; > > -- > 2.25.1 >
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index a2e86ef7d18f..5443a5c4100c 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1399,6 +1399,14 @@ static int wsa883x_probe(struct sdw_slave *pdev, wsa883x->sconfig.direction = SDW_DATA_DIR_RX; wsa883x->sconfig.type = SDW_STREAM_PDM; + /** + * Port map index starts with 0, however the data port for this codec + * are from index 1 + */ + if (of_property_read_u32_array(dev->of_node, "qcom,port-mapping", &pdev->m_port_map[1], + WSA883X_MAX_SWR_PORTS)) + dev_dbg(dev, "Static Port mapping not specified\n"); + pdev->prop.sink_ports = GENMASK(WSA883X_MAX_SWR_PORTS, 0); pdev->prop.simple_clk_stop_capable = true; pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop;