diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-08 15:03:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-08 15:03:21 -0400 |
commit | a888f96a154b70804c5b29ee02e4d3bda6d55e56 (patch) | |
tree | ae94ee4623ad10de2d42e6610dfd0b76692017d3 | |
parent | 1c6e6d91b22c4271e8a5dab559a08cb005a77073 (diff) | |
parent | 378e869fd0ef75fa85a5e3df56a58e74e77d04c9 (diff) |
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: ice1724: increase SPDIF and independent stereo buffer sizes
ALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off()
ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER to PCM type
ALSA: hda - Fix yet another auto-mic bug in ALC268
ASoC: WM8350 capture PGA mutes are inverted
ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
sound: via82xx: move DXS volume controls to PCM interface
ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
ALSA: hda - Add a workaround for ASUS A7K
ALSA: hda - Fix invalid initializations for ALC861 auto mode
ASoC: wm8940: Fix check on error code form snd_soc_codec_set_cache_io
ASoC: Fix SND_SOC_DAPM_LINE handling
-rw-r--r-- | sound/drivers/opl3/opl3_midi.c | 28 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 89 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 6 | ||||
-rw-r--r-- | sound/pci/via82xx.c | 27 | ||||
-rw-r--r-- | sound/soc/codecs/wm8350.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8940.c | 2 | ||||
-rw-r--r-- | sound/soc/imx/mxc-ssi.c | 8 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 5 |
9 files changed, 115 insertions, 56 deletions
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index 6e7d09ae0e82..7d722a025d0d 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c | |||
@@ -29,6 +29,8 @@ extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; | |||
29 | 29 | ||
30 | extern int use_internal_drums; | 30 | extern int use_internal_drums; |
31 | 31 | ||
32 | static void snd_opl3_note_off_unsafe(void *p, int note, int vel, | ||
33 | struct snd_midi_channel *chan); | ||
32 | /* | 34 | /* |
33 | * The next table looks magical, but it certainly is not. Its values have | 35 | * The next table looks magical, but it certainly is not. Its values have |
34 | * been calculated as table[i]=8*log(i/64)/log(2) with an obvious exception | 36 | * been calculated as table[i]=8*log(i/64)/log(2) with an obvious exception |
@@ -242,16 +244,20 @@ void snd_opl3_timer_func(unsigned long data) | |||
242 | int again = 0; | 244 | int again = 0; |
243 | int i; | 245 | int i; |
244 | 246 | ||
245 | spin_lock_irqsave(&opl3->sys_timer_lock, flags); | 247 | spin_lock_irqsave(&opl3->voice_lock, flags); |
246 | for (i = 0; i < opl3->max_voices; i++) { | 248 | for (i = 0; i < opl3->max_voices; i++) { |
247 | struct snd_opl3_voice *vp = &opl3->voices[i]; | 249 | struct snd_opl3_voice *vp = &opl3->voices[i]; |
248 | if (vp->state > 0 && vp->note_off_check) { | 250 | if (vp->state > 0 && vp->note_off_check) { |
249 | if (vp->note_off == jiffies) | 251 | if (vp->note_off == jiffies) |
250 | snd_opl3_note_off(opl3, vp->note, 0, vp->chan); | 252 | snd_opl3_note_off_unsafe(opl3, vp->note, 0, |
253 | vp->chan); | ||
251 | else | 254 | else |
252 | again++; | 255 | again++; |
253 | } | 256 | } |
254 | } | 257 | } |
258 | spin_unlock_irqrestore(&opl3->voice_lock, flags); | ||
259 | |||
260 | spin_lock_irqsave(&opl3->sys_timer_lock, flags); | ||
255 | if (again) { | 261 | if (again) { |
256 | opl3->tlist.expires = jiffies + 1; /* invoke again */ | 262 | opl3->tlist.expires = jiffies + 1; /* invoke again */ |
257 | add_timer(&opl3->tlist); | 263 | add_timer(&opl3->tlist); |
@@ -658,15 +664,14 @@ static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice) | |||
658 | /* | 664 | /* |
659 | * Release a note in response to a midi note off. | 665 | * Release a note in response to a midi note off. |
660 | */ | 666 | */ |
661 | void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan) | 667 | static void snd_opl3_note_off_unsafe(void *p, int note, int vel, |
668 | struct snd_midi_channel *chan) | ||
662 | { | 669 | { |
663 | struct snd_opl3 *opl3; | 670 | struct snd_opl3 *opl3; |
664 | 671 | ||
665 | int voice; | 672 | int voice; |
666 | struct snd_opl3_voice *vp; | 673 | struct snd_opl3_voice *vp; |
667 | 674 | ||
668 | unsigned long flags; | ||
669 | |||
670 | opl3 = p; | 675 | opl3 = p; |
671 | 676 | ||
672 | #ifdef DEBUG_MIDI | 677 | #ifdef DEBUG_MIDI |
@@ -674,12 +679,9 @@ void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan | |||
674 | chan->number, chan->midi_program, note); | 679 | chan->number, chan->midi_program, note); |
675 | #endif | 680 | #endif |
676 | 681 | ||
677 | spin_lock_irqsave(&opl3->voice_lock, flags); | ||
678 | |||
679 | if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) { | 682 | if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) { |
680 | if (chan->drum_channel && use_internal_drums) { | 683 | if (chan->drum_channel && use_internal_drums) { |
681 | snd_opl3_drum_switch(opl3, note, vel, 0, chan); | 684 | snd_opl3_drum_switch(opl3, note, vel, 0, chan); |
682 | spin_unlock_irqrestore(&opl3->voice_lock, flags); | ||
683 | return; | 685 | return; |
684 | } | 686 | } |
685 | /* this loop will hopefully kill all extra voices, because | 687 | /* this loop will hopefully kill all extra voices, because |
@@ -697,6 +699,16 @@ void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan | |||
697 | snd_opl3_kill_voice(opl3, voice); | 699 | snd_opl3_kill_voice(opl3, voice); |
698 | } | 700 | } |
699 | } | 701 | } |
702 | } | ||
703 | |||
704 | void snd_opl3_note_off(void *p, int note, int vel, | ||
705 | struct snd_midi_channel *chan) | ||
706 | { | ||
707 | struct snd_opl3 *opl3 = p; | ||
708 | unsigned long flags; | ||
709 | |||
710 | spin_lock_irqsave(&opl3->voice_lock, flags); | ||
711 | snd_opl3_note_off_unsafe(p, note, vel, chan); | ||
700 | spin_unlock_irqrestore(&opl3->voice_lock, flags); | 712 | spin_unlock_irqrestore(&opl3->voice_lock, flags); |
701 | } | 713 | } |
702 | 714 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7810d3dcad83..470fd74a0a1a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1332,15 +1332,20 @@ do_sku: | |||
1332 | * when the external headphone out jack is plugged" | 1332 | * when the external headphone out jack is plugged" |
1333 | */ | 1333 | */ |
1334 | if (!spec->autocfg.hp_pins[0]) { | 1334 | if (!spec->autocfg.hp_pins[0]) { |
1335 | hda_nid_t nid; | ||
1335 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ | 1336 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ |
1336 | if (tmp == 0) | 1337 | if (tmp == 0) |
1337 | spec->autocfg.hp_pins[0] = porta; | 1338 | nid = porta; |
1338 | else if (tmp == 1) | 1339 | else if (tmp == 1) |
1339 | spec->autocfg.hp_pins[0] = porte; | 1340 | nid = porte; |
1340 | else if (tmp == 2) | 1341 | else if (tmp == 2) |
1341 | spec->autocfg.hp_pins[0] = portd; | 1342 | nid = portd; |
1342 | else | 1343 | else |
1343 | return 1; | 1344 | return 1; |
1345 | for (i = 0; i < spec->autocfg.line_outs; i++) | ||
1346 | if (spec->autocfg.line_out_pins[i] == nid) | ||
1347 | return 1; | ||
1348 | spec->autocfg.hp_pins[0] = nid; | ||
1344 | } | 1349 | } |
1345 | 1350 | ||
1346 | alc_init_auto_hp(codec); | 1351 | alc_init_auto_hp(codec); |
@@ -1362,7 +1367,7 @@ static void alc_ssid_check(struct hda_codec *codec, | |||
1362 | } | 1367 | } |
1363 | 1368 | ||
1364 | /* | 1369 | /* |
1365 | * Fix-up pin default configurations | 1370 | * Fix-up pin default configurations and add default verbs |
1366 | */ | 1371 | */ |
1367 | 1372 | ||
1368 | struct alc_pincfg { | 1373 | struct alc_pincfg { |
@@ -1370,9 +1375,14 @@ struct alc_pincfg { | |||
1370 | u32 val; | 1375 | u32 val; |
1371 | }; | 1376 | }; |
1372 | 1377 | ||
1373 | static void alc_fix_pincfg(struct hda_codec *codec, | 1378 | struct alc_fixup { |
1379 | const struct alc_pincfg *pins; | ||
1380 | const struct hda_verb *verbs; | ||
1381 | }; | ||
1382 | |||
1383 | static void alc_pick_fixup(struct hda_codec *codec, | ||
1374 | const struct snd_pci_quirk *quirk, | 1384 | const struct snd_pci_quirk *quirk, |
1375 | const struct alc_pincfg **pinfix) | 1385 | const struct alc_fixup *fix) |
1376 | { | 1386 | { |
1377 | const struct alc_pincfg *cfg; | 1387 | const struct alc_pincfg *cfg; |
1378 | 1388 | ||
@@ -1380,9 +1390,14 @@ static void alc_fix_pincfg(struct hda_codec *codec, | |||
1380 | if (!quirk) | 1390 | if (!quirk) |
1381 | return; | 1391 | return; |
1382 | 1392 | ||
1383 | cfg = pinfix[quirk->value]; | 1393 | fix += quirk->value; |
1384 | for (; cfg->nid; cfg++) | 1394 | cfg = fix->pins; |
1385 | snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); | 1395 | if (cfg) { |
1396 | for (; cfg->nid; cfg++) | ||
1397 | snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); | ||
1398 | } | ||
1399 | if (fix->verbs) | ||
1400 | add_verb(codec->spec, fix->verbs); | ||
1386 | } | 1401 | } |
1387 | 1402 | ||
1388 | /* | 1403 | /* |
@@ -9593,11 +9608,13 @@ static struct alc_pincfg alc882_abit_aw9d_pinfix[] = { | |||
9593 | { } | 9608 | { } |
9594 | }; | 9609 | }; |
9595 | 9610 | ||
9596 | static const struct alc_pincfg *alc882_pin_fixes[] = { | 9611 | static const struct alc_fixup alc882_fixups[] = { |
9597 | [PINFIX_ABIT_AW9D_MAX] = alc882_abit_aw9d_pinfix, | 9612 | [PINFIX_ABIT_AW9D_MAX] = { |
9613 | .pins = alc882_abit_aw9d_pinfix | ||
9614 | }, | ||
9598 | }; | 9615 | }; |
9599 | 9616 | ||
9600 | static struct snd_pci_quirk alc882_pinfix_tbl[] = { | 9617 | static struct snd_pci_quirk alc882_fixup_tbl[] = { |
9601 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), | 9618 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), |
9602 | {} | 9619 | {} |
9603 | }; | 9620 | }; |
@@ -9869,7 +9886,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
9869 | board_config = ALC882_AUTO; | 9886 | board_config = ALC882_AUTO; |
9870 | } | 9887 | } |
9871 | 9888 | ||
9872 | alc_fix_pincfg(codec, alc882_pinfix_tbl, alc882_pin_fixes); | 9889 | alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups); |
9873 | 9890 | ||
9874 | if (board_config == ALC882_AUTO) { | 9891 | if (board_config == ALC882_AUTO) { |
9875 | /* automatic parse from the BIOS config */ | 9892 | /* automatic parse from the BIOS config */ |
@@ -12842,12 +12859,15 @@ static int patch_alc268(struct hda_codec *codec) | |||
12842 | unsigned int wcap = get_wcaps(codec, 0x07); | 12859 | unsigned int wcap = get_wcaps(codec, 0x07); |
12843 | int i; | 12860 | int i; |
12844 | 12861 | ||
12862 | spec->capsrc_nids = alc268_capsrc_nids; | ||
12845 | /* get type */ | 12863 | /* get type */ |
12846 | wcap = get_wcaps_type(wcap); | 12864 | wcap = get_wcaps_type(wcap); |
12847 | if (spec->auto_mic || | 12865 | if (spec->auto_mic || |
12848 | wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) { | 12866 | wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) { |
12849 | spec->adc_nids = alc268_adc_nids_alt; | 12867 | spec->adc_nids = alc268_adc_nids_alt; |
12850 | spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt); | 12868 | spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt); |
12869 | if (spec->auto_mic) | ||
12870 | fixup_automic_adc(codec); | ||
12851 | if (spec->auto_mic || spec->input_mux->num_items == 1) | 12871 | if (spec->auto_mic || spec->input_mux->num_items == 1) |
12852 | add_mixer(spec, alc268_capture_nosrc_mixer); | 12872 | add_mixer(spec, alc268_capture_nosrc_mixer); |
12853 | else | 12873 | else |
@@ -12857,7 +12877,6 @@ static int patch_alc268(struct hda_codec *codec) | |||
12857 | spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids); | 12877 | spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids); |
12858 | add_mixer(spec, alc268_capture_mixer); | 12878 | add_mixer(spec, alc268_capture_mixer); |
12859 | } | 12879 | } |
12860 | spec->capsrc_nids = alc268_capsrc_nids; | ||
12861 | /* set default input source */ | 12880 | /* set default input source */ |
12862 | for (i = 0; i < spec->num_adc_nids; i++) | 12881 | for (i = 0; i < spec->num_adc_nids; i++) |
12863 | snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i], | 12882 | snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i], |
@@ -14357,15 +14376,16 @@ static void alc861_auto_init_multi_out(struct hda_codec *codec) | |||
14357 | static void alc861_auto_init_hp_out(struct hda_codec *codec) | 14376 | static void alc861_auto_init_hp_out(struct hda_codec *codec) |
14358 | { | 14377 | { |
14359 | struct alc_spec *spec = codec->spec; | 14378 | struct alc_spec *spec = codec->spec; |
14360 | hda_nid_t pin; | ||
14361 | 14379 | ||
14362 | pin = spec->autocfg.hp_pins[0]; | 14380 | if (spec->autocfg.hp_outs) |
14363 | if (pin) | 14381 | alc861_auto_set_output_and_unmute(codec, |
14364 | alc861_auto_set_output_and_unmute(codec, pin, PIN_HP, | 14382 | spec->autocfg.hp_pins[0], |
14383 | PIN_HP, | ||
14365 | spec->multiout.hp_nid); | 14384 | spec->multiout.hp_nid); |
14366 | pin = spec->autocfg.speaker_pins[0]; | 14385 | if (spec->autocfg.speaker_outs) |
14367 | if (pin) | 14386 | alc861_auto_set_output_and_unmute(codec, |
14368 | alc861_auto_set_output_and_unmute(codec, pin, PIN_OUT, | 14387 | spec->autocfg.speaker_pins[0], |
14388 | PIN_OUT, | ||
14369 | spec->multiout.dac_nids[0]); | 14389 | spec->multiout.dac_nids[0]); |
14370 | } | 14390 | } |
14371 | 14391 | ||
@@ -15158,7 +15178,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = { | |||
15158 | SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), | 15178 | SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), |
15159 | SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_HP), | 15179 | SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_HP), |
15160 | SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST), | 15180 | SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST), |
15161 | SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST), | 15181 | /*SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),*/ /* auto */ |
15162 | SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC660VD_ASUS_V1S), | 15182 | SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC660VD_ASUS_V1S), |
15163 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST_DIG), | 15183 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST_DIG), |
15164 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), | 15184 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), |
@@ -15551,6 +15571,29 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
15551 | alc_inithook(codec); | 15571 | alc_inithook(codec); |
15552 | } | 15572 | } |
15553 | 15573 | ||
15574 | enum { | ||
15575 | ALC660VD_FIX_ASUS_GPIO1 | ||
15576 | }; | ||
15577 | |||
15578 | /* reset GPIO1 */ | ||
15579 | static const struct hda_verb alc660vd_fix_asus_gpio1_verbs[] = { | ||
15580 | {0x01, AC_VERB_SET_GPIO_MASK, 0x03}, | ||
15581 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01}, | ||
15582 | {0x01, AC_VERB_SET_GPIO_DATA, 0x01}, | ||
15583 | { } | ||
15584 | }; | ||
15585 | |||
15586 | static const struct alc_fixup alc861vd_fixups[] = { | ||
15587 | [ALC660VD_FIX_ASUS_GPIO1] = { | ||
15588 | .verbs = alc660vd_fix_asus_gpio1_verbs, | ||
15589 | }, | ||
15590 | }; | ||
15591 | |||
15592 | static struct snd_pci_quirk alc861vd_fixup_tbl[] = { | ||
15593 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1), | ||
15594 | {} | ||
15595 | }; | ||
15596 | |||
15554 | static int patch_alc861vd(struct hda_codec *codec) | 15597 | static int patch_alc861vd(struct hda_codec *codec) |
15555 | { | 15598 | { |
15556 | struct alc_spec *spec; | 15599 | struct alc_spec *spec; |
@@ -15572,6 +15615,8 @@ static int patch_alc861vd(struct hda_codec *codec) | |||
15572 | board_config = ALC861VD_AUTO; | 15615 | board_config = ALC861VD_AUTO; |
15573 | } | 15616 | } |
15574 | 15617 | ||
15618 | alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups); | ||
15619 | |||
15575 | if (board_config == ALC861VD_AUTO) { | 15620 | if (board_config == ALC861VD_AUTO) { |
15576 | /* automatic parse from the BIOS config */ | 15621 | /* automatic parse from the BIOS config */ |
15577 | err = alc861vd_parse_auto_config(codec); | 15622 | err = alc861vd_parse_auto_config(codec); |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index cecf1ffeeaaa..d74033a2cfbe 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -2259,7 +2259,7 @@ static int snd_ice1712_pro_peak_get(struct snd_kcontrol *kcontrol, | |||
2259 | } | 2259 | } |
2260 | 2260 | ||
2261 | static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = { | 2261 | static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = { |
2262 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2262 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
2263 | .name = "Multi Track Peak", | 2263 | .name = "Multi Track Peak", |
2264 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 2264 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
2265 | .info = snd_ice1712_pro_peak_info, | 2265 | .info = snd_ice1712_pro_peak_info, |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index af6e00148621..76b717dae4b6 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -1294,7 +1294,7 @@ static int __devinit snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device) | |||
1294 | 1294 | ||
1295 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | 1295 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
1296 | snd_dma_pci_data(ice->pci), | 1296 | snd_dma_pci_data(ice->pci), |
1297 | 64*1024, 64*1024); | 1297 | 256*1024, 256*1024); |
1298 | 1298 | ||
1299 | ice->pcm = pcm; | 1299 | ice->pcm = pcm; |
1300 | 1300 | ||
@@ -1408,7 +1408,7 @@ static int __devinit snd_vt1724_pcm_indep(struct snd_ice1712 *ice, int device) | |||
1408 | 1408 | ||
1409 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | 1409 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
1410 | snd_dma_pci_data(ice->pci), | 1410 | snd_dma_pci_data(ice->pci), |
1411 | 64*1024, 64*1024); | 1411 | 256*1024, 256*1024); |
1412 | 1412 | ||
1413 | ice->pcm_ds = pcm; | 1413 | ice->pcm_ds = pcm; |
1414 | 1414 | ||
@@ -2110,7 +2110,7 @@ static int snd_vt1724_pro_peak_get(struct snd_kcontrol *kcontrol, | |||
2110 | } | 2110 | } |
2111 | 2111 | ||
2112 | static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = { | 2112 | static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = { |
2113 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2113 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
2114 | .name = "Multi Track Peak", | 2114 | .name = "Multi Track Peak", |
2115 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 2115 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
2116 | .info = snd_vt1724_pro_peak_info, | 2116 | .info = snd_vt1724_pro_peak_info, |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index acfa4760da49..91683a349035 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -1626,7 +1626,7 @@ static int snd_via8233_dxs_volume_get(struct snd_kcontrol *kcontrol, | |||
1626 | struct snd_ctl_elem_value *ucontrol) | 1626 | struct snd_ctl_elem_value *ucontrol) |
1627 | { | 1627 | { |
1628 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); | 1628 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); |
1629 | unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); | 1629 | unsigned int idx = kcontrol->id.subdevice; |
1630 | 1630 | ||
1631 | ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0]; | 1631 | ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0]; |
1632 | ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1]; | 1632 | ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1]; |
@@ -1646,7 +1646,7 @@ static int snd_via8233_dxs_volume_put(struct snd_kcontrol *kcontrol, | |||
1646 | struct snd_ctl_elem_value *ucontrol) | 1646 | struct snd_ctl_elem_value *ucontrol) |
1647 | { | 1647 | { |
1648 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); | 1648 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); |
1649 | unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); | 1649 | unsigned int idx = kcontrol->id.subdevice; |
1650 | unsigned long port = chip->port + 0x10 * idx; | 1650 | unsigned long port = chip->port + 0x10 * idx; |
1651 | unsigned char val; | 1651 | unsigned char val; |
1652 | int i, change = 0; | 1652 | int i, change = 0; |
@@ -1705,11 +1705,12 @@ static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = | |||
1705 | }; | 1705 | }; |
1706 | 1706 | ||
1707 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { | 1707 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { |
1708 | .name = "VIA DXS Playback Volume", | 1708 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
1709 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1709 | .device = 0, |
1710 | /* .subdevice set later */ | ||
1711 | .name = "PCM Playback Volume", | ||
1710 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | 1712 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | |
1711 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | 1713 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), |
1712 | .count = 4, | ||
1713 | .info = snd_via8233_dxs_volume_info, | 1714 | .info = snd_via8233_dxs_volume_info, |
1714 | .get = snd_via8233_dxs_volume_get, | 1715 | .get = snd_via8233_dxs_volume_get, |
1715 | .put = snd_via8233_dxs_volume_put, | 1716 | .put = snd_via8233_dxs_volume_put, |
@@ -1936,10 +1937,18 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip) | |||
1936 | } | 1937 | } |
1937 | else /* Using DXS when PCM emulation is enabled is really weird */ | 1938 | else /* Using DXS when PCM emulation is enabled is really weird */ |
1938 | { | 1939 | { |
1939 | /* Standalone DXS controls */ | 1940 | for (i = 0; i < 4; ++i) { |
1940 | err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip)); | 1941 | struct snd_kcontrol *kctl; |
1941 | if (err < 0) | 1942 | |
1942 | return err; | 1943 | kctl = snd_ctl_new1( |
1944 | &snd_via8233_dxs_volume_control, chip); | ||
1945 | if (!kctl) | ||
1946 | return -ENOMEM; | ||
1947 | kctl->id.subdevice = i; | ||
1948 | err = snd_ctl_add(chip->card, kctl); | ||
1949 | if (err < 0) | ||
1950 | return err; | ||
1951 | } | ||
1943 | } | 1952 | } |
1944 | } | 1953 | } |
1945 | /* select spdif data slot 10/11 */ | 1954 | /* select spdif data slot 10/11 */ |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 3ff0373dff89..593d5b9c9f03 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -579,7 +579,7 @@ static const struct snd_kcontrol_new wm8350_left_capt_mixer_controls[] = { | |||
579 | SOC_DAPM_SINGLE_TLV("L3 Capture Volume", | 579 | SOC_DAPM_SINGLE_TLV("L3 Capture Volume", |
580 | WM8350_INPUT_MIXER_VOLUME_L, 9, 7, 0, out_mix_tlv), | 580 | WM8350_INPUT_MIXER_VOLUME_L, 9, 7, 0, out_mix_tlv), |
581 | SOC_DAPM_SINGLE("PGA Capture Switch", | 581 | SOC_DAPM_SINGLE("PGA Capture Switch", |
582 | WM8350_LEFT_INPUT_VOLUME, 14, 1, 0), | 582 | WM8350_LEFT_INPUT_VOLUME, 14, 1, 1), |
583 | }; | 583 | }; |
584 | 584 | ||
585 | /* Right Input Mixer */ | 585 | /* Right Input Mixer */ |
@@ -589,7 +589,7 @@ static const struct snd_kcontrol_new wm8350_right_capt_mixer_controls[] = { | |||
589 | SOC_DAPM_SINGLE_TLV("L3 Capture Volume", | 589 | SOC_DAPM_SINGLE_TLV("L3 Capture Volume", |
590 | WM8350_INPUT_MIXER_VOLUME_R, 13, 7, 0, out_mix_tlv), | 590 | WM8350_INPUT_MIXER_VOLUME_R, 13, 7, 0, out_mix_tlv), |
591 | SOC_DAPM_SINGLE("PGA Capture Switch", | 591 | SOC_DAPM_SINGLE("PGA Capture Switch", |
592 | WM8350_RIGHT_INPUT_VOLUME, 14, 1, 0), | 592 | WM8350_RIGHT_INPUT_VOLUME, 14, 1, 1), |
593 | }; | 593 | }; |
594 | 594 | ||
595 | /* Left Mic Mixer */ | 595 | /* Left Mic Mixer */ |
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index da97aae475a2..1ef2454c5205 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -790,7 +790,7 @@ static int wm8940_register(struct wm8940_priv *wm8940, | |||
790 | codec->reg_cache = &wm8940->reg_cache; | 790 | codec->reg_cache = &wm8940->reg_cache; |
791 | 791 | ||
792 | ret = snd_soc_codec_set_cache_io(codec, 8, 16, control); | 792 | ret = snd_soc_codec_set_cache_io(codec, 8, 16, control); |
793 | if (ret == 0) { | 793 | if (ret < 0) { |
794 | dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); | 794 | dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); |
795 | return ret; | 795 | return ret; |
796 | } | 796 | } |
diff --git a/sound/soc/imx/mxc-ssi.c b/sound/soc/imx/mxc-ssi.c index 3806ff2c0cd4..ccdefe60e752 100644 --- a/sound/soc/imx/mxc-ssi.c +++ b/sound/soc/imx/mxc-ssi.c | |||
@@ -397,14 +397,6 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
397 | break; | 397 | break; |
398 | } | 398 | } |
399 | 399 | ||
400 | /* sync */ | ||
401 | if (!(fmt & SND_SOC_DAIFMT_ASYNC)) | ||
402 | scr |= SSI_SCR_SYN; | ||
403 | |||
404 | /* tdm - only for stereo atm */ | ||
405 | if (fmt & SND_SOC_DAIFMT_TDM) | ||
406 | scr |= SSI_SCR_NET; | ||
407 | |||
408 | if (cpu_dai->id == IMX_DAI_SSI0 || cpu_dai->id == IMX_DAI_SSI2) { | 400 | if (cpu_dai->id == IMX_DAI_SSI0 || cpu_dai->id == IMX_DAI_SSI2) { |
409 | SSI1_STCR = stcr; | 401 | SSI1_STCR = stcr; |
410 | SSI1_SRCR = srcr; | 402 | SSI1_SRCR = srcr; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f79711b9fa5b..8de6f9dec4a2 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -524,7 +524,7 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget) | |||
524 | 524 | ||
525 | /* connected jack or spk ? */ | 525 | /* connected jack or spk ? */ |
526 | if (widget->id == snd_soc_dapm_hp || widget->id == snd_soc_dapm_spk || | 526 | if (widget->id == snd_soc_dapm_hp || widget->id == snd_soc_dapm_spk || |
527 | widget->id == snd_soc_dapm_line) | 527 | (widget->id == snd_soc_dapm_line && !list_empty(&widget->sources))) |
528 | return 1; | 528 | return 1; |
529 | } | 529 | } |
530 | 530 | ||
@@ -573,7 +573,8 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget) | |||
573 | return 1; | 573 | return 1; |
574 | 574 | ||
575 | /* connected jack ? */ | 575 | /* connected jack ? */ |
576 | if (widget->id == snd_soc_dapm_mic || widget->id == snd_soc_dapm_line) | 576 | if (widget->id == snd_soc_dapm_mic || |
577 | (widget->id == snd_soc_dapm_line && !list_empty(&widget->sinks))) | ||
577 | return 1; | 578 | return 1; |
578 | } | 579 | } |
579 | 580 | ||