All of lore.kernel.org
 help / color / mirror / Atom feed
From: sugar <sugar.zhang@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	heiko@sntech.de, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ASoC: rockchip: i2s: add 8 channels capture and lrck-mode support
Date: Mon, 28 Sep 2015 16:16:12 +0800	[thread overview]
Message-ID: <5608F74C.3000104@rock-chips.com> (raw)
In-Reply-To: <20150923162433.GQ30445@sirena.org.uk>

Hi Mark Brown,

在 9/24/2015 00:24, Mark Brown 写道:
> On Wed, Sep 23, 2015 at 11:41:22AM +0800, Sugar Zhang wrote:
>
>> +	/* configure tx/rx lrck use mode */
>> +	if (!of_property_read_u32(node, "rockchip,lrck-mode", &val)) {
>> +		if (val >= LRCK_TXRX && val <= LRCK_RX_SHARE)
>> +			regmap_update_bits(i2s->regmap, I2S_CKR,
>> +					   I2S_CKR_TRCM_MASK,
>> +					   I2S_CKR_TRCM(val));
>> +	}
>
> This looks like it's for a board configuration thing so I'd not really
> expect this to be handled in a device specific property - it's fairly
> common to have this situation and we already have the symmetric_rates
> flag for the DAI to handle it (and if we do end up adding this property
> we'd need the driver to set that flag so that the core can handle things
> properly and make sure that userspace doesn't try to set different rates
> in different directions).
>
> My initial thought here is that the machine driver should be responsible
> for setting this and then the DAI driver should check to see if
> symmetric_rates are in use and configure itself appropriately.  Is there
> a reason why this won't work here?
>

It's for i2s ip configuration, in the most situation, there is no need
to use this property, except one case:

In order to save gpio pins for other function use, we may use single
lrck(tx or rx) pin. of course, it depends on product design. when in i2s
slave mode, we need to configure this to share lrck with tx/rx inside 
i2s logic.

symmetric_rates flag works fine on rockchip platform, but it can't cover 
the above case.

Do you have any suggestion about this or maybe there is no need to 
upstream this special part?

Best Regards
Sugar


WARNING: multiple messages have this Message-ID (diff)
From: sugar <sugar.zhang@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, heiko@sntech.de,
	linux-kernel@vger.kernel.org, tiwai@suse.com,
	lgirdwood@gmail.com, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ASoC: rockchip: i2s: add 8 channels capture and lrck-mode support
Date: Mon, 28 Sep 2015 16:16:12 +0800	[thread overview]
Message-ID: <5608F74C.3000104@rock-chips.com> (raw)
In-Reply-To: <20150923162433.GQ30445@sirena.org.uk>

Hi Mark Brown,

在 9/24/2015 00:24, Mark Brown 写道:
> On Wed, Sep 23, 2015 at 11:41:22AM +0800, Sugar Zhang wrote:
>
>> +	/* configure tx/rx lrck use mode */
>> +	if (!of_property_read_u32(node, "rockchip,lrck-mode", &val)) {
>> +		if (val >= LRCK_TXRX && val <= LRCK_RX_SHARE)
>> +			regmap_update_bits(i2s->regmap, I2S_CKR,
>> +					   I2S_CKR_TRCM_MASK,
>> +					   I2S_CKR_TRCM(val));
>> +	}
>
> This looks like it's for a board configuration thing so I'd not really
> expect this to be handled in a device specific property - it's fairly
> common to have this situation and we already have the symmetric_rates
> flag for the DAI to handle it (and if we do end up adding this property
> we'd need the driver to set that flag so that the core can handle things
> properly and make sure that userspace doesn't try to set different rates
> in different directions).
>
> My initial thought here is that the machine driver should be responsible
> for setting this and then the DAI driver should check to see if
> symmetric_rates are in use and configure itself appropriately.  Is there
> a reason why this won't work here?
>

It's for i2s ip configuration, in the most situation, there is no need
to use this property, except one case:

In order to save gpio pins for other function use, we may use single
lrck(tx or rx) pin. of course, it depends on product design. when in i2s
slave mode, we need to configure this to share lrck with tx/rx inside 
i2s logic.

symmetric_rates flag works fine on rockchip platform, but it can't cover 
the above case.

Do you have any suggestion about this or maybe there is no need to 
upstream this special part?

Best Regards
Sugar

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

