rk2928: fix audio codec register operation error.
authorZheng Yang <zhengyang@rock-chips.com>
Mon, 30 Jul 2012 07:43:22 +0000 (15:43 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Mon, 30 Jul 2012 07:43:22 +0000 (15:43 +0800)
sound/soc/codecs/rk2928_codec.c
sound/soc/rk29/rk2928-card.c

index 57086b8ec23727576ec6b45e392d461675b58d82..e877ae2e6e73fca7936e14b485c4a8bd891dfdf9 100755 (executable)
@@ -79,13 +79,13 @@ void codec_set_spk(bool on)
 
 static unsigned int rk2928_read(struct snd_soc_codec *codec, unsigned int reg)
 {      
-       return readl(rk2928_data.regbase + reg);
+       return readl(rk2928_data.regbase + reg*4);
 }
 
 static int rk2928_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value)
 {
        DBG("%s reg 0x%02x value 0x%02x", __FUNCTION__, reg, value);
-       writel(value, rk2928_data.regbase + reg);
+       writel(value, rk2928_data.regbase + reg*4);
        return 0;
 }
 
index 185d8ea1567d0708a53aa35d44e0b3308c3d7df0..8d08942bd86d5cc68c87916bfe3e670152e294db 100755 (executable)
@@ -110,7 +110,7 @@ static struct snd_soc_dai_link rk2928_dai[] = {
                .stream_name = "RK2928",
                .cpu_dai_name = "rk29_i2s.0",
                .platform_name = "rockchip-audio",
-               .codec_name = "rk2928-codec.0-0001",
+               .codec_name = "rk2928-codec",
                .codec_dai_name = "rk2928-codec",
                .ops = &rk2928_dai_ops,
        },