mbox series

[RFC,v3,0/4] ASoC: Add Multi CPU DAI support

Message ID 20200116202620.7401-1-yung-chuan.liao@linux.intel.com (mailing list archive)
Headers show
Series ASoC: Add Multi CPU DAI support | expand

Message

Bard Liao Jan. 16, 2020, 8:26 p.m. UTC
As discussed in [1], ASoC core supports multi codec DAIs
on a DAI link. However it does not do so for CPU DAIs.

So, add support for multi CPU DAIs on a DAI Link by adding
multi CPU DAI in Card instantiation, suspend and resume
functions, PCM ops, stream handling functions and DAPM.

[1]: https://www.spinics.net/lists/alsa-devel/msg71369.html

changes in v3:
 - Return error if the function doesn't support multi cpu instead of
   just showing a warning message.
 - Revert changes for FE dai and compress device since we don't support
   multi cpu for FE dai and compress device yet.

Bard liao (1):
  ASoC: return error if the function is not support multi cpu yet.

Shreyas NC (3):
  ASoC: Add initial support for multiple CPU DAIs
  ASoC: Add multiple CPU DAI support for PCM ops
  ASoC: Add multiple CPU DAI support in DAPM

 include/sound/soc.h                   |  15 +
 sound/soc/soc-compress.c              |   5 +-
 sound/soc/soc-core.c                  | 205 +++++-----
 sound/soc/soc-dapm.c                  | 131 ++++---
 sound/soc/soc-generic-dmaengine-pcm.c |  18 +
 sound/soc/soc-pcm.c                   | 539 +++++++++++++++++---------
 6 files changed, 591 insertions(+), 322 deletions(-)

Comments

Pierre-Louis Bossart Jan. 17, 2020, 11:27 a.m. UTC | #1
On 1/16/20 2:26 PM, Bard liao wrote:
> As discussed in [1], ASoC core supports multi codec DAIs
> on a DAI link. However it does not do so for CPU DAIs.
> 
> So, add support for multi CPU DAIs on a DAI Link by adding
> multi CPU DAI in Card instantiation, suspend and resume
> functions, PCM ops, stream handling functions and DAPM.
> 
> [1]: https://www.spinics.net/lists/alsa-devel/msg71369.html
> 
> changes in v3:
>   - Return error if the function doesn't support multi cpu instead of
>     just showing a warning message.
>   - Revert changes for FE dai and compress device since we don't support
>     multi cpu for FE dai and compress device yet.

The code looks mostly good, except for an error in soc-compress (patch 4).

I would still suggest refactoring code first, adding the new checks or 
helpers first, to make sure we have the same functionality before adding 
the multi-cpu-dais, see specific points in the other emails.

Thanks Bard and Morimoto-san.

> 
> Bard liao (1):
>    ASoC: return error if the function is not support multi cpu yet.
> 
> Shreyas NC (3):
>    ASoC: Add initial support for multiple CPU DAIs
>    ASoC: Add multiple CPU DAI support for PCM ops
>    ASoC: Add multiple CPU DAI support in DAPM
> 
>   include/sound/soc.h                   |  15 +
>   sound/soc/soc-compress.c              |   5 +-
>   sound/soc/soc-core.c                  | 205 +++++-----
>   sound/soc/soc-dapm.c                  | 131 ++++---
>   sound/soc/soc-generic-dmaengine-pcm.c |  18 +
>   sound/soc/soc-pcm.c                   | 539 +++++++++++++++++---------
>   6 files changed, 591 insertions(+), 322 deletions(-)
>