]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: audio-graph: Expose new members for asoc_simple_priv
authorSameer Pujar <spujar@nvidia.com>
Mon, 2 Nov 2020 15:10:13 +0000 (20:40 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 10 Nov 2020 17:28:22 +0000 (17:28 +0000)
commitafd17c211058d9776bedd4537cb31c37cc26d126
tree748f4af129cf0de4045d852755e60f7ba5948bf3
parent6fe62826e6dfe4dd5a09d39c3107eb1e9b07a726
ASoC: audio-graph: Expose new members for asoc_simple_priv

Add new members in struct 'asoc_simple_priv'. Idea is to leverage
simple or graph card driver as much as possible and vendor can
maintain a thin driver to control the behavior by populating these
newly exposed members.

Following are the members added in 'asoc_simple_priv':

  - 'ops' struct: In some cases SoC vendor drivers may want to
    implement 'snd_soc_ops' callbacks differently. In such cases
    custom callbacks would be used.

  - 'force_dpcm' flag: Right now simple or graph card drivers
    detect DAI links as DPCM links if:

      * The dpcm_selectable is set AND
      * Codec is connected to multiple CPU endpoints or aconvert
        property is used for rate/channels.

    So there is no way to directly specify usage of DPCM alone. So a
    flag is exposed to mark all links as DPCM. Vendor driver can
    set this if required.

  - 'dpcm_selectable': Currently simple or audio graph drivers
    provide a way to enable this for specific compatibles. However
    vendor driver may want to define some additional info. Thus
    expose this variable where vendor drivers can set this if
    required.

Audio graph driver is updated to consider above flags or callbacks.
Subsequent patches in the series illustrate usage for above.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/simple_card_utils.h
sound/soc/generic/audio-graph-card.c