aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-24 08:44:19 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-26 04:19:48 -0500
commita4567cb389301262f7ff392074eb3b0864498737 (patch)
tree479082734af62613dcacbc82dfbcf6387a11708f /sound
parent01b65bfb4f8cd45b0d44547c961ef59a0bcf74be (diff)
ALSA: hda - Increase the max number of coverters/pins in patch_hdmi.c
The new hardware tends to have more and more. As a temporary fix, just increase the number for now. For a long-term solution, we should assign the cvts/pins dynamically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_hdmi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index c505fd5d338c..6e0756febb2e 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -48,8 +48,8 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
48 * 48 *
49 * The HDA correspondence of pipes/ports are converter/pin nodes. 49 * The HDA correspondence of pipes/ports are converter/pin nodes.
50 */ 50 */
51#define MAX_HDMI_CVTS 4 51#define MAX_HDMI_CVTS 8
52#define MAX_HDMI_PINS 4 52#define MAX_HDMI_PINS 8
53 53
54struct hdmi_spec_per_cvt { 54struct hdmi_spec_per_cvt {
55 hda_nid_t cvt_nid; 55 hda_nid_t cvt_nid;
@@ -1126,12 +1126,12 @@ static int hdmi_parse_codec(struct hda_codec *codec)
1126 1126
1127/* 1127/*
1128 */ 1128 */
1129static char *generic_hdmi_pcm_names[MAX_HDMI_PINS] = { 1129static char *get_hdmi_pcm_name(int idx)
1130 "HDMI 0", 1130{
1131 "HDMI 1", 1131 static char names[MAX_HDMI_PINS][8];
1132 "HDMI 2", 1132 sprintf(&names[idx][0], "HDMI %d", idx);
1133 "HDMI 3", 1133 return &names[idx][0];
1134}; 1134}
1135 1135
1136/* 1136/*
1137 * HDMI callbacks 1137 * HDMI callbacks
@@ -1209,7 +1209,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
1209 struct hda_pcm_stream *pstr; 1209 struct hda_pcm_stream *pstr;
1210 1210
1211 info = &spec->pcm_rec[pin_idx]; 1211 info = &spec->pcm_rec[pin_idx];
1212 info->name = generic_hdmi_pcm_names[pin_idx]; 1212 info->name = get_hdmi_pcm_name(pin_idx);
1213 info->pcm_type = HDA_PCM_TYPE_HDMI; 1213 info->pcm_type = HDA_PCM_TYPE_HDMI;
1214 1214
1215 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; 1215 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
@@ -1364,7 +1364,7 @@ static int simple_playback_build_pcms(struct hda_codec *codec)
1364 chans = get_wcaps(codec, spec->cvts[i].cvt_nid); 1364 chans = get_wcaps(codec, spec->cvts[i].cvt_nid);
1365 chans = get_wcaps_channels(chans); 1365 chans = get_wcaps_channels(chans);
1366 1366
1367 info->name = generic_hdmi_pcm_names[i]; 1367 info->name = get_hdmi_pcm_name(i);
1368 info->pcm_type = HDA_PCM_TYPE_HDMI; 1368 info->pcm_type = HDA_PCM_TYPE_HDMI;
1369 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; 1369 pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
1370 snd_BUG_ON(!spec->pcm_playback); 1370 snd_BUG_ON(!spec->pcm_playback);