ALSA: hda - Set individual name to secondary analog PCM stream
authorTakashi Iwai <tiwai@suse.de>
Mon, 21 Jan 2013 15:50:09 +0000 (16:50 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Jan 2013 13:12:40 +0000 (14:12 +0100)
It'd be better to give another name to the secondary (alt) analog PCM
stream, which is dedicated for the independent HP out and extra
inputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_generic.h

index 6d1e843c6e8dfdb783208428f47d79872352aaa5..63d12efb7c1a5bbeda3e3210e0bbf7d2fa131b19 100644 (file)
@@ -4531,9 +4531,12 @@ int snd_hda_gen_build_pcms(struct hda_codec *codec)
                !spec->dyn_adc_switch && !spec->auto_mic;
        /* Additional Analaog capture for index #2 */
        if (spec->alt_dac_nid || have_multi_adcs) {
+               fill_pcm_stream_name(spec->stream_name_alt_analog,
+                                    sizeof(spec->stream_name_alt_analog),
+                            " Alt Analog", codec->chip_name);
                codec->num_pcms = 3;
                info = spec->pcm_rec + 2;
-               info->name = spec->stream_name_analog;
+               info->name = spec->stream_name_alt_analog;
                if (spec->alt_dac_nid) {
                        p = spec->stream_analog_alt_playback;
                        if (!p)
index 9c63555b971cdced88b6e6fda5aa33e77352e873..980707fcd30a5ebc919de1dd65a6e7b8f5432e53 100644 (file)
@@ -80,6 +80,8 @@ struct hda_gen_spec {
        char stream_name_analog[32];    /* analog PCM stream */
        const struct hda_pcm_stream *stream_analog_playback;
        const struct hda_pcm_stream *stream_analog_capture;
+
+       char stream_name_alt_analog[32]; /* alternative analog PCM stream */
        const struct hda_pcm_stream *stream_analog_alt_playback;
        const struct hda_pcm_stream *stream_analog_alt_capture;