mbox series

[v4,0/5] soundwire: add static port map support

Message ID 20210315165650.13392-1-srinivas.kandagatla@linaro.org (mailing list archive)
Headers show
Series soundwire: add static port map support | expand

Message

Srinivas Kandagatla March 15, 2021, 4:56 p.m. UTC
In some cases, SoundWire device ports are statically mapped to Controller
ports during design, however there is no way to expose this information
to the controller. Controllers like Qualcomm ones use this info to setup
static bandwidth parameters for those ports.

A generic port allocation is not possible in this cases!
This patch adds a new member m_port_map to SoundWire device so that
it can populate the static master port map and share it with controller
to be able to setup correct bandwidth parameters.

As a user of this feature this patchset also adds new bindings for
wsa881x smart speaker which has 4 ports which are statically mapped
to the 3 output and 1 input port of the controller.

Tested it on DB845c and SM8250 MTP.

thanks,
srini

Changes since v3:
	- updated kernel doc for more clarity on m_port_map

Srinivas Kandagatla (5):
  soundwire: add static port mapping support
  soundwire: qcom: update port map allocation bit mask
  soundwire: qcom: add static port map support
  ASoC: dt-bindings: wsa881x: add bindings for port mapping
  ASoC: codecs: wsa881x: add static port map support

 .../bindings/sound/qcom,wsa881x.yaml          |  9 ++++++
 drivers/soundwire/qcom.c                      | 31 +++++++++++++++----
 include/linux/soundwire/sdw.h                 |  2 ++
 sound/soc/codecs/wsa881x.c                    |  7 +++++
 4 files changed, 43 insertions(+), 6 deletions(-)

Comments

Pierre-Louis Bossart March 15, 2021, 5:10 p.m. UTC | #1
On 3/15/21 11:56 AM, Srinivas Kandagatla wrote:
> In some cases, SoundWire device ports are statically mapped to Controller
> ports during design, however there is no way to expose this information
> to the controller. Controllers like Qualcomm ones use this info to setup
> static bandwidth parameters for those ports.
> 
> A generic port allocation is not possible in this cases!
> This patch adds a new member m_port_map to SoundWire device so that
> it can populate the static master port map and share it with controller
> to be able to setup correct bandwidth parameters.
> 
> As a user of this feature this patchset also adds new bindings for
> wsa881x smart speaker which has 4 ports which are statically mapped
> to the 3 output and 1 input port of the controller.
> 
> Tested it on DB845c and SM8250 MTP.
> 
> thanks,
> srini

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> Changes since v3:
> 	- updated kernel doc for more clarity on m_port_map
> 
> Srinivas Kandagatla (5):
>    soundwire: add static port mapping support
>    soundwire: qcom: update port map allocation bit mask
>    soundwire: qcom: add static port map support
>    ASoC: dt-bindings: wsa881x: add bindings for port mapping
>    ASoC: codecs: wsa881x: add static port map support
> 
>   .../bindings/sound/qcom,wsa881x.yaml          |  9 ++++++
>   drivers/soundwire/qcom.c                      | 31 +++++++++++++++----
>   include/linux/soundwire/sdw.h                 |  2 ++
>   sound/soc/codecs/wsa881x.c                    |  7 +++++
>   4 files changed, 43 insertions(+), 6 deletions(-)
>
Vinod Koul April 1, 2021, 7:22 a.m. UTC | #2
On 15-03-21, 16:56, Srinivas Kandagatla wrote:
> In some cases, SoundWire device ports are statically mapped to Controller
> ports during design, however there is no way to expose this information
> to the controller. Controllers like Qualcomm ones use this info to setup
> static bandwidth parameters for those ports.
> 
> A generic port allocation is not possible in this cases!
> This patch adds a new member m_port_map to SoundWire device so that
> it can populate the static master port map and share it with controller
> to be able to setup correct bandwidth parameters.
> 
> As a user of this feature this patchset also adds new bindings for
> wsa881x smart speaker which has 4 ports which are statically mapped
> to the 3 output and 1 input port of the controller.
> 
> Tested it on DB845c and SM8250 MTP.
> 
> thanks,
> srini
> 
> Changes since v3:
> 	- updated kernel doc for more clarity on m_port_map
> 
> Srinivas Kandagatla (5):
>   soundwire: add static port mapping support
>   soundwire: qcom: update port map allocation bit mask
>   soundwire: qcom: add static port map support

Applied all sdw patches, thanks

>   ASoC: dt-bindings: wsa881x: add bindings for port mapping
>   ASoC: codecs: wsa881x: add static port map support
> 
>  .../bindings/sound/qcom,wsa881x.yaml          |  9 ++++++
>  drivers/soundwire/qcom.c                      | 31 +++++++++++++++----
>  include/linux/soundwire/sdw.h                 |  2 ++
>  sound/soc/codecs/wsa881x.c                    |  7 +++++
>  4 files changed, 43 insertions(+), 6 deletions(-)
> 
> -- 
> 2.21.0