From ff84dd87c366b46daa703b939e8ffb6dd1ff5532 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Tue, 29 May 2012 19:58:22 +0800 Subject: [PATCH] fix compiler warnings and add calling adjust volume code --- sound/soc/codecs/aic326x_tiload.c | 4 ++-- sound/soc/codecs/aic3xxx_cfw_ops.c | 8 +++++--- sound/soc/codecs/aic3xxx_cfw_ops.h | 2 +- sound/soc/codecs/tlv320aic326x.c | 3 +++ sound/soc/codecs/tlv320aic326x.h | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) mode change 100644 => 100755 sound/soc/codecs/tlv320aic326x.c diff --git a/sound/soc/codecs/aic326x_tiload.c b/sound/soc/codecs/aic326x_tiload.c index df1581e2a1f4..07733d08c106 100644 --- a/sound/soc/codecs/aic326x_tiload.c +++ b/sound/soc/codecs/aic326x_tiload.c @@ -269,10 +269,10 @@ static ssize_t tiload_write(struct file *file, const char __user * buf, } -static int tiload_ioctl(struct file *filp, +static long tiload_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { - int num = 0; + long num = 0; void __user *argp = (void __user *)arg; if (_IOC_TYPE(cmd) != aic3262_IOC_MAGIC) return -ENOTTY; diff --git a/sound/soc/codecs/aic3xxx_cfw_ops.c b/sound/soc/codecs/aic3xxx_cfw_ops.c index ca1cddb944a5..168defe5baca 100644 --- a/sound/soc/codecs/aic3xxx_cfw_ops.c +++ b/sound/soc/codecs/aic3xxx_cfw_ops.c @@ -92,12 +92,14 @@ int aic3xxx_cfw_setmode_cfg(void *pv, int mode, int cfg) cfw_state *ps = pv; cfw_project *pjt = ps->pjt; int which = 0; - + cfw_pfw *pfw; + cfw_image *im; + if (mode >= pjt->nmode) return -1; if (pjt->mode[mode]->pfw < pjt->npfw) { // New mode uses miniDSP // FIXME: Add support for entry and exit sequences - cfw_pfw *pfw = pjt->pfw[pjt->mode[mode]->pfw]; + pfw = pjt->pfw[pjt->mode[mode]->pfw]; // Make sure cfg is valid and supported in this mode if (cfg >= pfw->ncfg || !(pjt->mode[mode]->supported_cfgs&(1u<base; + im = pfw->base; if (im->block[CFW_BLOCK_A_INST]) which |= AIC3XX_COPS_MDSP_A; if (im->block[CFW_BLOCK_D_INST]) diff --git a/sound/soc/codecs/aic3xxx_cfw_ops.h b/sound/soc/codecs/aic3xxx_cfw_ops.h index 82ca5f2a2527..a9306f7438b4 100644 --- a/sound/soc/codecs/aic3xxx_cfw_ops.h +++ b/sound/soc/codecs/aic3xxx_cfw_ops.h @@ -29,7 +29,7 @@ int aic3xxx_cfw_set_pll(void *pv, int asi); typedef struct aic3xxx_codec_ops { int (*reg_read)(void *p, unsigned int reg); int (*reg_write)(void *p, unsigned int reg, - unsigned int val); + unsigned char val); int (*set_bits)(void *p, unsigned int reg, unsigned char mask, unsigned char val); int (*bulk_read)(void *p, unsigned int reg, diff --git a/sound/soc/codecs/tlv320aic326x.c b/sound/soc/codecs/tlv320aic326x.c old mode 100644 new mode 100755 index bffb7e1f74c5..ce91b343a992 --- a/sound/soc/codecs/tlv320aic326x.c +++ b/sound/soc/codecs/tlv320aic326x.c @@ -262,10 +262,13 @@ static const struct snd_kcontrol_new aic3262_snd_controls[] = { #endif /*HP Driver Gain Control*/ SOC_DOUBLE_R_SX_TLV("HeadPhone Driver Amplifier Volume", AIC3262_HPL_VOL, AIC3262_HPR_VOL, 6, 0xffffffb9, 0xffffffce, output_gain_tlv), + SOC_DOUBLE_R_SX_TLV("Headphone Volume", AIC3262_HPL_VOL, AIC3262_HPR_VOL, 6, 0xffffffb9, 0xffffffce, output_gain_tlv), /*LO Driver Gain Control*/ SOC_DOUBLE_TLV("Speaker Amplifier Volume", AIC3262_SPK_AMP_CNTL_R4, 4, 0, 5, 0, spk_gain_tlv), + SOC_DOUBLE_TLV("Speaker Volume", AIC3262_SPK_AMP_CNTL_R4, 4, 0, 5, 0, spk_gain_tlv), SOC_DOUBLE_R_SX_TLV("Receiver Amplifier Volume", AIC3262_REC_AMP_CNTL_R5, AIC3262_RAMPR_VOL, 6, 0xffffffb9, 0xffffffd6, output_gain_tlv), + SOC_DOUBLE_R_SX_TLV("Earpiece Volume", AIC3262_REC_AMP_CNTL_R5, AIC3262_RAMPR_VOL, 6, 0xffffffb9, 0xffffffd6, output_gain_tlv), SOC_DOUBLE_R_SX_TLV("PCM Capture Volume", AIC3262_LADC_VOL, AIC3262_RADC_VOL, 7,0xffffff68, 0xffffffa8, adc_vol_tlv), diff --git a/sound/soc/codecs/tlv320aic326x.h b/sound/soc/codecs/tlv320aic326x.h index 00b34121afc8..9ca6c8f6060a 100644 --- a/sound/soc/codecs/tlv320aic326x.h +++ b/sound/soc/codecs/tlv320aic326x.h @@ -173,7 +173,7 @@ struct aic3262_priv { struct aic3262_pdata *pdata; int mute_asi; // Bit 0 -> ASI1, Bit 1-> ASI2, Bit 2 -> ASI3 int dsp_runstate; - struct firmware *cur_fw; + const struct firmware *cur_fw; int isdefault_fw; }; /*struct aic3262_configs { -- 2.34.1