From 401de8184a4d94688962b9258fe10ab309ffda9c Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Fri, 13 Nov 2009 16:02:56 +0900 Subject: ALSA: ice1712: Use bitrev8 Signed-off-by: Akinobu Mita Signed-off-by: Takashi Iwai --- sound/i2c/cs8427.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'sound/i2c') 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; -- cgit v1.1 From 1233faa891451dee9eaddd7f8a616ba1ddd77919 Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Fri, 27 Nov 2009 18:19:28 +0100 Subject: ALSA: tea575x-tuner: fix mute Fix mute state reporting in tea575x-tuner. This fixes mute function in kradio on SF64-PCR radio card. Signed-off-by: Ondrej Zary Signed-off-by: Takashi Iwai --- sound/i2c/other/tea575x-tuner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/i2c') diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index d31c373..c4c6ef7 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c @@ -225,7 +225,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, case V4L2_CID_AUDIO_MUTE: if (tea->ops->mute) { tea->ops->mute(tea, ctrl->value); - tea->mute = 1; + tea->mute = ctrl->value; return 0; } } -- cgit v1.1