aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a98c0e4da0ac..63aeddb731d9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1259,6 +1259,8 @@ static int alc_build_pcms(struct hda_codec *codec)
1259 codec->num_pcms = 1; 1259 codec->num_pcms = 1;
1260 codec->pcm_info = info; 1260 codec->pcm_info = info;
1261 1261
1262 snd_assert(spec->stream_analog_playback, return -EINVAL);
1263 snd_assert(spec->stream_analog_capture, return -EINVAL);
1262 info->name = spec->stream_name_analog; 1264 info->name = spec->stream_name_analog;
1263 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_analog_playback); 1265 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_analog_playback);
1264 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dac_nids[0]; 1266 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dac_nids[0];
@@ -1277,10 +1279,12 @@ static int alc_build_pcms(struct hda_codec *codec)
1277 info++; 1279 info++;
1278 info->name = spec->stream_name_digital; 1280 info->name = spec->stream_name_digital;
1279 if (spec->multiout.dig_out_nid) { 1281 if (spec->multiout.dig_out_nid) {
1282 snd_assert(spec->stream_digital_playback, return -EINVAL);
1280 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_digital_playback); 1283 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_digital_playback);
1281 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid; 1284 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid;
1282 } 1285 }
1283 if (spec->dig_in_nid) { 1286 if (spec->dig_in_nid) {
1287 snd_assert(spec->stream_digital_capture, return -EINVAL);
1284 info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture); 1288 info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture);
1285 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid; 1289 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid;
1286 } 1290 }
@@ -3508,9 +3512,10 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
3508 3512
3509 if (err < 0) 3513 if (err < 0)
3510 return err; 3514 return err;
3511 /* hack - override the init verbs */ 3515 else if (err > 0)
3512 spec->init_verbs[0] = alc882_auto_init_verbs; 3516 /* hack - override the init verbs */
3513 return 0; 3517 spec->init_verbs[0] = alc882_auto_init_verbs;
3518 return err;
3514} 3519}
3515 3520
3516/* init callback for auto-configuration model -- overriding the default init */ 3521/* init callback for auto-configuration model -- overriding the default init */
@@ -3605,6 +3610,7 @@ static int patch_alc882(struct hda_codec *codec)
3605#define alc262_adc_nids_alt alc882_adc_nids_alt 3610#define alc262_adc_nids_alt alc882_adc_nids_alt
3606 3611
3607#define alc262_modes alc260_modes 3612#define alc262_modes alc260_modes
3613#define alc262_capture_source alc882_capture_source
3608 3614
3609static struct snd_kcontrol_new alc262_base_mixer[] = { 3615static struct snd_kcontrol_new alc262_base_mixer[] = {
3610 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 3616 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
@@ -3921,6 +3927,7 @@ static struct alc_config_preset alc262_presets[] = {
3921 .hp_nid = 0x03, 3927 .hp_nid = 0x03,
3922 .num_channel_mode = ARRAY_SIZE(alc262_modes), 3928 .num_channel_mode = ARRAY_SIZE(alc262_modes),
3923 .channel_mode = alc262_modes, 3929 .channel_mode = alc262_modes,
3930 .input_mux = alc262_capture_source,
3924 }, 3931 },
3925}; 3932};
3926 3933