aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:14:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:14:39 -0400
commit8ac1c101ec73e60635257ed9af1c6ab423c535b4 (patch)
treeb01a39fb1ce34e82aeea255740a5ac7ae8fb62f1
parent0e9871df2389560e94ba01e40959140ee56def4b (diff)
parent672cc6c6c72673570b5ca44fe8a8b9ed604f5a4f (diff)
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: [ALSA] version 1.0.14 [ALSA] hda-codec - Fix STAC922x capture boost level [ALSA] hda-codec - Fix input with STAC92xx [ALSA] hda-codec - Fix pin configs for Gateway MX6453 [ALSA] hda-codec - Add support for MSI K9N Ultra [ALSA] hda-codec - Add quirk for Supermicro PDSBA to alc883_cfg_tbl[] [ALSA] hda-codec - Add quirk for MSI S420 [ALSA] Fix ASoC s3c24xx-pcm spinlock bug [ALSA] hda-intel: fix ASUS M2V detection [ALSA] ali5451 - Fix possible NULL dereference [ALSA] hda-codec - Add support for ASUS A8J modem [ALSA] HDA: Fix headphone mute issue on non-eapd Conexant systems [ALSA] HDA: Add more systems to Sigmatel codec [ALSA] HDA: Add support for Gateway NX860
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--include/sound/version.h4
-rw-r--r--sound/pci/ali5451/ali5451.c6
-rw-r--r--sound/pci/hda/hda_codec.c13
-rw-r--r--sound/pci/hda/hda_local.h2
-rw-r--r--sound/pci/hda/patch_conexant.c48
-rw-r--r--sound/pci/hda/patch_realtek.c5
-rw-r--r--sound/pci/hda/patch_si3054.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c64
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c2
10 files changed, 136 insertions, 11 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 57b878cc393c..355ff0a2bb7c 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
917 ref Reference board, base config 917 ref Reference board, base config
918 m2-2 Some Gateway MX series laptops 918 m2-2 Some Gateway MX series laptops
919 m6 Some Gateway NX series laptops 919 m6 Some Gateway NX series laptops
920 pa6 Gateway NX860 series
920 921
921 STAC9227/9228/9229/927x 922 STAC9227/9228/9229/927x
922 ref Reference board 923 ref Reference board
diff --git a/include/sound/version.h b/include/sound/version.h
index 50ee4fd420fa..8e5b2f0f5946 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h. Generated by alsa/ksync script. */ 1/* include/version.h. Generated by alsa/ksync script. */
2#define CONFIG_SND_VERSION "1.0.14rc4" 2#define CONFIG_SND_VERSION "1.0.14"
3#define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)" 3#define CONFIG_SND_DATE " (Thu May 31 09:03:25 2007 UTC)"
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index e1ed59549c50..cb59f994c68f 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1250,7 +1250,7 @@ static int snd_ali_playback_hw_params(struct snd_pcm_substream *substream,
1250 evoice->substream = substream; 1250 evoice->substream = substream;
1251 } 1251 }
1252 } else { 1252 } else {
1253 if (!evoice) { 1253 if (evoice) {
1254 snd_ali_free_voice(codec, evoice); 1254 snd_ali_free_voice(codec, evoice);
1255 pvoice->extra = evoice = NULL; 1255 pvoice->extra = evoice = NULL;
1256 } 1256 }
@@ -1267,7 +1267,7 @@ static int snd_ali_playback_hw_free(struct snd_pcm_substream *substream)
1267 struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; 1267 struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL;
1268 1268
1269 snd_pcm_lib_free_pages(substream); 1269 snd_pcm_lib_free_pages(substream);
1270 if (!evoice) { 1270 if (evoice) {
1271 snd_ali_free_voice(codec, evoice); 1271 snd_ali_free_voice(codec, evoice);
1272 pvoice->extra = NULL; 1272 pvoice->extra = NULL;
1273 } 1273 }
@@ -1356,7 +1356,7 @@ static int snd_ali_playback_prepare(struct snd_pcm_substream *substream)
1356 VOL, 1356 VOL,
1357 CTRL, 1357 CTRL,
1358 EC); 1358 EC);
1359 if (!evoice) { 1359 if (evoice) {
1360 evoice->count = pvoice->count; 1360 evoice->count = pvoice->count;
1361 evoice->eso = pvoice->count << 1; 1361 evoice->eso = pvoice->count << 1;
1362 ESO = evoice->eso - 1; 1362 ESO = evoice->eso - 1;
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 8e89d56b6400..f87f8f088956 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -713,6 +713,19 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
713 return info->amp_caps; 713 return info->amp_caps;
714} 714}
715 715
716int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
717 unsigned int caps)
718{
719 struct hda_amp_info *info;
720
721 info = get_alloc_amp_hash(codec, HDA_HASH_KEY(nid, dir, 0));
722 if (!info)
723 return -EINVAL;
724 info->amp_caps = caps;
725 info->status |= INFO_AMP_CAPS;
726 return 0;
727}
728
716/* 729/*
717 * read the current volume to info 730 * read the current volume to info
718 * if the cache exists, read the cache value. 731 * if the cache exists, read the cache value.
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index be12b8814c39..f91ea5ec9f6d 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -277,5 +277,7 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
277 return codec->wcaps[nid - codec->start_nid]; 277 return codec->wcaps[nid - codec->start_nid];
278} 278}
279 279
280int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
281 unsigned int caps);
280 282
281#endif /* __SOUND_HDA_LOCAL_H */ 283#endif /* __SOUND_HDA_LOCAL_H */
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a5a4b2bddf20..bef214bcdddf 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -705,6 +705,17 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
705 .get = conexant_mux_enum_get, 705 .get = conexant_mux_enum_get,
706 .put = conexant_mux_enum_put, 706 .put = conexant_mux_enum_put,
707 }, 707 },
708 /* Audio input controls */
709 HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT),
710 HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT),
711 HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
712 HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
713 HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
714 HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
715 HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
716 HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
717 HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
718 HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
708 { } /* end */ 719 { } /* end */
709}; 720};
710 721
@@ -947,6 +958,23 @@ static void cxt5047_hp_automute(struct hda_codec *codec)
947 snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits); 958 snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits);
948} 959}
949 960
961/* mute internal speaker if HP is plugged */
962static void cxt5047_hp2_automute(struct hda_codec *codec)
963{
964 struct conexant_spec *spec = codec->spec;
965 unsigned int bits;
966
967 spec->hp_present = snd_hda_codec_read(codec, 0x13, 0,
968 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
969
970 bits = spec->hp_present ? 0x80 : 0;
971 snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits);
972 snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits);
973 /* Mute/Unmute PCM 2 for good measure - some systems need this */
974 snd_hda_codec_amp_update(codec, 0x1c, 0, HDA_OUTPUT, 0, 0x80, bits);
975 snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits);
976}
977
950/* toggle input of built-in and mic jack appropriately */ 978/* toggle input of built-in and mic jack appropriately */
951static void cxt5047_hp_automic(struct hda_codec *codec) 979static void cxt5047_hp_automic(struct hda_codec *codec)
952{ 980{
@@ -985,6 +1013,21 @@ static void cxt5047_hp_unsol_event(struct hda_codec *codec,
985 } 1013 }
986} 1014}
987 1015
1016/* unsolicited event for HP jack sensing - non-EAPD systems */
1017static void cxt5047_hp2_unsol_event(struct hda_codec *codec,
1018 unsigned int res)
1019{
1020 res >>= 26;
1021 switch (res) {
1022 case CONEXANT_HP_EVENT:
1023 cxt5047_hp2_automute(codec);
1024 break;
1025 case CONEXANT_MIC_EVENT:
1026 cxt5047_hp_automic(codec);
1027 break;
1028 }
1029}
1030
988static struct snd_kcontrol_new cxt5047_mixers[] = { 1031static struct snd_kcontrol_new cxt5047_mixers[] = {
989 HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x19, 0x02, HDA_INPUT), 1032 HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x19, 0x02, HDA_INPUT),
990 HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x19, 0x02, HDA_INPUT), 1033 HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x19, 0x02, HDA_INPUT),
@@ -1300,19 +1343,20 @@ static int patch_cxt5047(struct hda_codec *codec)
1300 spec->channel_mode = cxt5047_modes, 1343 spec->channel_mode = cxt5047_modes,
1301 1344
1302 codec->patch_ops = conexant_patch_ops; 1345 codec->patch_ops = conexant_patch_ops;
1303 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
1304 1346
1305 board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, 1347 board_config = snd_hda_check_board_config(codec, CXT5047_MODELS,
1306 cxt5047_models, 1348 cxt5047_models,
1307 cxt5047_cfg_tbl); 1349 cxt5047_cfg_tbl);
1308 switch (board_config) { 1350 switch (board_config) {
1309 case CXT5047_LAPTOP: 1351 case CXT5047_LAPTOP:
1352 codec->patch_ops.unsol_event = cxt5047_hp2_unsol_event;
1310 break; 1353 break;
1311 case CXT5047_LAPTOP_HP: 1354 case CXT5047_LAPTOP_HP:
1312 spec->input_mux = &cxt5047_hp_capture_source; 1355 spec->input_mux = &cxt5047_hp_capture_source;
1313 spec->num_init_verbs = 2; 1356 spec->num_init_verbs = 2;
1314 spec->init_verbs[1] = cxt5047_hp_init_verbs; 1357 spec->init_verbs[1] = cxt5047_hp_init_verbs;
1315 spec->mixers[0] = cxt5047_hp_mixers; 1358 spec->mixers[0] = cxt5047_hp_mixers;
1359 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
1316 codec->patch_ops.init = cxt5047_hp_init; 1360 codec->patch_ops.init = cxt5047_hp_init;
1317 break; 1361 break;
1318 case CXT5047_LAPTOP_EAPD: 1362 case CXT5047_LAPTOP_EAPD:
@@ -1320,12 +1364,14 @@ static int patch_cxt5047(struct hda_codec *codec)
1320 spec->num_init_verbs = 2; 1364 spec->num_init_verbs = 2;
1321 spec->init_verbs[1] = cxt5047_toshiba_init_verbs; 1365 spec->init_verbs[1] = cxt5047_toshiba_init_verbs;
1322 spec->mixers[0] = cxt5047_toshiba_mixers; 1366 spec->mixers[0] = cxt5047_toshiba_mixers;
1367 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
1323 break; 1368 break;
1324#ifdef CONFIG_SND_DEBUG 1369#ifdef CONFIG_SND_DEBUG
1325 case CXT5047_TEST: 1370 case CXT5047_TEST:
1326 spec->input_mux = &cxt5047_test_capture_source; 1371 spec->input_mux = &cxt5047_test_capture_source;
1327 spec->mixers[0] = cxt5047_test_mixer; 1372 spec->mixers[0] = cxt5047_test_mixer;
1328 spec->init_verbs[0] = cxt5047_test_init_verbs; 1373 spec->init_verbs[0] = cxt5047_test_init_verbs;
1374 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
1329#endif 1375#endif
1330 } 1376 }
1331 return 0; 1377 return 0;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 34ac63469532..4776de93928b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6379,8 +6379,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
6379 SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG), 6379 SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG),
6380 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG), 6380 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
6381 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG), 6381 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
6382 SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG),
6382 SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG), 6383 SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG),
6383 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), 6384 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
6385 SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG),
6384 SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG), 6386 SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG),
6385 SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG), 6387 SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG),
6386 SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG), 6388 SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG),
@@ -6391,6 +6393,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
6391 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG), 6393 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
6392 SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG), 6394 SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG),
6393 SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), 6395 SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER),
6396 SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
6394 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), 6397 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
6395 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), 6398 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
6396 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), 6399 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
@@ -8765,7 +8768,6 @@ static struct snd_pci_quirk alc861_cfg_tbl[] = {
8765 SND_PCI_QUIRK(0x1043, 0x1338, "ASUS F2/3", ALC861_ASUS_LAPTOP), 8768 SND_PCI_QUIRK(0x1043, 0x1338, "ASUS F2/3", ALC861_ASUS_LAPTOP),
8766 SND_PCI_QUIRK(0x1043, 0x13d7, "ASUS A9rp", ALC861_ASUS_LAPTOP), 8769 SND_PCI_QUIRK(0x1043, 0x13d7, "ASUS A9rp", ALC861_ASUS_LAPTOP),
8767 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS", ALC861_ASUS), 8770 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS", ALC861_ASUS),
8768 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660_3ST),
8769 SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba", ALC861_TOSHIBA), 8771 SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba", ALC861_TOSHIBA),
8770 SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba", ALC861_TOSHIBA), 8772 SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba", ALC861_TOSHIBA),
8771 SND_PCI_QUIRK(0x1584, 0x9072, "Uniwill m31", ALC861_UNIWILL_M31), 8773 SND_PCI_QUIRK(0x1584, 0x9072, "Uniwill m31", ALC861_UNIWILL_M31),
@@ -9473,6 +9475,7 @@ static const char *alc861vd_models[ALC861VD_MODEL_LAST] = {
9473static struct snd_pci_quirk alc861vd_cfg_tbl[] = { 9475static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
9474 SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST), 9476 SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST),
9475 SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST), 9477 SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),
9478 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST),
9476 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), 9479 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
9477 SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), 9480 SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST),
9478 9481
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index 6fcda9bcf0cf..43f537ef40bf 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -304,6 +304,8 @@ struct hda_codec_preset snd_hda_preset_si3054[] = {
304 { .id = 0x10573055, .name = "Si3054", .patch = patch_si3054 }, 304 { .id = 0x10573055, .name = "Si3054", .patch = patch_si3054 },
305 { .id = 0x10573057, .name = "Si3054", .patch = patch_si3054 }, 305 { .id = 0x10573057, .name = "Si3054", .patch = patch_si3054 },
306 { .id = 0x10573155, .name = "Si3054", .patch = patch_si3054 }, 306 { .id = 0x10573155, .name = "Si3054", .patch = patch_si3054 },
307 /* Asus A8J Modem (SM56) */
308 { .id = 0x15433155, .name = "Si3054", .patch = patch_si3054 },
307 {} 309 {}
308}; 310};
309 311
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a6a0a80edc3b..e3964fc4c405 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -51,6 +51,7 @@ enum {
51 STAC_925x_REF, 51 STAC_925x_REF,
52 STAC_M2_2, 52 STAC_M2_2,
53 STAC_MA6, 53 STAC_MA6,
54 STAC_PA6,
54 STAC_925x_MODELS 55 STAC_925x_MODELS
55}; 56};
56 57
@@ -152,6 +153,10 @@ static hda_nid_t stac925x_dac_nids[1] = {
152 0x02, 153 0x02,
153}; 154};
154 155
156static hda_nid_t stac925x_dmic_nids[1] = {
157 0x15,
158};
159
155static hda_nid_t stac922x_adc_nids[2] = { 160static hda_nid_t stac922x_adc_nids[2] = {
156 0x06, 0x07, 161 0x06, 0x07,
157}; 162};
@@ -469,6 +474,14 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
469 "Dell Precision M90", STAC_REF), 474 "Dell Precision M90", STAC_REF),
470 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6, 475 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6,
471 "unknown Dell", STAC_REF), 476 "unknown Dell", STAC_REF),
477 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d8,
478 "Dell Inspiron 640m", STAC_REF),
479 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f5,
480 "Dell Inspiron 1501", STAC_REF),
481
482 /* Panasonic */
483 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_REF),
484
472 {} /* terminator */ 485 {} /* terminator */
473}; 486};
474 487
@@ -482,29 +495,38 @@ static unsigned int stac925x_MA6_pin_configs[8] = {
482 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, 495 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
483}; 496};
484 497
498static unsigned int stac925x_PA6_pin_configs[8] = {
499 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
500 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
501};
502
485static unsigned int stac925xM2_2_pin_configs[8] = { 503static unsigned int stac925xM2_2_pin_configs[8] = {
486 0x40c003f3, 0x424503f2, 0x041800f4, 0x02a19020, 504 0x40c003f3, 0x424503f2, 0x04180011, 0x02a19020,
487 0x50a103F0, 0x90100210, 0x400003f1, 0x9033032e, 505 0x50a103f0, 0x90100212, 0x400003f1, 0x9033032e,
488}; 506};
489 507
490static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { 508static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = {
491 [STAC_REF] = ref925x_pin_configs, 509 [STAC_REF] = ref925x_pin_configs,
492 [STAC_M2_2] = stac925xM2_2_pin_configs, 510 [STAC_M2_2] = stac925xM2_2_pin_configs,
493 [STAC_MA6] = stac925x_MA6_pin_configs, 511 [STAC_MA6] = stac925x_MA6_pin_configs,
512 [STAC_PA6] = stac925x_PA6_pin_configs,
494}; 513};
495 514
496static const char *stac925x_models[STAC_925x_MODELS] = { 515static const char *stac925x_models[STAC_925x_MODELS] = {
497 [STAC_REF] = "ref", 516 [STAC_REF] = "ref",
498 [STAC_M2_2] = "m2-2", 517 [STAC_M2_2] = "m2-2",
499 [STAC_MA6] = "m6", 518 [STAC_MA6] = "m6",
519 [STAC_PA6] = "pa6",
500}; 520};
501 521
502static struct snd_pci_quirk stac925x_cfg_tbl[] = { 522static struct snd_pci_quirk stac925x_cfg_tbl[] = {
503 /* SigmaTel reference board */ 523 /* SigmaTel reference board */
504 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), 524 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
525 SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
505 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), 526 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF),
506 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), 527 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF),
507 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), 528 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6),
529 SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6),
508 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), 530 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2),
509 {} /* terminator */ 531 {} /* terminator */
510}; 532};
@@ -1742,6 +1764,21 @@ static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
1742 unsigned int pin_ctl = snd_hda_codec_read(codec, nid, 1764 unsigned int pin_ctl = snd_hda_codec_read(codec, nid,
1743 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00); 1765 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
1744 1766
1767 if (pin_ctl & AC_PINCTL_IN_EN) {
1768 /*
1769 * we need to check the current set-up direction of
1770 * shared input pins since they can be switched via
1771 * "xxx as Output" mixer switch
1772 */
1773 struct sigmatel_spec *spec = codec->spec;
1774 struct auto_pin_cfg *cfg = &spec->autocfg;
1775 if ((nid == cfg->input_pins[AUTO_PIN_LINE] &&
1776 spec->line_switch) ||
1777 (nid == cfg->input_pins[AUTO_PIN_MIC] &&
1778 spec->mic_switch))
1779 return;
1780 }
1781
1745 /* if setting pin direction bits, clear the current 1782 /* if setting pin direction bits, clear the current
1746 direction bits first */ 1783 direction bits first */
1747 if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN)) 1784 if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))
@@ -1911,7 +1948,8 @@ static int patch_stac925x(struct hda_codec *codec)
1911 stac925x_cfg_tbl); 1948 stac925x_cfg_tbl);
1912 again: 1949 again:
1913 if (spec->board_config < 0) { 1950 if (spec->board_config < 0) {
1914 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n"); 1951 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x,"
1952 "using BIOS defaults\n");
1915 err = stac92xx_save_bios_config_regs(codec); 1953 err = stac92xx_save_bios_config_regs(codec);
1916 if (err < 0) { 1954 if (err < 0) {
1917 stac92xx_free(codec); 1955 stac92xx_free(codec);
@@ -1929,7 +1967,18 @@ static int patch_stac925x(struct hda_codec *codec)
1929 spec->adc_nids = stac925x_adc_nids; 1967 spec->adc_nids = stac925x_adc_nids;
1930 spec->mux_nids = stac925x_mux_nids; 1968 spec->mux_nids = stac925x_mux_nids;
1931 spec->num_muxes = 1; 1969 spec->num_muxes = 1;
1932 spec->num_dmics = 0; 1970 switch (codec->vendor_id) {
1971 case 0x83847632: /* STAC9202 */
1972 case 0x83847633: /* STAC9202D */
1973 case 0x83847636: /* STAC9251 */
1974 case 0x83847637: /* STAC9251D */
1975 spec->num_dmics = 1;
1976 spec->dmic_nids = stac925x_dmic_nids;
1977 break;
1978 default:
1979 spec->num_dmics = 0;
1980 break;
1981 }
1933 1982
1934 spec->init = stac925x_core_init; 1983 spec->init = stac925x_core_init;
1935 spec->mixer = stac925x_mixer; 1984 spec->mixer = stac925x_mixer;
@@ -2110,6 +2159,13 @@ static int patch_stac927x(struct hda_codec *codec)
2110 2159
2111 codec->patch_ops = stac92xx_patch_ops; 2160 codec->patch_ops = stac92xx_patch_ops;
2112 2161
2162 /* Fix Mux capture level; max to 2 */
2163 snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT,
2164 (0 << AC_AMPCAP_OFFSET_SHIFT) |
2165 (2 << AC_AMPCAP_NUM_STEPS_SHIFT) |
2166 (0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) |
2167 (0 << AC_AMPCAP_MUTE_SHIFT));
2168
2113 return 0; 2169 return 0;
2114} 2170}
2115 2171
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 21dc6974d6a3..bfbdc3cbd43b 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -337,6 +337,8 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
337 if (prtd == NULL) 337 if (prtd == NULL)
338 return -ENOMEM; 338 return -ENOMEM;
339 339
340 spin_lock_init(&prtd->lock);
341
340 runtime->private_data = prtd; 342 runtime->private_data = prtd;
341 return 0; 343 return 0;
342} 344}