2722 if (spec->multiout.dig_out_nid || spec->dig_in_nid) {
2723 codec->num_pcms = 2;
2724 info = spec->pcm_rec + 1;
2725 info->name = spec->stream_name_digital;
2726 info->pcm_type = HDA_PCM_TYPE_SPDIF;
2727 if (spec->multiout.dig_out_nid &&
2728 spec->stream_digital_playback) {
2729 info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_digital_playback);
2730 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid;
2731 }
2732 if (spec->dig_in_nid &&
2733 spec->stream_digital_capture) {
2734 info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture);
2735 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid;
2736 }
2737
2738 codec->spdif_status_reset = 1;
2739 }
2740
2741
2742
2743
2744
2745 if ((spec->alt_dac_nid && spec->stream_analog_alt_playback) ||
2746 (spec->num_adc_nids > 1 && spec->stream_analog_alt_capture)) {
2747 codec->num_pcms = 3;
2748 info = spec->pcm_rec + 2;
2749 info->name = spec->stream_name_analog;
2750 if (spec->alt_dac_nid) {
2751 info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
2752 *spec->stream_analog_alt_playback;
2753 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
2754 spec->alt_dac_nid;
2755 } else {
2756 info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
2757 alc_pcm_null_stream;
2758 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0;
2759 }
2760 if (spec->num_adc_nids > 1) {
2761 info->stream[SNDRV_PCM_STREAM_CAPTURE] =
2762 *spec->stream_analog_alt_capture;