WARNING: multiple messages have this Message-ID (diff)
From: sugar.zhang@rock-chips.com (sugar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ASoC: rockchip: i2s: add 8 channels capture and lrck-mode support
Date: Mon, 28 Sep 2015 16:16:12 +0800	[thread overview]
Message-ID: <5608F74C.3000104@rock-chips.com> (raw)
In-Reply-To: <20150923162433.GQ30445@sirena.org.uk>

Hi Mark Brown,

? 9/24/2015 00:24, Mark Brown ??:
> On Wed, Sep 23, 2015 at 11:41:22AM +0800, Sugar Zhang wrote:
>
>> +	/* configure tx/rx lrck use mode */
>> +	if (!of_property_read_u32(node, "rockchip,lrck-mode", &val)) {
>> +		if (val >= LRCK_TXRX && val <= LRCK_RX_SHARE)
>> +			regmap_update_bits(i2s->regmap, I2S_CKR,
>> +					   I2S_CKR_TRCM_MASK,
>> +					   I2S_CKR_TRCM(val));
>> +	}
>
> This looks like it's for a board configuration thing so I'd not really
> expect this to be handled in a device specific property - it's fairly
> common to have this situation and we already have the symmetric_rates
> flag for the DAI to handle it (and if we do end up adding this property
> we'd need the driver to set that flag so that the core can handle things
> properly and make sure that userspace doesn't try to set different rates
> in different directions).
>
> My initial thought here is that the machine driver should be responsible
> for setting this and then the DAI driver should check to see if
> symmetric_rates are in use and configure itself appropriately.  Is there
> a reason why this won't work here?
>

It's for i2s ip configuration, in the most situation, there is no need
to use this property, except one case:

In order to save gpio pins for other function use, we may use single
lrck(tx or rx) pin. of course, it depends on product design. when in i2s
slave mode, we need to configure this to share lrck with tx/rx inside 
i2s logic.

symmetric_rates flag works fine on rockchip platform, but it can't cover 
the above case.

Do you have any suggestion about this or maybe there is no need to 
upstream this special part?

Best Regards
Sugar

  reply	other threads:[~2015-09-28  8:16 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  3:41 [PATCH 0/2] ASoC: rockchip: i2s: add 8 channels capture and lrck-mode Sugar Zhang
2015-09-23  3:41 ` Sugar Zhang
2015-09-23  3:41 ` [PATCH 1/2] ASoC: rockchip: i2s: add 8 channels capture and lrck-mode support Sugar Zhang
2015-09-23  3:41   ` Sugar Zhang
2015-09-23 16:24   ` Mark Brown
2015-09-23 16:24     ` Mark Brown
2015-09-28  8:16     ` sugar [this message]
2015-09-28  8:16       ` sugar
2015-09-28  8:16       ` sugar
2015-09-30 18:46       ` Mark Brown
2015-09-30 18:46         ` Mark Brown
2015-10-07  8:01         ` sugar
2015-10-07  8:01           ` sugar
2015-10-07  8:01           ` sugar
2015-10-07  9:27           ` Mark Brown
2015-10-07  9:27             ` Mark Brown
2015-10-07  9:39             ` Mark Brown
2015-10-07  9:39               ` Mark Brown
2015-10-07  9:39               ` Mark Brown
2015-10-07 10:01               ` sugar
2015-10-07 10:01                 ` sugar
2015-10-07 10:01                 ` sugar
2015-10-07 13:04           ` [alsa-devel] " Caleb Crome
2015-10-07 13:04             ` Caleb Crome
2015-10-08  1:47             ` sugar
2015-10-08  1:47               ` sugar
2015-10-08  1:47               ` sugar
2015-10-08  2:36               ` [alsa-devel] " Caleb Crome
2015-10-08  2:36                 ` Caleb Crome
2015-10-08  2:44                 ` sugar
2015-10-08  2:44                   ` sugar
2015-10-08  3:19                   ` Caleb Crome
2015-10-08  3:19                     ` Caleb Crome
2015-10-08  3:59                     ` sugar
2015-10-08  3:59                       ` sugar
2015-10-08  3:59                       ` sugar
2015-09-23  3:41 ` [PATCH 2/2] Documentation: DT bindings: rockchip-i2s: add capture and lrck-mode Sugar Zhang
2015-09-23  3:41   ` Sugar Zhang
2015-09-23 16:20   ` Mark Brown
2015-09-23 16:20     ` Mark Brown
2015-09-23 16:20     ` Mark Brown

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=5608F74C.3000104@rock-chips.com \
    --to=sugar.zhang@rock-chips.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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.