Commit 053b0559 authored by Sameer Pujar's avatar Sameer Pujar Committed by Takashi Iwai

ALSA: hda: program stripe control for codec

Program codec stripe through AC_VERB_SET_STRIPE_CONTROL to use multiple
sdo lines if supported. Audio needs to be striped across number of sdo
lines for simultaneous playbacks of higher resolutions to work.
This needs to be implemented only for an Audio Output Converter and only
if the stripe bit(AC_WCAP_STRIPE) of Audio Widget Capabilities parameter
is 1.
Signed-off-by: default avatarSameer Pujar <spujar@nvidia.com>
Reviewed-by: default avatarMohan Kumar D <mkumard@nvidia.com>
Reviewed-by: default avatarRavindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9b6f7e7a
......@@ -1865,7 +1865,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
hda_nid_t pin_nid;
struct snd_pcm_runtime *runtime = substream->runtime;
bool non_pcm;
int pinctl;
int pinctl, stripe;
int err = 0;
mutex_lock(&spec->pcm_lock);
......@@ -1909,6 +1909,14 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
per_pin->channels = substream->runtime->channels;
per_pin->setup = true;
if (get_wcaps(codec, cvt_nid) & AC_WCAP_STRIPE) {
stripe = snd_hdac_get_stream_stripe_ctl(&codec->bus->core,
substream);
snd_hda_codec_write(codec, cvt_nid, 0,
AC_VERB_SET_STRIPE_CONTROL,
stripe);
}
hdmi_setup_audio_infoframe(codec, per_pin, non_pcm);
mutex_unlock(&per_pin->lock);
if (spec->dyn_pin_out) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment