2011-05-03 09:32:44

by Marek Belisko

[permalink] [raw]
Subject: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

Without this define we can't get any sound from codec so enable
it by default. This define unlock bias settings which control
power control for DAC and ADC (by default 0 0 which is off off).

Signed-off-by: Marek Belisko <[email protected]>
---
sound/soc/codecs/uda134x.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index 48ffd40..8c6808ad 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -26,6 +26,7 @@

#include "uda134x.h"

+#define POWER_OFF_ON_STANDBY

#define UDA134X_RATES SNDRV_PCM_RATE_8000_48000
#define UDA134X_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \
--
1.7.4.1


2011-05-03 10:00:49

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

On Tue, May 03, 2011 at 11:32:29AM +0200, Marek Belisko wrote:
> Without this define we can't get any sound from codec so enable
> it by default. This define unlock bias settings which control
> power control for DAC and ADC (by default 0 0 which is off off).

If this is essential why is it optional in the first place?

2011-05-03 11:09:30

by Belisko Marek

[permalink] [raw]
Subject: Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

On Tue, May 3, 2011 at 12:00 PM, Mark Brown
<[email protected]> wrote:
> On Tue, May 03, 2011 at 11:32:29AM +0200, Marek Belisko wrote:
>> Without this define we can't get any sound from codec so enable
>> it by default. This define unlock bias settings which control
>> power control for DAC and ADC (by default 0 0 which is off off).
>
> If this is essential why is it optional in the first place?
Not sure about background. Maybe whole define should be removed
This change was introduced in commit:f0fba2ad

>

regards,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

2011-05-03 11:23:53

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

On Tue, May 03, 2011 at 01:09:27PM +0200, Belisko Marek wrote:
> On Tue, May 3, 2011 at 12:00 PM, Mark Brown

> > If this is essential why is it optional in the first place?

> Not sure about background. Maybe whole define should be removed

That's exactly what I'm suggesting.

> This change was introduced in commit:f0fba2ad

*Always* include a plain text description of the commit for those of us
who haven't memorised the entire git history. In this case I suspect
you need to do a bit more digging, that commit will just have done some
code motion here.

2011-05-03 11:56:32

by Belisko Marek

[permalink] [raw]
Subject: Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

On Tue, May 3, 2011 at 1:23 PM, Mark Brown
<[email protected]> wrote:
> On Tue, May 03, 2011 at 01:09:27PM +0200, Belisko Marek wrote:
>> On Tue, May 3, 2011 at 12:00 PM, Mark Brown
>
>> > If this is essential why is it optional in the first place?
>
>> Not sure about background. Maybe whole define should be removed
>
> That's exactly what I'm suggesting.
>
>> This change was introduced in commit:f0fba2ad
>
> *Always* include a plain text description of the commit for those of us
> who haven't memorised the entire git history.  In this case I suspect
> you need to do a bit more digging, that commit will just have done some
> code motion here.

OK after more digging in file history find commit where define was removed:
commit cc3202f5da3c81a99c5f3a605df527da7a77eed3
Author: Vladimir Zapolskiy <[email protected]>
Date: Thu Jun 24 17:38:50 2010 +0400

ASoC: uda134x: replace a macro with a value in platform struct.

This change wipes out a hardcoded macro, which enables codec bias
level control. Now is_powered_on_standby value shall be used instead.

Signed-off-by: Vladimir Zapolskiy <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>

diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index 28aac53..30cf2f9 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -28,19 +28,6 @@
#include "uda134x.h"


-#define POWER_OFF_ON_STANDBY 1
-/*
- ALSA SOC usually puts the device in standby mode when it's not used
- for sometime. If you define POWER_OFF_ON_STANDBY the driver will
- turn off the ADC/DAC when this callback is invoked and turn it back
- on when needed. Unfortunately this will result in a very light bump
- (it can be audible only with good earphones). If this bothers you
- just comment this line, you will have slightly higher power
- consumption . Please note that sending the L3 command for ADC is
- enough to make the bump, so it doesn't make difference if you
- completely take off power from the codec.
- */
-
#define UDA134X_RATES SNDRV_PCM_RATE_8000_48000
#define UDA134X_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_S18_3LE | SNDRV_PCM_FMTBIT_S20_3LE)
@@ -531,9 +518,11 @@ static int uda134x_soc_probe(struct platform_device *pdev)
codec->num_dai = 1;
codec->read = uda134x_read_reg_cache;
codec->write = uda134x_write;
-#ifdef POWER_OFF_ON_STANDBY
- codec->set_bias_level = uda134x_set_bias_level;
-#endif

So not sure why in never commit appeared again :
commit f0fba2ad1b6b53d5360125c41953b7afcd6deff0
Author: Liam Girdwood <[email protected]>
Date: Wed Mar 17 20:15:21 2010 +0000

ASoC: multi-component - ASoC Multi-Component Support

This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved
by dividing
some current ASoC structures that contain both driver data and
device data into
structures that only either contain device data or driver data. i.e.
....
+#ifdef POWER_OFF_ON_STANDBY
+ .set_bias_level = uda134x_set_bias_level,
+#endif
.....


Maybe merge problem? So the correct solution would be remove define completely
as you suggested.
>

regards,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

2011-05-03 12:10:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.

On Tue, May 03, 2011 at 01:56:29PM +0200, Belisko Marek wrote:

> OK after more digging in file history find commit where define was removed:

So it looks like the define should just go...