mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
fix compiler warnings and add calling adjust volume code
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<<cfg)))
|
||||
@@ -109,7 +111,7 @@ int aic3xxx_cfw_setmode_cfg(void *pv, int mode, int cfg)
|
||||
* where the base PFW uses both miniDSPs where a particular
|
||||
* overlay applies only to one
|
||||
*/
|
||||
cfw_image *im = pfw->base;
|
||||
im = pfw->base;
|
||||
if (im->block[CFW_BLOCK_A_INST])
|
||||
which |= AIC3XX_COPS_MDSP_A;
|
||||
if (im->block[CFW_BLOCK_D_INST])
|
||||
|
||||
@@ -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,
|
||||
|
||||
3
sound/soc/codecs/tlv320aic326x.c
Normal file → Executable file
3
sound/soc/codecs/tlv320aic326x.c
Normal file → Executable file
@@ -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),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user