Skip to content

Commit 454abb8

Browse files
Amadeusz Sławińskitiwai
authored andcommitted
ALSA: hda: Properly setup HDMI stream
Since commit 4005d1b ("ASoC: soc-dai: don't call PCM audio ops if the stream is not supported") HDMI playback is broken with avs driver. This happens because for HDMI stream (unlike generic HDA one) channels_min for stream is not set when creating PCMs. Fix this by setting the value based on first available converter. Fixes: 4005d1b ("ASoC: soc-dai: don't call PCM audio ops if the stream is not supported") Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a03cfad commit 454abb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/pci/hda/patch_hdmi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,6 +2301,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
23012301
codec_dbg(codec, "hdmi: pcm_num set to %d\n", pcm_num);
23022302

23032303
for (idx = 0; idx < pcm_num; idx++) {
2304+
struct hdmi_spec_per_cvt *per_cvt;
23042305
struct hda_pcm *info;
23052306
struct hda_pcm_stream *pstr;
23062307

@@ -2316,6 +2317,11 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
23162317
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
23172318
pstr->substreams = 1;
23182319
pstr->ops = generic_ops;
2320+
2321+
per_cvt = get_cvt(spec, 0);
2322+
pstr->channels_min = per_cvt->channels_min;
2323+
pstr->channels_max = per_cvt->channels_max;
2324+
23192325
/* pcm number is less than pcm_rec array size */
23202326
if (spec->pcm_used >= ARRAY_SIZE(spec->pcm_rec))
23212327
break;

0 commit comments

Comments
 (0)