All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt286: Correct default value
@ 2014-09-26  3:06 Bard Liao
  2014-09-26  3:06 ` [PATCH 2/2] ASoC: rt286: Fix sync function Bard Liao
  2014-09-26  8:14 ` [PATCH 1/2] ASoC: rt286: Correct default value Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Bard Liao @ 2014-09-26  3:06 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, Bard Liao, alsa-devel, lars, flove

This patch corrects some incorrect default value in the cache.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt286.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index e4f6102..7a66084 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -51,7 +51,7 @@ static struct reg_default rt286_index_def[] = {
 	{ 0x04, 0xaf01 },
 	{ 0x08, 0x000d },
 	{ 0x09, 0xd810 },
-	{ 0x0a, 0x0060 },
+	{ 0x0a, 0x0120 },
 	{ 0x0b, 0x0000 },
 	{ 0x0d, 0x2800 },
 	{ 0x0f, 0x0000 },
@@ -60,7 +60,7 @@ static struct reg_default rt286_index_def[] = {
 	{ 0x33, 0x0208 },
 	{ 0x49, 0x0004 },
 	{ 0x4f, 0x50e9 },
-	{ 0x50, 0x2c00 },
+	{ 0x50, 0x2000 },
 	{ 0x63, 0x2902 },
 	{ 0x67, 0x1111 },
 	{ 0x68, 0x1016 },
@@ -104,7 +104,6 @@ static const struct reg_default rt286_reg[] = {
 	{ 0x02170700, 0x00000000 },
 	{ 0x02270100, 0x00000000 },
 	{ 0x02370100, 0x00000000 },
-	{ 0x02040000, 0x00004002 },
 	{ 0x01870700, 0x00000020 },
 	{ 0x00830000, 0x000000c3 },
 	{ 0x00930000, 0x000000c3 },
-- 
1.8.1.1.439.g50a6b54

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

* [PATCH 2/2] ASoC: rt286: Fix sync function
  2014-09-26  3:06 [PATCH 1/2] ASoC: rt286: Correct default value Bard Liao
@ 2014-09-26  3:06 ` Bard Liao
  2014-09-26  8:14 ` [PATCH 1/2] ASoC: rt286: Correct default value Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Bard Liao @ 2014-09-26  3:06 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: oder_chiou, Bard Liao, alsa-devel, lars, flove

We try to write index registers into cache when we write an index
register, but we change the reg value before updating the cache.
As a result, the cache is never be updated. This patch will fix
this issue.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt286.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 7a66084..b86b426 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -191,7 +191,6 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
 	/*handle index registers*/
 	if (reg <= 0xff) {
 		rt286_hw_write(client, RT286_COEF_INDEX, reg);
-		reg = RT286_PROC_COEF;
 		for (i = 0; i < INDEX_CACHE_SIZE; i++) {
 			if (reg == rt286->index_cache[i].reg) {
 				rt286->index_cache[i].def = value;
@@ -199,6 +198,7 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
 			}
 
 		}
+		reg = RT286_PROC_COEF;
 	}
 
 	data[0] = (reg >> 24) & 0xff;
-- 
1.8.1.1.439.g50a6b54

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

* Re: [PATCH 1/2] ASoC: rt286: Correct default value
  2014-09-26  3:06 [PATCH 1/2] ASoC: rt286: Correct default value Bard Liao
  2014-09-26  3:06 ` [PATCH 2/2] ASoC: rt286: Fix sync function Bard Liao
@ 2014-09-26  8:14 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-09-26  8:14 UTC (permalink / raw)
  To: Bard Liao; +Cc: oder_chiou, alsa-devel, lars, lgirdwood, flove


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

On Fri, Sep 26, 2014 at 11:06:39AM +0800, Bard Liao wrote:
> This patch corrects some incorrect default value in the cache.

Applied both, thanks.

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

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



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

end of thread, other threads:[~2014-09-26  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26  3:06 [PATCH 1/2] ASoC: rt286: Correct default value Bard Liao
2014-09-26  3:06 ` [PATCH 2/2] ASoC: rt286: Fix sync function Bard Liao
2014-09-26  8:14 ` [PATCH 1/2] ASoC: rt286: Correct default value Mark Brown

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.