]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] hda-codec - Fix assignment of PCM devices for Realtek codecs
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Oct 2006 16:49:13 +0000 (18:49 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sun, 22 Oct 2006 08:51:08 +0000 (10:51 +0200)
Fixed the assignment of PCM devices for Realtek codecs.
The secondary analog capture should be statically asigned to the
third device regardless whether SPDIF exists or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/hda/patch_realtek.c

index 84a3eb8aacc243721d462cd6f9ea3fa48ead4862..0d728c6f697c47c001b7672bb146757ffe3ec1a6 100644 (file)
@@ -1799,7 +1799,7 @@ static int alc_build_pcms(struct hda_codec *codec)
        /* SPDIF for stream index #1 */
        if (spec->multiout.dig_out_nid || spec->dig_in_nid) {
                codec->num_pcms = 2;
-               info++;
+               info = spec->pcm_rec + 1;
                info->name = spec->stream_name_digital;
                if (spec->multiout.dig_out_nid &&
                    spec->stream_digital_playback) {
@@ -1820,7 +1820,7 @@ static int alc_build_pcms(struct hda_codec *codec)
        if (spec->num_adc_nids > 1 && spec->stream_analog_capture &&
            spec->adc_nids) {
                codec->num_pcms = 3;
-               info++;
+               info = spec->pcm_rec + 2;
                info->name = spec->stream_name_analog;
                /* No playback stream for second PCM */
                info->stream[SNDRV_PCM_STREAM_PLAYBACK] = alc_pcm_null_playback;