Skip to content

Commit ba6271e

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Add mic-boost controls to ALC662/663 auto configuration ALSA: hda - Fix ALC663 auto-probe ALSA: ASoC: fix pxa2xx-i2s clk_get call ALSA: hda: Distortion fix for dell_m6_core_init
2 parents 99039e1 + ee979a1 commit ba6271e

3 files changed

Lines changed: 65 additions & 3 deletions

File tree

‎sound/pci/hda/patch_realtek.c‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14066,6 +14066,13 @@ static struct hda_verb alc662_auto_init_verbs[] = {
1406614066
{ }
1406714067
};
1406814068

14069+
/* additional verbs for ALC663 */
14070+
static struct hda_verb alc663_auto_init_verbs[] = {
14071+
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
14072+
{0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
14073+
{ }
14074+
};
14075+
1406914076
static struct hda_verb alc663_m51va_init_verbs[] = {
1407014077
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1407114078
{0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -14594,6 +14601,14 @@ static int alc662_auto_create_extra_out(struct alc_spec *spec, hda_nid_t pin,
1459414601
if (!pin)
1459514602
return 0;
1459614603

14604+
if (pin == 0x17) {
14605+
/* ALC663 has a mono output pin on 0x17 */
14606+
sprintf(name, "%s Playback Switch", pfx);
14607+
err = add_control(spec, ALC_CTL_WIDGET_MUTE, name,
14608+
HDA_COMPOSE_AMP_VAL(pin, 2, 0, HDA_OUTPUT));
14609+
return err;
14610+
}
14611+
1459714612
if (alc880_is_fixed_pin(pin)) {
1459814613
nid = alc880_idx_to_dac(alc880_fixed_pin_idx(pin));
1459914614
/* printk("DAC nid=%x\n",nid); */
@@ -14764,6 +14779,14 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
1476414779
spec->input_mux = &spec->private_imux;
1476514780

1476614781
spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
14782+
if (codec->vendor_id == 0x10ec0663)
14783+
spec->init_verbs[spec->num_init_verbs++] =
14784+
alc663_auto_init_verbs;
14785+
14786+
err = alc_auto_add_mic_boost(codec);
14787+
if (err < 0)
14788+
return err;
14789+
1476714790
spec->mixers[spec->num_mixers] = alc662_capture_mixer;
1476814791
spec->num_mixers++;
1476914792
return 1;

‎sound/pci/hda/patch_sigmatel.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,9 @@ static struct hda_verb dell_eq_core_init[] = {
560560
};
561561

562562
static struct hda_verb dell_m6_core_init[] = {
563-
/* set master volume and direct control */
564-
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
563+
/* set master volume to max value without distortion
564+
* and direct control */
565+
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
565566
/* setup audio connections */
566567
{ 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
567568
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},

‎sound/soc/pxa/pxa2xx-i2s.c‎

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/device.h>
1717
#include <linux/delay.h>
1818
#include <linux/clk.h>
19+
#include <linux/platform_device.h>
1920
#include <sound/core.h>
2021
#include <sound/pcm.h>
2122
#include <sound/initval.h>
@@ -81,7 +82,6 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream)
8182
struct snd_soc_pcm_runtime *rtd = substream->private_data;
8283
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
8384

84-
clk_i2s = clk_get(NULL, "I2SCLK");
8585
if (IS_ERR(clk_i2s))
8686
return PTR_ERR(clk_i2s);
8787

@@ -152,6 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
152152
pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
153153
pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
154154
pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
155+
BUG_ON(IS_ERR(clk_i2s));
155156
clk_enable(clk_i2s);
156157
pxa_i2s_wait();
157158

@@ -317,6 +318,43 @@ struct snd_soc_dai pxa_i2s_dai = {
317318

318319
EXPORT_SYMBOL_GPL(pxa_i2s_dai);
319320

321+
static int pxa2xx_i2s_probe(struct platform_device *dev)
322+
{
323+
clk_i2s = clk_get(&dev->dev, "I2SCLK");
324+
return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0;
325+
}
326+
327+
static int __devexit pxa2xx_i2s_remove(struct platform_device *dev)
328+
{
329+
clk_put(clk_i2s);
330+
clk_i2s = ERR_PTR(-ENOENT);
331+
return 0;
332+
}
333+
334+
static struct platform_driver pxa2xx_i2s_driver = {
335+
.probe = pxa2xx_i2s_probe,
336+
.remove = __devexit_p(pxa2xx_i2s_remove),
337+
338+
.driver = {
339+
.name = "pxa2xx-i2s",
340+
.owner = THIS_MODULE,
341+
},
342+
};
343+
344+
static int __init pxa2xx_i2s_init(void)
345+
{
346+
clk_i2s = ERR_PTR(-ENOENT);
347+
return platform_driver_register(&pxa2xx_i2s_driver);
348+
}
349+
350+
static void __exit pxa2xx_i2s_exit(void)
351+
{
352+
platform_driver_unregister(&pxa2xx_i2s_driver);
353+
}
354+
355+
module_init(pxa2xx_i2s_init);
356+
module_exit(pxa2xx_i2s_exit);
357+
320358
/* Module information */
321359
MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
322360
MODULE_DESCRIPTION("pxa2xx I2S SoC Interface");

0 commit comments

Comments
 (0)