On Wed, Mar 17, 2010 at 05:34, <[email protected]> wrote: > Revision 8478 Author bhsong Date 2010-03-17 05:34:03 -0400 (Wed, 17 Mar > 2010) > > Log Message > > soc-cache: let reg be AND'ed by 0xff instead of data buffer for 8_8 mode > > The registers for AD193X are defined as 0x800-0x810 for spi which uses 16_8 > mode, > for i2c to support AD1937, we will use 8_8 mode, only the low byte of > 0x800-0x810 > is valid. > > > Modified: trunk/sound/soc/soc-cache.c (8477 => 8478) > > @@ -147,7 +147,8 @@ > > BUG_ON(codec->volatile_register); > > - data[0] = reg & 0xff; > + reg &= 0xff; > + data[0] = reg; > data[1] = value & 0xff; > > if (reg < codec->reg_cache_size) > @@ -163,8 +164,11 @@ > unsigned int reg) > { > u8 *cache = codec->reg_cache; > + > + reg &= 0xff; > if (reg >= codec->reg_cache_size) > return -1; > + > return cache[reg]; > }
these changes were merged upstream for snd_soc_8_8_write / snd_soc_8_8_read > @@ -174,6 +178,7 @@ > u16 *reg_cache = codec->reg_cache; > u8 data[3]; > > + reg &= 0xff; > data[0] = reg; > data[1] = (value >> 8) & 0xff; > data[2] = value & 0xff; but this one was not sent upstream for snd_soc_8_16_write. is it still necessary, or can it be dropped ? -mike _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
