From: Takashi Iwai Subject: Re: [PATCH] ice1712: Use bitrev8 Date: Fri, 13 Nov 2009 08:41:25 +0100 Message-ID: References: <1258095776-13259-1-git-send-email-akinobu.mita@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 875C4103803 for ; Fri, 13 Nov 2009 08:41:25 +0100 (CET) In-Reply-To: <1258095776-13259-1-git-send-email-akinobu.mita@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Akinobu Mita Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 13 Nov 2009 16:02:56 +0900, Akinobu Mita wrote: > > Signed-off-by: Akinobu Mita > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: alsa-devel@alsa-project.org Applied now. Thanks! Takashi > --- > sound/i2c/cs8427.c | 15 ++------------- > sound/pci/Kconfig | 1 + > 2 files changed, 3 insertions(+), 13 deletions(-) > > diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c > index 020a5d5..04ae870 100644 > --- a/sound/i2c/cs8427.c > +++ b/sound/i2c/cs8427.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -55,18 +56,6 @@ struct cs8427 { > struct cs8427_stream capture; > }; > > -static unsigned char swapbits(unsigned char val) > -{ > - int bit; > - unsigned char res = 0; > - for (bit = 0; bit < 8; bit++) { > - res <<= 1; > - res |= val & 1; > - val >>= 1; > - } > - return res; > -} > - > int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, > unsigned char val) > { > @@ -149,7 +138,7 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, > } > data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; > for (idx = 0; idx < count; idx++) > - data[idx + 1] = swapbits(ndata[idx]); > + data[idx + 1] = bitrev8(ndata[idx]); > if (snd_i2c_sendbytes(device, data, count + 1) != count + 1) > return -EIO; > return 1; > diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig > index 75c602b..351654c 100644 > --- a/sound/pci/Kconfig > +++ b/sound/pci/Kconfig > @@ -570,6 +570,7 @@ config SND_ICE1712 > tristate "ICEnsemble ICE1712 (Envy24)" > select SND_MPU401_UART > select SND_AC97_CODEC > + select BITREVERSE > help > Say Y here to include support for soundcards based on the > ICE1712 (Envy24) chip. > -- > 1.6.5.1 >