sound fixes for 3.12-rc4
Subsystems (4)
Linus,
please pull sound fixes for v3.12-rc4 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-3.12
The topmost commit is 4a4370442c996be0fd08234a167c8a127c2488bb
----------------------------------------------------------------
sound fixes for 3.12-rc4
All small, mostly driver-specific fixes: a few ASoC driver fixes (trivial stable fixes, sgtl5000 fixes), one DPCM fix, an old AC97 ID, and a fix for HD-audio Conexant GPIO.
----------------------------------------------------------------
Dan Carpenter (3):
ASoC: max98095: a couple array underflows
ASoC: ab8500-codec: info leak in anc_status_control_put()
ASoC: 88pm860x: array overflow in snd_soc_put_volsw_2r_st()
Liam Girdwood (1):
ASoC: core: Only add platform DAI widgets once.
Ondrej Zary (1):
ALSA: ac97: Add ID for TI TLV320AIC27 codec
Philipp Zabel (2):
ASoC: imx-sgtl5000: do not use devres on a foreign device
ASoC: imx-sgtl5000: Fix uninitialized pointer use in error path
Takashi Iwai (1):
ALSA: hda - Fix GPIO for Acer Aspire 3830TG
Valentin Ilie (1):
ASoC: blackfin: Add missing break statement to bf6xx
--- sound/pci/ac97/ac97_codec.c | 1 + sound/pci/hda/patch_conexant.c | 11 +++++++++++ sound/soc/blackfin/bf6xx-i2s.c | 1 + sound/soc/codecs/88pm860x-codec.c | 3 +++ sound/soc/codecs/ab8500-codec.c | 7 ++++++- sound/soc/codecs/max98095.c | 4 ++-- sound/soc/fsl/imx-sgtl5000.c | 7 +++++-- sound/soc/soc-core.c | 1 - 8 files changed, 29 insertions(+), 6 deletions(-)
sound/pci/ac97/ac97_codec.c +1 -0
@@ -175,6 +175,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] +{ 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL }, { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF
sound/pci/hda/patch_conexant.c +11 -0
@@ -3231,6 +3231,7 @@ enum {CXT_FIXUP_INC_MIC_BOOST ,CXT_FIXUP_HEADPHONE_MIC_PIN ,CXT_FIXUP_HEADPHONE_MIC , + CXT_FIXUP_GPIO1, }; static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
@@ -3375,6 +3376,15 @@ static const struct hda_fixup cxt_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = cxt_fixup_headphone_mic, }, + [CXT_FIXUP_GPIO1] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb []) { + {0x01 ,AC_VERB_SET_GPIO_MASK ,0x01 }, + {0x01 ,AC_VERB_SET_GPIO_DIRECTION ,0x01 }, + {0x01 ,AC_VERB_SET_GPIO_DATA ,0x01 }, + { } + }, + }, };static const struct snd_pci_quirk cxt5051_fixups[] = {
@@ -3384,6 +3394,7 @@ static const struct snd_pci_quirk cxt5051_fixups[] = {static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x1025 ,0x0543 ,"Acer Aspire One 522" ,CXT_FIXUP_STEREO_DMIC ), +SND_PCI_QUIRK (0x1025 ,0x054c ,"Acer Aspire 3830TG" ,CXT_FIXUP_GPIO1 ),SND_PCI_QUIRK (0x1043 ,0x138d ,"Asus" ,CXT_FIXUP_HEADPHONE_MIC_PIN ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Lenovo T400" ,CXT_PINCFG_LENOVO_TP410 ),SND_PCI_QUIRK (0x17aa ,0x215e ,"Lenovo T410" ,CXT_PINCFG_LENOVO_TP410 ),
sound/soc/blackfin/bf6xx-i2s.c +1 -0
@@ -88,6 +88,7 @@ static int bfin_i2s_hw_params(struct snd_pcm_substream *substream,case SNDRV_PCM_FORMAT_S8 : param.spctl |=0x70 ; sport->wdsize =1 ; +break ;case SNDRV_PCM_FORMAT_S16_LE : param.spctl |=0xf0 ; sport->wdsize =2 ;
sound/soc/codecs/88pm860x-codec.c +3 -0
@@ -349,6 +349,9 @@ static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol, val = ucontrol->value.integer.value[0 ]; val2 = ucontrol->value.integer.value[1 ]; +if (val >=ARRAY_SIZE (st_table) || val2 >=ARRAY_SIZE (st_table)) +return -EINVAL ; + err =snd_soc_update_bits (codec, reg,0x3f , st_table[val].m);if (err <0 )return err;
sound/soc/codecs/ab8500-codec.c +6 -1
@@ -1225,13 +1225,18 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol,struct ab8500_codec_drvdata *drvdata =dev_get_drvdata (codec->dev);struct device *dev = codec->dev;bool apply_fir, apply_iir; -int req, status; +unsigned int req; +int status;dev_dbg (dev,"%s: Enter.\n" , __func__);mutex_lock (&drvdata->anc_lock); req = ucontrol->value.integer.value[0 ]; +if (req >=ARRAY_SIZE (enum_anc_state)) { + status = -EINVAL ; + goto cleanup; + }if (req !=ANC_APPLY_FIR_IIR && req !=ANC_APPLY_FIR && req !=ANC_APPLY_IIR ) { dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n",
sound/soc/codecs/max98095.c +2 -2
@@ -1863,7 +1863,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,struct max98095_pdata *pdata = max98095->pdata;int channel =max98095_get_eq_channel (kcontrol->id.name);struct max98095_cdata *cdata; -int sel = ucontrol->value.integer.value[0 ]; +unsigned int sel = ucontrol->value.integer.value[0 ];struct max98095_eq_cfg *coef_set;int fs, best, best_val, i;int regmask, regsave;
@@ -2016,7 +2016,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,struct max98095_pdata *pdata = max98095->pdata;int channel =max98095_get_bq_channel (codec, kcontrol->id.name);struct max98095_cdata *cdata; -int sel = ucontrol->value.integer.value[0 ]; +unsigned int sel = ucontrol->value.integer.value[0 ];struct max98095_biquad_cfg *coef_set;int fs, best, best_val, i;int regmask, regsave;
sound/soc/fsl/imx-sgtl5000.c +5 -2
@@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)struct device_node *ssi_np, *codec_np;struct platform_device *ssi_pdev;struct i2c_client *codec_dev; -struct imx_sgtl5000_data *data; +struct imx_sgtl5000_data *data =NULL ;int int_port, ext_port;int ret;
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) goto fail; } - data->codec_clk =devm_clk_get (&codec_dev->dev,NULL ); + data->codec_clk =clk_get (&codec_dev->dev,NULL );if (IS_ERR (data->codec_clk)) { ret =PTR_ERR (data->codec_clk); goto fail;
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)return 0 ; fail: +if (data && !IS_ERR (data->codec_clk)) +clk_put (data->codec_clk);if (ssi_np)of_node_put (ssi_np);if (codec_np)
@@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev)struct imx_sgtl5000_data *data =platform_get_drvdata (pdev);snd_soc_unregister_card (&data->card); +clk_put (data->codec_clk);return 0 ; }
sound/soc/soc-core.c +0 -1
@@ -1380,7 +1380,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)return -ENODEV ;list_add (&cpu_dai->dapm.list, &card->dapm_list); -snd_soc_dapm_new_dai_widgets (&cpu_dai->dapm, cpu_dai); }if (cpu_dai->driver->probe) {