public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
@ 2011-05-03  9:32 Marek Belisko
  2011-05-03 10:00 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Belisko @ 2011-05-03  9:32 UTC (permalink / raw)
  To: tiwai, perex; +Cc: linux-kernel, alsa-devel, lrg, broonie, Marek Belisko

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 <marek.belisko@open-nandra.com>
---
 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


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

* Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
  2011-05-03  9:32 [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define Marek Belisko
@ 2011-05-03 10:00 ` Mark Brown
  2011-05-03 11:09   ` Belisko Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2011-05-03 10:00 UTC (permalink / raw)
  To: Marek Belisko; +Cc: tiwai, perex, linux-kernel, alsa-devel, lrg

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?

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

* Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
  2011-05-03 10:00 ` Mark Brown
@ 2011-05-03 11:09   ` Belisko Marek
  2011-05-03 11:23     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Belisko Marek @ 2011-05-03 11:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, perex, linux-kernel, alsa-devel, lrg

On Tue, May 3, 2011 at 12:00 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> 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

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

* Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
  2011-05-03 11:09   ` Belisko Marek
@ 2011-05-03 11:23     ` Mark Brown
  2011-05-03 11:56       ` Belisko Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2011-05-03 11:23 UTC (permalink / raw)
  To: Belisko Marek; +Cc: tiwai, perex, linux-kernel, alsa-devel, lrg

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.

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

* Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
  2011-05-03 11:23     ` Mark Brown
@ 2011-05-03 11:56       ` Belisko Marek
  2011-05-03 12:10         ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Belisko Marek @ 2011-05-03 11:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, perex, linux-kernel, alsa-devel, lrg

On Tue, May 3, 2011 at 1:23 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> 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 <vzapolskiy@gmail.com>
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 <vzapolskiy@gmail.com>
    Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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 <lrg@slimlogic.co.uk>
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

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

* Re: [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define.
  2011-05-03 11:56       ` Belisko Marek
@ 2011-05-03 12:10         ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-05-03 12:10 UTC (permalink / raw)
  To: Belisko Marek; +Cc: tiwai, perex, linux-kernel, alsa-devel, lrg

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...

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

end of thread, other threads:[~2011-05-03 12:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03  9:32 [PATCH] SOC: UDA134x: Enable POWER_OFF_ON_STANDBY define Marek Belisko
2011-05-03 10:00 ` Mark Brown
2011-05-03 11:09   ` Belisko Marek
2011-05-03 11:23     ` Mark Brown
2011-05-03 11:56       ` Belisko Marek
2011-05-03 12:10         ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox