Commit 8ac1c101 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 0e9871df 672cc6c6
...@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
ref Reference board, base config ref Reference board, base config
m2-2 Some Gateway MX series laptops m2-2 Some Gateway MX series laptops
m6 Some Gateway NX series laptops m6 Some Gateway NX series laptops
pa6 Gateway NX860 series
STAC9227/9228/9229/927x STAC9227/9228/9229/927x
ref Reference board ref Reference board
......
/* include/version.h. Generated by alsa/ksync script. */ /* include/version.h. Generated by alsa/ksync script. */
#define CONFIG_SND_VERSION "1.0.14rc4" #define CONFIG_SND_VERSION "1.0.14"
#define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)" #define CONFIG_SND_DATE " (Thu May 31 09:03:25 2007 UTC)"
...@@ -1250,7 +1250,7 @@ static int snd_ali_playback_hw_params(struct snd_pcm_substream *substream, ...@@ -1250,7 +1250,7 @@ static int snd_ali_playback_hw_params(struct snd_pcm_substream *substream,
evoice->substream = substream; evoice->substream = substream;
} }
} else { } else {
if (!evoice) { if (evoice) {
snd_ali_free_voice(codec, evoice); snd_ali_free_voice(codec, evoice);
pvoice->extra = evoice = NULL; pvoice->extra = evoice = NULL;
} }
...@@ -1267,7 +1267,7 @@ static int snd_ali_playback_hw_free(struct snd_pcm_substream *substream) ...@@ -1267,7 +1267,7 @@ static int snd_ali_playback_hw_free(struct snd_pcm_substream *substream)
struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL;
snd_pcm_lib_free_pages(substream); snd_pcm_lib_free_pages(substream);
if (!evoice) { if (evoice) {
snd_ali_free_voice(codec, evoice); snd_ali_free_voice(codec, evoice);
pvoice->extra = NULL; pvoice->extra = NULL;
} }
...@@ -1356,7 +1356,7 @@ static int snd_ali_playback_prepare(struct snd_pcm_substream *substream) ...@@ -1356,7 +1356,7 @@ static int snd_ali_playback_prepare(struct snd_pcm_substream *substream)
VOL, VOL,
CTRL, CTRL,
EC); EC);
if (!evoice) { if (evoice) {
evoice->count = pvoice->count; evoice->count = pvoice->count;
evoice->eso = pvoice->count << 1; evoice->eso = pvoice->count << 1;
ESO = evoice->eso - 1; ESO = evoice->eso - 1;
......
...@@ -713,6 +713,19 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction) ...@@ -713,6 +713,19 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
return info->amp_caps; return info->amp_caps;
} }
int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
unsigned int caps)
{
struct hda_amp_info *info;
info = get_alloc_amp_hash(codec, HDA_HASH_KEY(nid, dir, 0));
if (!info)
return -EINVAL;
info->amp_caps = caps;
info->status |= INFO_AMP_CAPS;
return 0;
}
/* /*
* read the current volume to info * read the current volume to info
* if the cache exists, read the cache value. * if the cache exists, read the cache value.
......
...@@ -277,5 +277,7 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) ...@@ -277,5 +277,7 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
return codec->wcaps[nid - codec->start_nid]; return codec->wcaps[nid - codec->start_nid];
} }
int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
unsigned int caps);
#endif /* __SOUND_HDA_LOCAL_H */ #endif /* __SOUND_HDA_LOCAL_H */
...@@ -705,6 +705,17 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = { ...@@ -705,6 +705,17 @@ static struct snd_kcontrol_new cxt5045_test_mixer[] = {
.get = conexant_mux_enum_get, .get = conexant_mux_enum_get,
.put = conexant_mux_enum_put, .put = conexant_mux_enum_put,
}, },
/* Audio input controls */
HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
{ } /* end */ { } /* end */
}; };
...@@ -947,6 +958,23 @@ static void cxt5047_hp_automute(struct hda_codec *codec) ...@@ -947,6 +958,23 @@ static void cxt5047_hp_automute(struct hda_codec *codec)
snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits); snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits);
} }
/* mute internal speaker if HP is plugged */
static void cxt5047_hp2_automute(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
unsigned int bits;
spec->hp_present = snd_hda_codec_read(codec, 0x13, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
bits = spec->hp_present ? 0x80 : 0;
snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits);
snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits);
/* Mute/Unmute PCM 2 for good measure - some systems need this */
snd_hda_codec_amp_update(codec, 0x1c, 0, HDA_OUTPUT, 0, 0x80, bits);
snd_hda_codec_amp_update(codec, 0x1c, 1, HDA_OUTPUT, 0, 0x80, bits);
}
/* toggle input of built-in and mic jack appropriately */ /* toggle input of built-in and mic jack appropriately */
static void cxt5047_hp_automic(struct hda_codec *codec) static void cxt5047_hp_automic(struct hda_codec *codec)
{ {
...@@ -985,6 +1013,21 @@ static void cxt5047_hp_unsol_event(struct hda_codec *codec, ...@@ -985,6 +1013,21 @@ static void cxt5047_hp_unsol_event(struct hda_codec *codec,
} }
} }
/* unsolicited event for HP jack sensing - non-EAPD systems */
static void cxt5047_hp2_unsol_event(struct hda_codec *codec,
unsigned int res)
{
res >>= 26;
switch (res) {
case CONEXANT_HP_EVENT:
cxt5047_hp2_automute(codec);
break;
case CONEXANT_MIC_EVENT:
cxt5047_hp_automic(codec);
break;
}
}
static struct snd_kcontrol_new cxt5047_mixers[] = { static struct snd_kcontrol_new cxt5047_mixers[] = {
HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x19, 0x02, HDA_INPUT), HDA_CODEC_VOLUME("Mic Bypass Capture Volume", 0x19, 0x02, HDA_INPUT),
HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x19, 0x02, HDA_INPUT), HDA_CODEC_MUTE("Mic Bypass Capture Switch", 0x19, 0x02, HDA_INPUT),
...@@ -1300,19 +1343,20 @@ static int patch_cxt5047(struct hda_codec *codec) ...@@ -1300,19 +1343,20 @@ static int patch_cxt5047(struct hda_codec *codec)
spec->channel_mode = cxt5047_modes, spec->channel_mode = cxt5047_modes,
codec->patch_ops = conexant_patch_ops; codec->patch_ops = conexant_patch_ops;
codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, board_config = snd_hda_check_board_config(codec, CXT5047_MODELS,
cxt5047_models, cxt5047_models,
cxt5047_cfg_tbl); cxt5047_cfg_tbl);
switch (board_config) { switch (board_config) {
case CXT5047_LAPTOP: case CXT5047_LAPTOP:
codec->patch_ops.unsol_event = cxt5047_hp2_unsol_event;
break; break;
case CXT5047_LAPTOP_HP: case CXT5047_LAPTOP_HP:
spec->input_mux = &cxt5047_hp_capture_source; spec->input_mux = &cxt5047_hp_capture_source;
spec->num_init_verbs = 2; spec->num_init_verbs = 2;
spec->init_verbs[1] = cxt5047_hp_init_verbs; spec->init_verbs[1] = cxt5047_hp_init_verbs;
spec->mixers[0] = cxt5047_hp_mixers; spec->mixers[0] = cxt5047_hp_mixers;
codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
codec->patch_ops.init = cxt5047_hp_init; codec->patch_ops.init = cxt5047_hp_init;
break; break;
case CXT5047_LAPTOP_EAPD: case CXT5047_LAPTOP_EAPD:
...@@ -1320,12 +1364,14 @@ static int patch_cxt5047(struct hda_codec *codec) ...@@ -1320,12 +1364,14 @@ static int patch_cxt5047(struct hda_codec *codec)
spec->num_init_verbs = 2; spec->num_init_verbs = 2;
spec->init_verbs[1] = cxt5047_toshiba_init_verbs; spec->init_verbs[1] = cxt5047_toshiba_init_verbs;
spec->mixers[0] = cxt5047_toshiba_mixers; spec->mixers[0] = cxt5047_toshiba_mixers;
codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
break; break;
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
case CXT5047_TEST: case CXT5047_TEST:
spec->input_mux = &cxt5047_test_capture_source; spec->input_mux = &cxt5047_test_capture_source;
spec->mixers[0] = cxt5047_test_mixer; spec->mixers[0] = cxt5047_test_mixer;
spec->init_verbs[0] = cxt5047_test_init_verbs; spec->init_verbs[0] = cxt5047_test_init_verbs;
codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
#endif #endif
} }
return 0; return 0;
......
...@@ -6379,8 +6379,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { ...@@ -6379,8 +6379,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG),
SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG), SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG),
SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG), SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG),
SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG), SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG),
...@@ -6391,6 +6393,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { ...@@ -6391,6 +6393,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG), SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG), SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG),
SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER),
SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
...@@ -8765,7 +8768,6 @@ static struct snd_pci_quirk alc861_cfg_tbl[] = { ...@@ -8765,7 +8768,6 @@ static struct snd_pci_quirk alc861_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1338, "ASUS F2/3", ALC861_ASUS_LAPTOP), SND_PCI_QUIRK(0x1043, 0x1338, "ASUS F2/3", ALC861_ASUS_LAPTOP),
SND_PCI_QUIRK(0x1043, 0x13d7, "ASUS A9rp", ALC861_ASUS_LAPTOP), SND_PCI_QUIRK(0x1043, 0x13d7, "ASUS A9rp", ALC861_ASUS_LAPTOP),
SND_PCI_QUIRK(0x1043, 0x1393, "ASUS", ALC861_ASUS), SND_PCI_QUIRK(0x1043, 0x1393, "ASUS", ALC861_ASUS),
SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660_3ST),
SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba", ALC861_TOSHIBA), SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba", ALC861_TOSHIBA),
SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba", ALC861_TOSHIBA), SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba", ALC861_TOSHIBA),
SND_PCI_QUIRK(0x1584, 0x9072, "Uniwill m31", ALC861_UNIWILL_M31), SND_PCI_QUIRK(0x1584, 0x9072, "Uniwill m31", ALC861_UNIWILL_M31),
...@@ -9473,6 +9475,7 @@ static const char *alc861vd_models[ALC861VD_MODEL_LAST] = { ...@@ -9473,6 +9475,7 @@ static const char *alc861vd_models[ALC861VD_MODEL_LAST] = {
static struct snd_pci_quirk alc861vd_cfg_tbl[] = { static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST), SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST),
SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST), SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),
SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST),
SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST),
......
...@@ -304,6 +304,8 @@ struct hda_codec_preset snd_hda_preset_si3054[] = { ...@@ -304,6 +304,8 @@ struct hda_codec_preset snd_hda_preset_si3054[] = {
{ .id = 0x10573055, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x10573055, .name = "Si3054", .patch = patch_si3054 },
{ .id = 0x10573057, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x10573057, .name = "Si3054", .patch = patch_si3054 },
{ .id = 0x10573155, .name = "Si3054", .patch = patch_si3054 }, { .id = 0x10573155, .name = "Si3054", .patch = patch_si3054 },
/* Asus A8J Modem (SM56) */
{ .id = 0x15433155, .name = "Si3054", .patch = patch_si3054 },
{} {}
}; };
...@@ -51,6 +51,7 @@ enum { ...@@ -51,6 +51,7 @@ enum {
STAC_925x_REF, STAC_925x_REF,
STAC_M2_2, STAC_M2_2,
STAC_MA6, STAC_MA6,
STAC_PA6,
STAC_925x_MODELS STAC_925x_MODELS
}; };
...@@ -152,6 +153,10 @@ static hda_nid_t stac925x_dac_nids[1] = { ...@@ -152,6 +153,10 @@ static hda_nid_t stac925x_dac_nids[1] = {
0x02, 0x02,
}; };
static hda_nid_t stac925x_dmic_nids[1] = {
0x15,
};
static hda_nid_t stac922x_adc_nids[2] = { static hda_nid_t stac922x_adc_nids[2] = {
0x06, 0x07, 0x06, 0x07,
}; };
...@@ -469,6 +474,14 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { ...@@ -469,6 +474,14 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
"Dell Precision M90", STAC_REF), "Dell Precision M90", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6, SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6,
"unknown Dell", STAC_REF), "unknown Dell", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d8,
"Dell Inspiron 640m", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f5,
"Dell Inspiron 1501", STAC_REF),
/* Panasonic */
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_REF),
{} /* terminator */ {} /* terminator */
}; };
...@@ -482,29 +495,38 @@ static unsigned int stac925x_MA6_pin_configs[8] = { ...@@ -482,29 +495,38 @@ static unsigned int stac925x_MA6_pin_configs[8] = {
0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
}; };
static unsigned int stac925x_PA6_pin_configs[8] = {
0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
};
static unsigned int stac925xM2_2_pin_configs[8] = { static unsigned int stac925xM2_2_pin_configs[8] = {
0x40c003f3, 0x424503f2, 0x041800f4, 0x02a19020, 0x40c003f3, 0x424503f2, 0x04180011, 0x02a19020,
0x50a103F0, 0x90100210, 0x400003f1, 0x9033032e, 0x50a103f0, 0x90100212, 0x400003f1, 0x9033032e,
}; };
static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = {
[STAC_REF] = ref925x_pin_configs, [STAC_REF] = ref925x_pin_configs,
[STAC_M2_2] = stac925xM2_2_pin_configs, [STAC_M2_2] = stac925xM2_2_pin_configs,
[STAC_MA6] = stac925x_MA6_pin_configs, [STAC_MA6] = stac925x_MA6_pin_configs,
[STAC_PA6] = stac925x_PA6_pin_configs,
}; };
static const char *stac925x_models[STAC_925x_MODELS] = { static const char *stac925x_models[STAC_925x_MODELS] = {
[STAC_REF] = "ref", [STAC_REF] = "ref",
[STAC_M2_2] = "m2-2", [STAC_M2_2] = "m2-2",
[STAC_MA6] = "m6", [STAC_MA6] = "m6",
[STAC_PA6] = "pa6",
}; };
static struct snd_pci_quirk stac925x_cfg_tbl[] = { static struct snd_pci_quirk stac925x_cfg_tbl[] = {
/* SigmaTel reference board */ /* SigmaTel reference board */
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF),
SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF),
SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6),
SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6),
SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2),
{} /* terminator */ {} /* terminator */
}; };
...@@ -1742,6 +1764,21 @@ static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid, ...@@ -1742,6 +1764,21 @@ static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
unsigned int pin_ctl = snd_hda_codec_read(codec, nid, unsigned int pin_ctl = snd_hda_codec_read(codec, nid,
0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00); 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
if (pin_ctl & AC_PINCTL_IN_EN) {
/*
* we need to check the current set-up direction of
* shared input pins since they can be switched via
* "xxx as Output" mixer switch
*/
struct sigmatel_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
if ((nid == cfg->input_pins[AUTO_PIN_LINE] &&
spec->line_switch) ||
(nid == cfg->input_pins[AUTO_PIN_MIC] &&
spec->mic_switch))
return;
}
/* if setting pin direction bits, clear the current /* if setting pin direction bits, clear the current
direction bits first */ direction bits first */
if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN)) if (flag & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))
...@@ -1911,7 +1948,8 @@ static int patch_stac925x(struct hda_codec *codec) ...@@ -1911,7 +1948,8 @@ static int patch_stac925x(struct hda_codec *codec)
stac925x_cfg_tbl); stac925x_cfg_tbl);
again: again:
if (spec->board_config < 0) { if (spec->board_config < 0) {
snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n"); snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x,"
"using BIOS defaults\n");
err = stac92xx_save_bios_config_regs(codec); err = stac92xx_save_bios_config_regs(codec);
if (err < 0) { if (err < 0) {
stac92xx_free(codec); stac92xx_free(codec);
...@@ -1929,7 +1967,18 @@ static int patch_stac925x(struct hda_codec *codec) ...@@ -1929,7 +1967,18 @@ static int patch_stac925x(struct hda_codec *codec)
spec->adc_nids = stac925x_adc_nids; spec->adc_nids = stac925x_adc_nids;
spec->mux_nids = stac925x_mux_nids; spec->mux_nids = stac925x_mux_nids;
spec->num_muxes = 1; spec->num_muxes = 1;
switch (codec->vendor_id) {
case 0x83847632: /* STAC9202 */
case 0x83847633: /* STAC9202D */
case 0x83847636: /* STAC9251 */
case 0x83847637: /* STAC9251D */
spec->num_dmics = 1;
spec->dmic_nids = stac925x_dmic_nids;
break;
default:
spec->num_dmics = 0; spec->num_dmics = 0;
break;
}
spec->init = stac925x_core_init; spec->init = stac925x_core_init;
spec->mixer = stac925x_mixer; spec->mixer = stac925x_mixer;
...@@ -2110,6 +2159,13 @@ static int patch_stac927x(struct hda_codec *codec) ...@@ -2110,6 +2159,13 @@ static int patch_stac927x(struct hda_codec *codec)
codec->patch_ops = stac92xx_patch_ops; codec->patch_ops = stac92xx_patch_ops;
/* Fix Mux capture level; max to 2 */
snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT,
(0 << AC_AMPCAP_OFFSET_SHIFT) |
(2 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(0 << AC_AMPCAP_MUTE_SHIFT));
return 0; return 0;
} }
......
...@@ -337,6 +337,8 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream) ...@@ -337,6 +337,8 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
if (prtd == NULL) if (prtd == NULL)
return -ENOMEM; return -ENOMEM;
spin_lock_init(&prtd->lock);
runtime->private_data = prtd; runtime->private_data = prtd;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment