Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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:
ASoC: imx-ssi: do not call hrtimer_disable in trigger function
ALSA: hda - Add position_fix quirk for Biostar mobo
ALSA: hda - add a quirk for Clevo M570U laptop
ASoC: imx-ssi: increase minimum periods to 4
ALSA: hda - Avoid invalid "Independent HP" control for VIA codecs
ALSA: hda - Fix control element allocations in VIA codec parser
ALSA: aaci - Fix alignment faults on ARM Cortex introduced by commit 29a4f2d3
ALSA: hda - Add fix-up for Sony VAIO with ALC269
ALSA: hda - Enhance fix-up table for Realtek codecs
ALSA: usb - Fix Oops after usb-midi disconnection
ALSA: hda - Fix initial capture source connections of ALC880/260
ALSA: hda - Fix setup for ALC269vb amic and dmic models
ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21
ASoC: imx-ssi: Use a hrtimer in FIQ mode
ASoC: imx-pcm-dma-mx2: restart DMA after an error
ASoC: imx-ssi: honor IMX_SSI_DMA flag
ASoC: wm2000: remove unused #include <linux/version.h>
ALSA: hda: Add support for Medion WIM2160

+254 -77
+5 -2
sound/arm/aaci.c
··· 863 863 struct snd_ac97 *ac97; 864 864 int ret; 865 865 866 - writel(0, aaci->base + AC97_POWERDOWN); 867 866 /* 868 867 * Assert AACIRESET for 2us 869 868 */ ··· 1046 1047 1047 1048 writel(0x1fff, aaci->base + AACI_INTCLR); 1048 1049 writel(aaci->maincr, aaci->base + AACI_MAINCR); 1049 - 1050 + /* 1051 + * Fix: ac97 read back fail errors by reading 1052 + * from any arbitrary aaci register. 1053 + */ 1054 + readl(aaci->base + AACI_CSCH1); 1050 1055 ret = aaci_probe_ac97(aaci); 1051 1056 if (ret) 1052 1057 goto out;
+1
sound/pci/hda/hda_intel.c
··· 2272 2272 SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), 2273 2273 SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), 2274 2274 SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), 2275 + SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB), 2275 2276 SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), 2276 2277 {} 2277 2278 };
+161 -23
sound/pci/hda/patch_realtek.c
··· 230 230 ALC888_ACER_ASPIRE_7730G, 231 231 ALC883_MEDION, 232 232 ALC883_MEDION_MD2, 233 + ALC883_MEDION_WIM2160, 233 234 ALC883_LAPTOP_EAPD, 234 235 ALC883_LENOVO_101E_2ch, 235 236 ALC883_LENOVO_NB0763, ··· 1390 1389 1391 1390 static void alc_pick_fixup(struct hda_codec *codec, 1392 1391 const struct snd_pci_quirk *quirk, 1393 - const struct alc_fixup *fix) 1392 + const struct alc_fixup *fix, 1393 + int pre_init) 1394 1394 { 1395 1395 const struct alc_pincfg *cfg; 1396 1396 1397 1397 quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); 1398 1398 if (!quirk) 1399 1399 return; 1400 - 1401 1400 fix += quirk->value; 1402 1401 cfg = fix->pins; 1403 - if (cfg) { 1402 + if (pre_init && cfg) { 1403 + #ifdef CONFIG_SND_DEBUG_VERBOSE 1404 + snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n", 1405 + codec->chip_name, quirk->name); 1406 + #endif 1404 1407 for (; cfg->nid; cfg++) 1405 1408 snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); 1406 1409 } 1407 - if (fix->verbs) 1410 + if (!pre_init && fix->verbs) { 1411 + #ifdef CONFIG_SND_DEBUG_VERBOSE 1412 + snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n", 1413 + codec->chip_name, quirk->name); 1414 + #endif 1408 1415 add_verb(codec->spec, fix->verbs); 1416 + } 1409 1417 } 1410 1418 1411 1419 static int alc_read_coef_idx(struct hda_codec *codec, ··· 4818 4808 } 4819 4809 } 4820 4810 4811 + static void alc880_auto_init_input_src(struct hda_codec *codec) 4812 + { 4813 + struct alc_spec *spec = codec->spec; 4814 + int c; 4815 + 4816 + for (c = 0; c < spec->num_adc_nids; c++) { 4817 + unsigned int mux_idx; 4818 + const struct hda_input_mux *imux; 4819 + mux_idx = c >= spec->num_mux_defs ? 0 : c; 4820 + imux = &spec->input_mux[mux_idx]; 4821 + if (!imux->num_items && mux_idx > 0) 4822 + imux = &spec->input_mux[0]; 4823 + if (imux) 4824 + snd_hda_codec_write(codec, spec->adc_nids[c], 0, 4825 + AC_VERB_SET_CONNECT_SEL, 4826 + imux->items[0].index); 4827 + } 4828 + } 4829 + 4821 4830 /* parse the BIOS configuration and set up the alc_spec */ 4822 4831 /* return 1 if successful, 0 if the proper config is not found, 4823 4832 * or a negative error code ··· 4915 4886 alc880_auto_init_multi_out(codec); 4916 4887 alc880_auto_init_extra_out(codec); 4917 4888 alc880_auto_init_analog_input(codec); 4889 + alc880_auto_init_input_src(codec); 4918 4890 if (spec->unsol_event) 4919 4891 alc_inithook(codec); 4920 4892 } ··· 6427 6397 } 6428 6398 } 6429 6399 6400 + #define alc260_auto_init_input_src alc880_auto_init_input_src 6401 + 6430 6402 /* 6431 6403 * generic initialization of ADC, input mixers and output mixers 6432 6404 */ ··· 6515 6483 struct alc_spec *spec = codec->spec; 6516 6484 alc260_auto_init_multi_out(codec); 6517 6485 alc260_auto_init_analog_input(codec); 6486 + alc260_auto_init_input_src(codec); 6518 6487 if (spec->unsol_event) 6519 6488 alc_inithook(codec); 6520 6489 } ··· 8488 8455 { } /* end */ 8489 8456 }; 8490 8457 8458 + static struct snd_kcontrol_new alc883_medion_wim2160_mixer[] = { 8459 + HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 8460 + HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 8461 + HDA_CODEC_MUTE("Speaker Playback Switch", 0x15, 0x0, HDA_OUTPUT), 8462 + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT), 8463 + HDA_CODEC_VOLUME("Line Playback Volume", 0x08, 0x0, HDA_INPUT), 8464 + HDA_CODEC_MUTE("Line Playback Switch", 0x08, 0x0, HDA_INPUT), 8465 + { } /* end */ 8466 + }; 8467 + 8468 + static struct hda_verb alc883_medion_wim2160_verbs[] = { 8469 + /* Unmute front mixer */ 8470 + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 8471 + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, 8472 + 8473 + /* Set speaker pin to front mixer */ 8474 + {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 8475 + 8476 + /* Init headphone pin */ 8477 + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 8478 + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 8479 + {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00}, 8480 + {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, 8481 + 8482 + { } /* end */ 8483 + }; 8484 + 8485 + /* toggle speaker-output according to the hp-jack state */ 8486 + static void alc883_medion_wim2160_setup(struct hda_codec *codec) 8487 + { 8488 + struct alc_spec *spec = codec->spec; 8489 + 8490 + spec->autocfg.hp_pins[0] = 0x1a; 8491 + spec->autocfg.speaker_pins[0] = 0x15; 8492 + } 8493 + 8491 8494 static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { 8492 8495 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 8493 8496 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), ··· 9233 9164 [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", 9234 9165 [ALC883_MEDION] = "medion", 9235 9166 [ALC883_MEDION_MD2] = "medion-md2", 9167 + [ALC883_MEDION_WIM2160] = "medion-wim2160", 9236 9168 [ALC883_LAPTOP_EAPD] = "laptop-eapd", 9237 9169 [ALC883_LENOVO_101E_2ch] = "lenovo-101e", 9238 9170 [ALC883_LENOVO_NB0763] = "lenovo-nb0763", ··· 9350 9280 SND_PCI_QUIRK(0x1462, 0xaa08, "MSI", ALC883_TARGA_2ch_DIG), 9351 9281 9352 9282 SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), 9283 + SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG), 9353 9284 SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720), 9354 9285 SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720), 9355 9286 SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R), ··· 9887 9816 .input_mux = &alc883_capture_source, 9888 9817 .unsol_event = alc_automute_amp_unsol_event, 9889 9818 .setup = alc883_medion_md2_setup, 9819 + .init_hook = alc_automute_amp, 9820 + }, 9821 + [ALC883_MEDION_WIM2160] = { 9822 + .mixers = { alc883_medion_wim2160_mixer }, 9823 + .init_verbs = { alc883_init_verbs, alc883_medion_wim2160_verbs }, 9824 + .num_dacs = ARRAY_SIZE(alc883_dac_nids), 9825 + .dac_nids = alc883_dac_nids, 9826 + .dig_out_nid = ALC883_DIGOUT_NID, 9827 + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), 9828 + .adc_nids = alc883_adc_nids, 9829 + .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), 9830 + .channel_mode = alc883_3ST_2ch_modes, 9831 + .input_mux = &alc883_capture_source, 9832 + .unsol_event = alc_automute_amp_unsol_event, 9833 + .setup = alc883_medion_wim2160_setup, 9890 9834 .init_hook = alc_automute_amp, 9891 9835 }, 9892 9836 [ALC883_LAPTOP_EAPD] = { ··· 10449 10363 board_config = ALC882_AUTO; 10450 10364 } 10451 10365 10452 - alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups); 10366 + if (board_config == ALC882_AUTO) 10367 + alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 1); 10453 10368 10454 10369 if (board_config == ALC882_AUTO) { 10455 10370 /* automatic parse from the BIOS config */ ··· 10522 10435 10523 10436 set_capture_mixer(codec); 10524 10437 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 10438 + 10439 + if (board_config == ALC882_AUTO) 10440 + alc_pick_fixup(codec, alc882_fixup_tbl, alc882_fixups, 0); 10525 10441 10526 10442 spec->vmaster_nid = 0x0c; 10527 10443 ··· 12906 12816 dac = 0x02; 12907 12817 break; 12908 12818 case 0x15: 12819 + case 0x21: /* ALC269vb has this pin, too */ 12909 12820 dac = 0x03; 12910 12821 break; 12911 12822 default: ··· 13826 13735 } 13827 13736 } 13828 13737 13738 + static void alc269_laptop_amic_setup(struct hda_codec *codec) 13739 + { 13740 + struct alc_spec *spec = codec->spec; 13741 + spec->autocfg.hp_pins[0] = 0x15; 13742 + spec->autocfg.speaker_pins[0] = 0x14; 13743 + spec->ext_mic.pin = 0x18; 13744 + spec->ext_mic.mux_idx = 0; 13745 + spec->int_mic.pin = 0x19; 13746 + spec->int_mic.mux_idx = 1; 13747 + spec->auto_mic = 1; 13748 + } 13749 + 13829 13750 static void alc269_laptop_dmic_setup(struct hda_codec *codec) 13830 13751 { 13831 13752 struct alc_spec *spec = codec->spec; ··· 13850 13747 spec->auto_mic = 1; 13851 13748 } 13852 13749 13853 - static void alc269vb_laptop_dmic_setup(struct hda_codec *codec) 13750 + static void alc269vb_laptop_amic_setup(struct hda_codec *codec) 13854 13751 { 13855 13752 struct alc_spec *spec = codec->spec; 13856 - spec->autocfg.hp_pins[0] = 0x15; 13857 - spec->autocfg.speaker_pins[0] = 0x14; 13858 - spec->ext_mic.pin = 0x18; 13859 - spec->ext_mic.mux_idx = 0; 13860 - spec->int_mic.pin = 0x12; 13861 - spec->int_mic.mux_idx = 6; 13862 - spec->auto_mic = 1; 13863 - } 13864 - 13865 - static void alc269_laptop_amic_setup(struct hda_codec *codec) 13866 - { 13867 - struct alc_spec *spec = codec->spec; 13868 - spec->autocfg.hp_pins[0] = 0x15; 13753 + spec->autocfg.hp_pins[0] = 0x21; 13869 13754 spec->autocfg.speaker_pins[0] = 0x14; 13870 13755 spec->ext_mic.pin = 0x18; 13871 13756 spec->ext_mic.mux_idx = 0; 13872 13757 spec->int_mic.pin = 0x19; 13873 13758 spec->int_mic.mux_idx = 1; 13759 + spec->auto_mic = 1; 13760 + } 13761 + 13762 + static void alc269vb_laptop_dmic_setup(struct hda_codec *codec) 13763 + { 13764 + struct alc_spec *spec = codec->spec; 13765 + spec->autocfg.hp_pins[0] = 0x21; 13766 + spec->autocfg.speaker_pins[0] = 0x14; 13767 + spec->ext_mic.pin = 0x18; 13768 + spec->ext_mic.mux_idx = 0; 13769 + spec->int_mic.pin = 0x12; 13770 + spec->int_mic.mux_idx = 6; 13874 13771 spec->auto_mic = 1; 13875 13772 } 13876 13773 ··· 14078 13975 alc_inithook(codec); 14079 13976 } 14080 13977 13978 + enum { 13979 + ALC269_FIXUP_SONY_VAIO, 13980 + }; 13981 + 13982 + const static struct hda_verb alc269_sony_vaio_fixup_verbs[] = { 13983 + {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD}, 13984 + {} 13985 + }; 13986 + 13987 + static const struct alc_fixup alc269_fixups[] = { 13988 + [ALC269_FIXUP_SONY_VAIO] = { 13989 + .verbs = alc269_sony_vaio_fixup_verbs 13990 + }, 13991 + }; 13992 + 13993 + static struct snd_pci_quirk alc269_fixup_tbl[] = { 13994 + SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 13995 + {} 13996 + }; 13997 + 13998 + 14081 13999 /* 14082 14000 * configuration and preset 14083 14001 */ ··· 14158 14034 ALC269_DMIC), 14159 14035 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_DMIC), 14160 14036 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_DMIC), 14161 - SND_PCI_QUIRK(0x104d, 0x9071, "SONY XTB", ALC269_DMIC), 14037 + SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_AUTO), 14162 14038 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK), 14163 14039 SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC), 14164 14040 SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU), ··· 14232 14108 .num_channel_mode = ARRAY_SIZE(alc269_modes), 14233 14109 .channel_mode = alc269_modes, 14234 14110 .unsol_event = alc269_laptop_unsol_event, 14235 - .setup = alc269_laptop_amic_setup, 14111 + .setup = alc269vb_laptop_amic_setup, 14236 14112 .init_hook = alc269_laptop_inithook, 14237 14113 }, 14238 14114 [ALC269VB_DMIC] = { ··· 14312 14188 board_config = ALC269_AUTO; 14313 14189 } 14314 14190 14191 + if (board_config == ALC269_AUTO) 14192 + alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 1); 14193 + 14315 14194 if (board_config == ALC269_AUTO) { 14316 14195 /* automatic parse from the BIOS config */ 14317 14196 err = alc269_parse_auto_config(codec); ··· 14366 14239 if (!spec->cap_mixer) 14367 14240 set_capture_mixer(codec); 14368 14241 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 14242 + 14243 + if (board_config == ALC269_AUTO) 14244 + alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 0); 14369 14245 14370 14246 spec->vmaster_nid = 0x02; 14371 14247 ··· 15458 15328 board_config = ALC861_AUTO; 15459 15329 } 15460 15330 15461 - alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups); 15331 + if (board_config == ALC861_AUTO) 15332 + alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 1); 15462 15333 15463 15334 if (board_config == ALC861_AUTO) { 15464 15335 /* automatic parse from the BIOS config */ ··· 15495 15364 set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); 15496 15365 15497 15366 spec->vmaster_nid = 0x03; 15367 + 15368 + if (board_config == ALC861_AUTO) 15369 + alc_pick_fixup(codec, alc861_fixup_tbl, alc861_fixups, 0); 15498 15370 15499 15371 codec->patch_ops = alc_patch_ops; 15500 15372 if (board_config == ALC861_AUTO) { ··· 16433 16299 board_config = ALC861VD_AUTO; 16434 16300 } 16435 16301 16436 - alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups); 16302 + if (board_config == ALC861VD_AUTO) 16303 + alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 1); 16437 16304 16438 16305 if (board_config == ALC861VD_AUTO) { 16439 16306 /* automatic parse from the BIOS config */ ··· 16481 16346 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 16482 16347 16483 16348 spec->vmaster_nid = 0x02; 16349 + 16350 + if (board_config == ALC861VD_AUTO) 16351 + alc_pick_fixup(codec, alc861vd_fixup_tbl, alc861vd_fixups, 0); 16484 16352 16485 16353 codec->patch_ops = alc_patch_ops; 16486 16354
+24 -17
sound/pci/hda/patch_via.c
··· 476 476 knew->name = kstrdup(tmpl->name, GFP_KERNEL); 477 477 if (!knew->name) 478 478 return NULL; 479 - return 0; 479 + return knew; 480 480 } 481 481 482 482 static void via_free_kctls(struct hda_codec *codec) ··· 1215 1215 }, 1216 1216 }; 1217 1217 1218 - static int via_hp_build(struct via_spec *spec) 1218 + static int via_hp_build(struct hda_codec *codec) 1219 1219 { 1220 + struct via_spec *spec = codec->spec; 1220 1221 struct snd_kcontrol_new *knew; 1221 1222 hda_nid_t nid; 1222 - 1223 - knew = via_clone_control(spec, &via_hp_mixer[0]); 1224 - if (knew == NULL) 1225 - return -ENOMEM; 1223 + int nums; 1224 + hda_nid_t conn[HDA_MAX_CONNECTIONS]; 1226 1225 1227 1226 switch (spec->codec_type) { 1228 1227 case VT1718S: ··· 1237 1238 nid = spec->autocfg.hp_pins[0]; 1238 1239 break; 1239 1240 } 1241 + 1242 + nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS); 1243 + if (nums <= 1) 1244 + return 0; 1245 + 1246 + knew = via_clone_control(spec, &via_hp_mixer[0]); 1247 + if (knew == NULL) 1248 + return -ENOMEM; 1240 1249 1241 1250 knew->subdevice = HDA_SUBDEV_NID_FLAG | nid; 1242 1251 knew->private_value = nid; ··· 2568 2561 spec->input_mux = &spec->private_imux[0]; 2569 2562 2570 2563 if (spec->hp_mux) 2571 - via_hp_build(spec); 2564 + via_hp_build(codec); 2572 2565 2573 2566 via_smart51_build(spec); 2574 2567 return 1; ··· 3094 3087 spec->input_mux = &spec->private_imux[0]; 3095 3088 3096 3089 if (spec->hp_mux) 3097 - via_hp_build(spec); 3090 + via_hp_build(codec); 3098 3091 3099 3092 via_smart51_build(spec); 3100 3093 return 1; ··· 3661 3654 spec->input_mux = &spec->private_imux[0]; 3662 3655 3663 3656 if (spec->hp_mux) 3664 - via_hp_build(spec); 3657 + via_hp_build(codec); 3665 3658 3666 3659 via_smart51_build(spec); 3667 3660 return 1; ··· 4147 4140 spec->input_mux = &spec->private_imux[0]; 4148 4141 4149 4142 if (spec->hp_mux) 4150 - via_hp_build(spec); 4143 + via_hp_build(codec); 4151 4144 4152 4145 via_smart51_build(spec); 4153 4146 return 1; ··· 4517 4510 spec->input_mux = &spec->private_imux[0]; 4518 4511 4519 4512 if (spec->hp_mux) 4520 - via_hp_build(spec); 4513 + via_hp_build(codec); 4521 4514 4522 4515 return 1; 4523 4516 } ··· 4937 4930 spec->input_mux = &spec->private_imux[0]; 4938 4931 4939 4932 if (spec->hp_mux) 4940 - via_hp_build(spec); 4933 + via_hp_build(codec); 4941 4934 4942 4935 via_smart51_build(spec); 4943 4936 ··· 5432 5425 spec->input_mux = &spec->private_imux[0]; 5433 5426 5434 5427 if (spec->hp_mux) 5435 - via_hp_build(spec); 5428 + via_hp_build(codec); 5436 5429 5437 5430 via_smart51_build(spec); 5438 5431 ··· 5788 5781 spec->input_mux = &spec->private_imux[0]; 5789 5782 5790 5783 if (spec->hp_mux) 5791 - via_hp_build(spec); 5784 + via_hp_build(codec); 5792 5785 5793 5786 return 1; 5794 5787 } ··· 6007 6000 6008 6001 /* Line-Out: PortE */ 6009 6002 err = via_add_control(spec, VIA_CTL_WIDGET_VOL, 6010 - "Master Front Playback Volume", 6003 + "Front Playback Volume", 6011 6004 HDA_COMPOSE_AMP_VAL(0x8, 3, 0, HDA_OUTPUT)); 6012 6005 if (err < 0) 6013 6006 return err; 6014 6007 err = via_add_control(spec, VIA_CTL_WIDGET_BIND_PIN_MUTE, 6015 - "Master Front Playback Switch", 6008 + "Front Playback Switch", 6016 6009 HDA_COMPOSE_AMP_VAL(0x28, 3, 0, HDA_OUTPUT)); 6017 6010 if (err < 0) 6018 6011 return err; ··· 6137 6130 spec->input_mux = &spec->private_imux[0]; 6138 6131 6139 6132 if (spec->hp_mux) 6140 - via_hp_build(spec); 6133 + via_hp_build(codec); 6141 6134 6142 6135 return 1; 6143 6136 }
-1
sound/soc/codecs/wm2000.c
··· 23 23 24 24 #include <linux/module.h> 25 25 #include <linux/moduleparam.h> 26 - #include <linux/version.h> 27 26 #include <linux/kernel.h> 28 27 #include <linux/init.h> 29 28 #include <linux/firmware.h>
+14 -1
sound/soc/imx/imx-pcm-dma-mx2.c
··· 71 71 72 72 static void snd_imx_dma_err_callback(int channel, void *data, int err) 73 73 { 74 - pr_err("DMA error callback called\n"); 74 + struct snd_pcm_substream *substream = data; 75 + struct snd_soc_pcm_runtime *rtd = substream->private_data; 76 + struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; 77 + struct snd_pcm_runtime *runtime = substream->runtime; 78 + struct imx_pcm_runtime_data *iprtd = runtime->private_data; 79 + int ret; 75 80 76 81 pr_err("DMA timeout on channel %d -%s%s%s%s\n", 77 82 channel, ··· 84 79 err & IMX_DMA_ERR_REQUEST ? " request" : "", 85 80 err & IMX_DMA_ERR_TRANSFER ? " transfer" : "", 86 81 err & IMX_DMA_ERR_BUFFER ? " buffer" : ""); 82 + 83 + imx_dma_disable(iprtd->dma); 84 + ret = imx_dma_setup_sg(iprtd->dma, iprtd->sg_list, iprtd->sg_count, 85 + IMX_DMA_LENGTH_LOOP, dma_params->dma_addr, 86 + substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 87 + DMA_MODE_WRITE : DMA_MODE_READ); 88 + if (!ret) 89 + imx_dma_enable(iprtd->dma); 87 90 } 88 91 89 92 static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream)
+29 -26
sound/soc/imx/imx-pcm-fiq.c
··· 39 39 unsigned long offset; 40 40 unsigned long last_offset; 41 41 unsigned long size; 42 - struct timer_list timer; 43 - int poll_time; 42 + struct hrtimer hrt; 43 + int poll_time_ns; 44 + struct snd_pcm_substream *substream; 45 + atomic_t running; 44 46 }; 45 47 46 - static inline void imx_ssi_set_next_poll(struct imx_pcm_runtime_data *iprtd) 48 + static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt) 47 49 { 48 - iprtd->timer.expires = jiffies + iprtd->poll_time; 49 - } 50 - 51 - static void imx_ssi_timer_callback(unsigned long data) 52 - { 53 - struct snd_pcm_substream *substream = (void *)data; 50 + struct imx_pcm_runtime_data *iprtd = 51 + container_of(hrt, struct imx_pcm_runtime_data, hrt); 52 + struct snd_pcm_substream *substream = iprtd->substream; 54 53 struct snd_pcm_runtime *runtime = substream->runtime; 55 - struct imx_pcm_runtime_data *iprtd = runtime->private_data; 56 54 struct pt_regs regs; 57 55 unsigned long delta; 56 + 57 + if (!atomic_read(&iprtd->running)) 58 + return HRTIMER_NORESTART; 58 59 59 60 get_fiq_regs(&regs); 60 61 ··· 73 72 74 73 /* If we've transferred at least a period then report it and 75 74 * reset our poll time */ 76 - if (delta >= runtime->period_size) { 75 + if (delta >= iprtd->period) { 77 76 snd_pcm_period_elapsed(substream); 78 77 iprtd->last_offset = iprtd->offset; 79 - 80 - imx_ssi_set_next_poll(iprtd); 81 78 } 82 79 83 - /* Restart the timer; if we didn't report we'll run on the next tick */ 84 - add_timer(&iprtd->timer); 80 + hrtimer_forward_now(hrt, ns_to_ktime(iprtd->poll_time_ns)); 85 81 82 + return HRTIMER_RESTART; 86 83 } 87 84 88 85 static struct fiq_handler fh = { ··· 98 99 iprtd->period = params_period_bytes(params) ; 99 100 iprtd->offset = 0; 100 101 iprtd->last_offset = 0; 101 - iprtd->poll_time = HZ / (params_rate(params) / params_period_size(params)); 102 - 102 + iprtd->poll_time_ns = 1000000000 / params_rate(params) * 103 + params_period_size(params); 103 104 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); 104 105 105 106 return 0; ··· 134 135 case SNDRV_PCM_TRIGGER_START: 135 136 case SNDRV_PCM_TRIGGER_RESUME: 136 137 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 137 - imx_ssi_set_next_poll(iprtd); 138 - add_timer(&iprtd->timer); 138 + atomic_set(&iprtd->running, 1); 139 + hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns), 140 + HRTIMER_MODE_REL); 139 141 if (++fiq_enable == 1) 140 142 enable_fiq(imx_pcm_fiq); 141 143 ··· 145 145 case SNDRV_PCM_TRIGGER_STOP: 146 146 case SNDRV_PCM_TRIGGER_SUSPEND: 147 147 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 148 - del_timer(&iprtd->timer); 148 + atomic_set(&iprtd->running, 0); 149 + 149 150 if (--fiq_enable == 0) 150 151 disable_fiq(imx_pcm_fiq); 151 - 152 152 153 153 break; 154 154 default: ··· 180 180 .buffer_bytes_max = IMX_SSI_DMABUF_SIZE, 181 181 .period_bytes_min = 128, 182 182 .period_bytes_max = 16 * 1024, 183 - .periods_min = 2, 183 + .periods_min = 4, 184 184 .periods_max = 255, 185 185 .fifo_size = 0, 186 186 }; ··· 194 194 iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); 195 195 runtime->private_data = iprtd; 196 196 197 - init_timer(&iprtd->timer); 198 - iprtd->timer.data = (unsigned long)substream; 199 - iprtd->timer.function = imx_ssi_timer_callback; 197 + iprtd->substream = substream; 198 + 199 + atomic_set(&iprtd->running, 0); 200 + hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 201 + iprtd->hrt.function = snd_hrtimer_callback; 200 202 201 203 ret = snd_pcm_hw_constraint_integer(substream->runtime, 202 204 SNDRV_PCM_HW_PARAM_PERIODS); ··· 214 212 struct snd_pcm_runtime *runtime = substream->runtime; 215 213 struct imx_pcm_runtime_data *iprtd = runtime->private_data; 216 214 217 - del_timer_sync(&iprtd->timer); 215 + hrtimer_cancel(&iprtd->hrt); 216 + 218 217 kfree(iprtd); 219 218 220 219 return 0;
+2 -1
sound/soc/imx/imx-ssi.c
··· 656 656 dai->private_data = ssi; 657 657 658 658 if ((cpu_is_mx27() || cpu_is_mx21()) && 659 - !(ssi->flags & IMX_SSI_USE_AC97)) { 659 + !(ssi->flags & IMX_SSI_USE_AC97) && 660 + (ssi->flags & IMX_SSI_DMA)) { 660 661 ssi->flags |= IMX_SSI_DMA; 661 662 platform = imx_ssi_dma_mx2_init(pdev, ssi); 662 663 } else
+18 -6
sound/usb/usbmidi.c
··· 986 986 DEFINE_WAIT(wait); 987 987 long timeout = msecs_to_jiffies(50); 988 988 989 + if (ep->umidi->disconnected) 990 + return; 989 991 /* 990 992 * The substream buffer is empty, but some data might still be in the 991 993 * currently active URBs, so we have to wait for those to complete. ··· 1125 1123 * Frees an output endpoint. 1126 1124 * May be called when ep hasn't been initialized completely. 1127 1125 */ 1128 - static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint* ep) 1126 + static void snd_usbmidi_out_endpoint_clear(struct snd_usb_midi_out_endpoint *ep) 1129 1127 { 1130 1128 unsigned int i; 1131 1129 1132 1130 for (i = 0; i < OUTPUT_URBS; ++i) 1133 - if (ep->urbs[i].urb) 1131 + if (ep->urbs[i].urb) { 1134 1132 free_urb_and_buffer(ep->umidi, ep->urbs[i].urb, 1135 1133 ep->max_transfer); 1134 + ep->urbs[i].urb = NULL; 1135 + } 1136 + } 1137 + 1138 + static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint *ep) 1139 + { 1140 + snd_usbmidi_out_endpoint_clear(ep); 1136 1141 kfree(ep); 1137 1142 } 1138 1143 ··· 1271 1262 usb_kill_urb(ep->out->urbs[j].urb); 1272 1263 if (umidi->usb_protocol_ops->finish_out_endpoint) 1273 1264 umidi->usb_protocol_ops->finish_out_endpoint(ep->out); 1265 + ep->out->active_urbs = 0; 1266 + if (ep->out->drain_urbs) { 1267 + ep->out->drain_urbs = 0; 1268 + wake_up(&ep->out->drain_wait); 1269 + } 1274 1270 } 1275 1271 if (ep->in) 1276 1272 for (j = 0; j < INPUT_URBS; ++j) 1277 1273 usb_kill_urb(ep->in->urbs[j]); 1278 1274 /* free endpoints here; later call can result in Oops */ 1279 - if (ep->out) { 1280 - snd_usbmidi_out_endpoint_delete(ep->out); 1281 - ep->out = NULL; 1282 - } 1275 + if (ep->out) 1276 + snd_usbmidi_out_endpoint_clear(ep->out); 1283 1277 if (ep->in) { 1284 1278 snd_usbmidi_in_endpoint_delete(ep->in); 1285 1279 ep->in = NULL;