All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de, lgirdwood@gmail.com,
	Akshu Agrawal <akshu.agrawal@amd.com>,
	Alexander.Deucher@amd.com
Subject: Re: [PATCH 3/9] ASoC: amd: dma driver changes for BT I2S controller instance
Date: Fri, 23 Feb 2018 12:31:26 +0530	[thread overview]
Message-ID: <b381c9c1-3f68-28b3-175f-a0948f214072@amd.com> (raw)
In-Reply-To: <20180219164525.GJ32761@sirena.org.uk>



On Monday 19 February 2018 10:15 PM, Mark Brown wrote:
> On Fri, Feb 16, 2018 at 01:03:48PM +0530, Vijendar Mukunda wrote:
>
>> Implemented dma driver changes to support BT I2S controller
>> instance.
> Some sort of description of the changes would make this a lot easier to
> review.

We will update the description as mentioned below.
With in ACP, There are three I2S controllers can be configured/enabled( I2S SP, I2S MICSP, I2S BT).
Default enabled I2S controller instance is I2S SP.
This patch provides required changes to support I2S BT controller Instance.


>
>> +		if (strcmp(prtd->cpu_dai->name, "designware-i2s.1.auto") == 0) {
>> +			adata->i2s_play_instance = I2S_SP_INSTANCE;
>> +			adata->i2ssp_renderbytescount = 0;
>> +		}
>> +		if (strcmp(prtd->cpu_dai->name, "designware-i2s.3.auto") == 0) {
>> +			adata->i2s_play_instance = I2S_BT_INSTANCE;
>> +			adata->i2sbt_renderbytescount = 0;
>> +		}
> This strcmp on what looks like an autogenerated DAI name seems a bit
> fragile, especially given that we just silently accept cases where we
> fail to match anything.  Why are we doing things this way rather than
> at least using explicitly set names?

ACP DMA Driver implemented based on ACP 2.x stack .It uses Designware I2S controller.

AMD Gpu Driver creates device instances for playback & capture scenarios for both the I2S controller instances.( I2S SP & I2S BT).

It has fixed mapping as mentioned below.

designware-i2s.1.auto cpu dai will be used for I2S SP Instance playback device.
designware-i2s.2.auto cpu dai will be used for I2S SP Instance capture device.
designware-i2s.3.auto cpu dai will be used for I2S BT Instance playback device.
designware-i2s.4.auto cpu dai will be used for I2S BT Instance capture device.

We will add error checks for failure case.

>
>> +	if (adata->asic_type != CHIP_CARRIZO) {
>> +		if (adata->play_i2sbt_stream &&
>> +			adata->play_i2sbt_stream->runtime) {
> As ever please use switch statements for quirking, it makes life easier
> when more variants appear.

There are only two variants (Carrizo & Stoney) based on ACP 2.x stack.
Switch statement is not required here as this condition is specific to Carrizo only.

  reply	other threads:[~2018-02-23  6:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16  7:33 [PATCH 0/9] Enablement of BT I2S controller instance for AMD APUs Vijendar Mukunda
2018-02-16  7:33 ` [PATCH 1/9] ASoC: amd: renaming pcm substream names and bytescount params Vijendar Mukunda
2018-02-19 16:57   ` Applied "ASoC: amd: renaming pcm substream names and bytescount params" to the asoc tree Mark Brown
2018-02-16  7:33 ` [PATCH 2/9] ASoC: amd: Coding style changes for acp dma driver Vijendar Mukunda
2018-02-19 16:57   ` Applied "ASoC: amd: Coding style changes for acp dma driver" to the asoc tree Mark Brown
2018-02-16  7:33 ` [PATCH 3/9] ASoC: amd: dma driver changes for BT I2S controller instance Vijendar Mukunda
2018-02-19 16:45   ` Mark Brown
2018-02-23  7:01     ` Mukunda,Vijendar [this message]
2018-02-16  7:33 ` [PATCH 4/9] ASoC: amd: dma descriptor changes for BT I2S Instance Vijendar Mukunda
2018-02-16  7:33 ` [PATCH 5/9] ASoC: amd: Interrupt handler changes for BT I2S instance Vijendar Mukunda
2018-02-16  7:33 ` [PATCH 6/9] ASoC: amd: pcm callbacks modifications for bt i2s instance Vijendar Mukunda
2018-02-16  7:33 ` [PATCH 7/9] ASoC: amd: modifications in dma stop sequence Vijendar Mukunda
2018-02-19 16:50   ` Mark Brown
2018-02-23  7:09     ` Mukunda,Vijendar
2018-02-16  7:33 ` [PATCH 8/9] ASoC: amd: 16bit resolution support for bt i2s instance Vijendar Mukunda
2018-02-16  7:33 ` [PATCH 9/9] ASoC: amd: enabling bt i2s config after acp reset Vijendar Mukunda
2018-03-09  9:59 ` [PATCH 0/9] Enablement of BT I2S controller instance for AMD APUs Mukunda,Vijendar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b381c9c1-3f68-28b3-175f-a0948f214072@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=akshu.agrawal@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.