alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially
@ 2014-08-04 22:13 Peter S. Housel
  2014-08-05  7:34 ` Jyri Sarha
       [not found] ` <avb91o01X1j0zgo01vbBxr>
  0 siblings, 2 replies; 4+ messages in thread
From: Peter S. Housel @ 2014-08-04 22:13 UTC (permalink / raw)
  To: alsa-devel; +Cc: Peter S. Housel, jsarha

Previously the driver would only place the TLV320AIC31XX into reset
using the gpio reset line when at least one of the power supply
regulators was disabled, so that if these supplies were always enabled
no reset would ever occur. This change resets the codec state at probe
time so that the initial register cache values are correct.

Signed-off-by: Peter S. Housel <housel@acm.org>
---
 sound/soc/codecs/tlv320aic31xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 0f64c78..89a4daf 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
 	if (aic31xx->pdata.gpio_reset) {
 		ret = devm_gpio_request_one(aic31xx->dev,
 					    aic31xx->pdata.gpio_reset,
-					    GPIOF_OUT_INIT_HIGH,
+					    GPIOF_OUT_INIT_LOW,
 					    "aic31xx-reset-pin");
 		if (ret < 0) {
 			dev_err(aic31xx->dev, "not able to acquire gpio\n");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially
  2014-08-04 22:13 [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially Peter S. Housel
@ 2014-08-05  7:34 ` Jyri Sarha
       [not found] ` <avb91o01X1j0zgo01vbBxr>
  1 sibling, 0 replies; 4+ messages in thread
From: Jyri Sarha @ 2014-08-05  7:34 UTC (permalink / raw)
  To: Peter S. Housel, alsa-devel

On 08/05/2014 01:13 AM, Peter S. Housel wrote:
> Previously the driver would only place the TLV320AIC31XX into reset
> using the gpio reset line when at least one of the power supply
> regulators was disabled, so that if these supplies were always enabled
> no reset would ever occur. This change resets the codec state at probe
> time so that the initial register cache values are correct.
>
> Signed-off-by: Peter S. Housel <housel@acm.org>
> ---
>   sound/soc/codecs/tlv320aic31xx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
> index 0f64c78..89a4daf 100644
> --- a/sound/soc/codecs/tlv320aic31xx.c
> +++ b/sound/soc/codecs/tlv320aic31xx.c
> @@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
>   	if (aic31xx->pdata.gpio_reset) {
>   		ret = devm_gpio_request_one(aic31xx->dev,
>   					    aic31xx->pdata.gpio_reset,
> -					    GPIOF_OUT_INIT_HIGH,
> +					    GPIOF_OUT_INIT_LOW,
>   					    "aic31xx-reset-pin");
>   		if (ret < 0) {
>   			dev_err(aic31xx->dev, "not able to acquire gpio\n");
>

Oops, aic3111 and friends indeed have an active low reset line. The line 
was not behind a gpio on my board.

Acked-by: Jyri Sarha <jsarha@ti.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially
       [not found] ` <avb91o01X1j0zgo01vbBxr>
@ 2014-09-02 20:25   ` Peter S. Housel
  2014-09-02 22:31     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Peter S. Housel @ 2014-09-02 20:25 UTC (permalink / raw)
  To: alsa-devel, broonie

Ping...

Thanks,
-Peter-

On 08/05/2014 12:34 AM, Jyri Sarha wrote:
> On 08/05/2014 01:13 AM, Peter S. Housel wrote:
>> Previously the driver would only place the TLV320AIC31XX into reset
>> using the gpio reset line when at least one of the power supply
>> regulators was disabled, so that if these supplies were always enabled
>> no reset would ever occur. This change resets the codec state at probe
>> time so that the initial register cache values are correct.
>>
>> Signed-off-by: Peter S. Housel <housel@acm.org>
>> ---
>>   sound/soc/codecs/tlv320aic31xx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/codecs/tlv320aic31xx.c 
>> b/sound/soc/codecs/tlv320aic31xx.c
>> index 0f64c78..89a4daf 100644
>> --- a/sound/soc/codecs/tlv320aic31xx.c
>> +++ b/sound/soc/codecs/tlv320aic31xx.c
>> @@ -1194,7 +1194,7 @@ static int aic31xx_device_init(struct 
>> aic31xx_priv *aic31xx)
>>       if (aic31xx->pdata.gpio_reset) {
>>           ret = devm_gpio_request_one(aic31xx->dev,
>>                           aic31xx->pdata.gpio_reset,
>> -                        GPIOF_OUT_INIT_HIGH,
>> +                        GPIOF_OUT_INIT_LOW,
>>                           "aic31xx-reset-pin");
>>           if (ret < 0) {
>>               dev_err(aic31xx->dev, "not able to acquire gpio\n");
>>
>
> Oops, aic3111 and friends indeed have an active low reset line. The 
> line was not behind a gpio on my board.
>
> Acked-by: Jyri Sarha <jsarha@ti.com>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially
  2014-09-02 20:25   ` Peter S. Housel
@ 2014-09-02 22:31     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-09-02 22:31 UTC (permalink / raw)
  To: Peter S. Housel; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 233 bytes --]

On Tue, Sep 02, 2014 at 01:25:53PM -0700, Peter S. Housel wrote:
> Ping...

Don't top post and don't send content free pings.  If you think a patch
should be applied please send it to the maintainers as covered in
SubmittingPatches.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-02 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04 22:13 [PATCH] ASoC: tlv320aic31xx: place codec into reset state initially Peter S. Housel
2014-08-05  7:34 ` Jyri Sarha
     [not found] ` <avb91o01X1j0zgo01vbBxr>
2014-09-02 20:25   ` Peter S. Housel
2014-09-02 22:31     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).