diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-06 08:03:20 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:07 -0400 |
commit | 7ba72ba1fe891a94b1e9d506236507e4dc50e872 (patch) | |
tree | 4c3dc43b6fbb1e9a3f28191a38da563e15180e44 /sound/pci/hda/patch_analog.c | |
parent | 6c4cc3a8ed15aacc06a5fd369639fef633cee2bc (diff) |
[ALSA] hda-intel - Fix PCM device number assignment
In the current scheme, PCM device numbers are assigned incrementally
in the order of codecs. This causes problems when the codec number
is irregular, e.g. codec #0 for HDMI and codec #1 for analog. Then
the HDMI becomes the first PCM, which is picked up as the default
output device. Unfortuantely this doesn't work well with normal
setups.
This patch introduced the fixed device numbers for the PCM types,
namely, analog, SPDIF, HDMI and modem. The PCM devices are assigned
according to the corresponding PCM type. After this patch, HDMI will
be always assigned to PCM #3, SPDIF to PCM #1, and the first analog
to PCM #0, etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index c8649282c2cf..7286ab86ecc4 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -359,6 +359,7 @@ static int ad198x_build_pcms(struct hda_codec *codec) | |||
359 | info++; | 359 | info++; |
360 | codec->num_pcms++; | 360 | codec->num_pcms++; |
361 | info->name = "AD198x Digital"; | 361 | info->name = "AD198x Digital"; |
362 | info->pcm_type = HDA_PCM_TYPE_SPDIF; | ||
362 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; | 363 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; |
363 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid; | 364 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid; |
364 | if (spec->dig_in_nid) { | 365 | if (spec->dig_in_nid) { |