Re: [PATCH v2 3/7] ASoC: pcm512x: Change register default to match actual content after reset

2015-01-28 Thread Mark Brown
On Wed, Jan 28, 2015 at 03:16:08PM +0100, Peter Rosin wrote:

> @@ -78,7 +78,7 @@ static const struct reg_default pcm512x_reg_defaults[] = {
>   { PCM512x_DIGITAL_VOLUME_2,  0x30 },
>   { PCM512x_DIGITAL_VOLUME_3,  0x30 },
>   { PCM512x_DIGITAL_MUTE_1,0x22 },
> - { PCM512x_DIGITAL_MUTE_2,0x00 },
> + { PCM512x_DIGITAL_MUTE_2,0x02 },

The datasheet claims these have undefined values as reserved bits - what
would be a more robust change here would be to remove the register
default entirely so that we take the value the hardware has, giving
robustness against any hardware revisions.  Of course the device has
rather a lot of such reserved bits which is unfortunate.


signature.asc
Description: Digital signature


[PATCH v2 3/7] ASoC: pcm512x: Change register default to match actual content after reset

2015-01-28 Thread Peter Rosin
From: Peter Rosin 

Signed-off-by: Peter Rosin 
---
 sound/soc/codecs/pcm512x.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c
index 874723c36d65..4c65eb9ab59b 100644
--- a/sound/soc/codecs/pcm512x.c
+++ b/sound/soc/codecs/pcm512x.c
@@ -78,7 +78,7 @@ static const struct reg_default pcm512x_reg_defaults[] = {
{ PCM512x_DIGITAL_VOLUME_2,  0x30 },
{ PCM512x_DIGITAL_VOLUME_3,  0x30 },
{ PCM512x_DIGITAL_MUTE_1,0x22 },
-   { PCM512x_DIGITAL_MUTE_2,0x00 },
+   { PCM512x_DIGITAL_MUTE_2,0x02 },
{ PCM512x_DIGITAL_MUTE_3,0x07 },
{ PCM512x_OUTPUT_AMPLITUDE,  0x00 },
{ PCM512x_ANALOG_GAIN_CTRL,  0x00 },
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 3/7] ASoC: pcm512x: Change register default to match actual content after reset

2015-01-28 Thread Peter Rosin
Hi Mark,

First of all, thanks for taking the rest of the series!

Mark Brown wrote:
> On Wed, Jan 28, 2015 at 03:16:08PM +0100, Peter Rosin wrote:
> 
> > @@ -78,7 +78,7 @@ static const struct reg_default
> pcm512x_reg_defaults[] = {
> > { PCM512x_DIGITAL_VOLUME_2,  0x30 },
> > { PCM512x_DIGITAL_VOLUME_3,  0x30 },
> > { PCM512x_DIGITAL_MUTE_1,0x22 },
> > -   { PCM512x_DIGITAL_MUTE_2,0x00 },
> > +   { PCM512x_DIGITAL_MUTE_2,0x02 },
> 
> The datasheet claims these have undefined values as reserved bits - what
> would be a more robust change here would be to remove the register
> default entirely so that we take the value the hardware has, giving
> robustness against any hardware revisions.  Of course the device has rather a
> lot of such reserved bits which is unfortunate.

Given the incompleteness of the datasheets this might be safest; a lot
of the reserved areas appear to have undocumented functions. But it
works as is of course, so it is not high priority... I don't know what happens
when this particular bit is cleared, but it doesn't change anything for the
pcm5142 that I am able to detect. So, no real problem with dropping 3/7.

Cheers,
Peter

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html