From patchwork Fri Jan 11 17:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 10760373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFA0214E5 for ; Fri, 11 Jan 2019 17:23:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C08162A267 for ; Fri, 11 Jan 2019 17:23:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B46DD2A287; Fri, 11 Jan 2019 17:23:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 108862A27E for ; Fri, 11 Jan 2019 17:23:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0DD542679AF; Fri, 11 Jan 2019 18:22:53 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7B364267990; Fri, 11 Jan 2019 18:22:51 +0100 (CET) Received: from hqemgate16.nvidia.com (hqemgate16.nvidia.com [216.228.121.65]) by alsa0.perex.cz (Postfix) with ESMTP id 3391B26797E for ; Fri, 11 Jan 2019 18:22:49 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 11 Jan 2019 09:22:22 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 11 Jan 2019 09:22:48 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 11 Jan 2019 09:22:48 -0800 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 11 Jan 2019 17:22:47 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Fri, 11 Jan 2019 17:22:48 +0000 Received: from linux.nvidia.com (Not Verified[10.24.34.185]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Fri, 11 Jan 2019 09:22:47 -0800 From: Sameer Pujar To: , , Date: Fri, 11 Jan 2019 22:52:08 +0530 Message-ID: <1547227328-32558-6-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547227328-32558-1-git-send-email-spujar@nvidia.com> References: <1547227328-32558-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1547227342; bh=HoHMi5xkHE8Sfd723Dq0RJNlOko14vJOUE0aX5+ZDlg=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type; b=dMPAv/YogIY+aGSoHgok4mMAiusclYiDuAq3envcx4btCqgvJtoi/uB8ZdGjh6uha yN5y2lLbPewSMTCIfJI7QKNfC8rsQgo5fVe1RxgrvGNVw4rHc4EfWwhf0JXU4RKm10 wwPTOS4W4ctduRag+EjIIJXc+WCEiELFL+QeO0n0N+rf9HJbBHJ/wYpDaqYj80dbNL fUk8PHthu7jT1/xZeB9beI/bMEI/2UD7UN6sG03d9EgAtpmzey4oK4oTf/eSZCJ4FI u/rgXMvOJJrvgS3zrMdlcyG4cQraVAGcPoRtsnESDOQzq20ITnFBh7GaAAek4n/joQ uURy8l3Fww8NA== Cc: alsa-devel@alsa-project.org, Sameer Pujar Subject: [alsa-devel] [PATCH v2 5/5] ALSA: hda: program stripe control for codec X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Sameer Pujar Reviewed-by: Mohan Kumar D Reviewed-by: Ravindra Lokhande --- sound/pci/hda/patch_hdmi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 46f88dc..73d7042f 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -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) {