mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
01b65bfb4f
commit
a4567cb389
|
@ -48,8 +48,8 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
|
||||||
*
|
*
|
||||||
* The HDA correspondence of pipes/ports are converter/pin nodes.
|
* The HDA correspondence of pipes/ports are converter/pin nodes.
|
||||||
*/
|
*/
|
||||||
#define MAX_HDMI_CVTS 4
|
#define MAX_HDMI_CVTS 8
|
||||||
#define MAX_HDMI_PINS 4
|
#define MAX_HDMI_PINS 8
|
||||||
|
|
||||||
struct hdmi_spec_per_cvt {
|
struct hdmi_spec_per_cvt {
|
||||||
hda_nid_t cvt_nid;
|
hda_nid_t cvt_nid;
|
||||||
|
@ -1126,12 +1126,12 @@ static int hdmi_parse_codec(struct hda_codec *codec)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
static char *generic_hdmi_pcm_names[MAX_HDMI_PINS] = {
|
static char *get_hdmi_pcm_name(int idx)
|
||||||
"HDMI 0",
|
{
|
||||||
"HDMI 1",
|
static char names[MAX_HDMI_PINS][8];
|
||||||
"HDMI 2",
|
sprintf(&names[idx][0], "HDMI %d", idx);
|
||||||
"HDMI 3",
|
return &names[idx][0];
|
||||||
};
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HDMI callbacks
|
* HDMI callbacks
|
||||||
|
@ -1209,7 +1209,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
|
||||||
struct hda_pcm_stream *pstr;
|
struct hda_pcm_stream *pstr;
|
||||||
|
|
||||||
info = &spec->pcm_rec[pin_idx];
|
info = &spec->pcm_rec[pin_idx];
|
||||||
info->name = generic_hdmi_pcm_names[pin_idx];
|
info->name = get_hdmi_pcm_name(pin_idx);
|
||||||
info->pcm_type = HDA_PCM_TYPE_HDMI;
|
info->pcm_type = HDA_PCM_TYPE_HDMI;
|
||||||
|
|
||||||
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
|
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
|
||||||
|
@ -1364,7 +1364,7 @@ static int simple_playback_build_pcms(struct hda_codec *codec)
|
||||||
chans = get_wcaps(codec, spec->cvts[i].cvt_nid);
|
chans = get_wcaps(codec, spec->cvts[i].cvt_nid);
|
||||||
chans = get_wcaps_channels(chans);
|
chans = get_wcaps_channels(chans);
|
||||||
|
|
||||||
info->name = generic_hdmi_pcm_names[i];
|
info->name = get_hdmi_pcm_name(i);
|
||||||
info->pcm_type = HDA_PCM_TYPE_HDMI;
|
info->pcm_type = HDA_PCM_TYPE_HDMI;
|
||||||
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
|
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
|
||||||
snd_BUG_ON(!spec->pcm_playback);
|
snd_BUG_ON(!spec->pcm_playback);
|
||||||
|
|
Loading…
Reference in New Issue