Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14363765pxu; Mon, 4 Jan 2021 22:32:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRZwvQ8Z7PttRVCkyK+7Qy8gBsJqZBg5nIG2vgWEyyWHB6/Iz0t0WJbYvzsNg7P26733uU X-Received: by 2002:a05:6402:1d0f:: with SMTP id dg15mr66945821edb.1.1609828354444; Mon, 04 Jan 2021 22:32:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609828354; cv=none; d=google.com; s=arc-20160816; b=V3jEH8mqovcvc4l3FlVgx4ODmxEslskUUpM1QEF7+KkZJF6jL+HHId2e6BEFZtbOfr qv9T+Ub7WZVom3nZ+6Hj/b9LRlcKc+rfHC3owT9CMAVoY7SaO9eS32fhIUHagGmQ2xSy uXEv7amjek+ZzAfE6YzM0Hy0rTzB27lvhMfpWlQRhwukBOccGcHMGhHWpg+mLL8q+mJD MMTzLfHZYwqcx/e/IJ3ZoY1+HAjDgq22APK8skkJym+RlignxE0q5zTaUkrwQCx+qdGV jD/mdcaPSn6vT1OfKEoshQy9vEacdcFd+M0+Wx5BKo5c9lAIussVNpmwRjGb0nGz8qkF spBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+TbvEK70pgMeNJJMJSEFAbEVqczYIlNcn1A6iMFsvnE=; b=OBCf5Ga1r8EeCLh3OcL629q50GH9ra57MMAfWWCpAdJhHErjOBrBYjFMiSoMlXjOvE 7PhOASh6v4JYueHQKO7txOIDPBzJXQ2x6kjJHE/W0nQEFJ0KYmQ+kjldXIslLnYRUkPh eCjqqo/dS6BKW+OzzZwyka/v3vJi5RheLdkADUpyk2x3ZfqB/KcWB+SrlVtdqLdDsCpe ruveQfUmoEAD1jPR4Ifm7WPmh8pXbiayk+GMjfTk4QiqlzjK+Z54bg8NIXWGMhA4hOdm Nv2zSyQC/cf5cH4lyDUsFwv7aH27W+mi9dmXI4ocuZ4xtr/CcXFU7kFfUFgroXCXLqmo pVUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VRFUKKcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si28999732ejr.334.2021.01.04.22.32.11; Mon, 04 Jan 2021 22:32:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VRFUKKcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbhAEGbX (ORCPT + 99 others); Tue, 5 Jan 2021 01:31:23 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:16724 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbhAEGbW (ORCPT ); Tue, 5 Jan 2021 01:31:22 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 04 Jan 2021 22:30:42 -0800 Received: from [10.25.100.71] (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 5 Jan 2021 06:30:35 +0000 Subject: Re: [PATCH 2/2] ALSA: hda/tegra: fix tegra-hda on tegra30 soc To: Peter Geis , Michael Turquette , Stephen Boyd , "Peter De Schrijver" , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Jaroslav Kysela , Takashi Iwai , Mohan Kumar CC: , , , , Ion Agorria References: <20201225012025.507803-1-pgwipeout@gmail.com> <20201225012025.507803-3-pgwipeout@gmail.com> From: Sameer Pujar Message-ID: <0c3665b2-bac6-546a-bdd4-0ab7a90adf7c@nvidia.com> Date: Tue, 5 Jan 2021 12:00:29 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201225012025.507803-3-pgwipeout@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1609828242; bh=+TbvEK70pgMeNJJMJSEFAbEVqczYIlNcn1A6iMFsvnE=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding: Content-Language:X-Originating-IP:X-ClientProxiedBy; b=VRFUKKclHq/2JaUXtTHG2IvmplsF4cEUVv+dvwRSHRNg9oDsK0HASEjYbR6dysveJ hz5IEXn8h96NnUF4hw650hWsM4Npsn1Q4peEf6yOgPD5qf4KBoqdwEgr3HOkuJjq6y VCtU5PeVRothSPjDO0pAphq5l/bCRR9zQJN63G16mcpuvtnto5XS8ixo4mLJ+jwNpi TdOmEkn9RRteF8QEWVSIY+Zmc1Dc45G0uZGJZ1+fejUs+ll5D5OLqTmF1g2+wfsmA7 H3nO6isudhca8rAGTYv6fJmmoLWKKideLZldwEPmvKcwps3+951MupvV78dc/hPtud Y2qtuKU+3NpnA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/25/2020 6:50 AM, Peter Geis wrote: > External email: Use caution opening links or attachments > > > Currently hda on tegra30 fails to open a stream with an input/output error. > This is similar to the issue referenced in [1]. > > For example: > speaker-test -Dhw:0,3 -c 2 > > speaker-test 1.2.2 > > Playback device is hw:0,3 > Stream parameters are 48000Hz, S16_LE, 2 channels > Using 16 octaves of pink noise > Rate set to 48000Hz (requested 48000Hz) > Buffer size range from 64 to 16384 > Period size range from 32 to 8192 > Using max buffer size 16384 > Periods = 4 > was set period_size = 4096 > was set buffer_size = 16384 > 0 - Front Left > Write error: -5,Input/output error > xrun_recovery failed: -5,Input/output error > Transfer failed: Input/output error > > [1] states "Due to a legacy HW design problem", implying the issue applies to all previous tegra-hda devices. > The tegra-hda device was introduced in tegra30 but only utilized in tegra124 until now. > For this reason it is unknown when this issue first manifested. > > Applying the fix in [1] universally resolves this issue on tegra30. > Tested on the Ouya game console and the tf201 tablet. > > [1] 60019d8c650d ("ALSA: hda/tegra: workaround playback failure on Tegra194") This issue was never seen on Tegra210/Tegra186 and hence at that time it was thought to be specific to Tegra194. I never tested this on Tegra30 since I don't have this device. I will clarify this with HW folks if workaround is safer for all chips. > > Signed-off-by: Peter Geis > Tested-by: Ion Agorria > --- > sound/pci/hda/hda_tegra.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c > index 70164d1428d4..f8d61e677a09 100644 > --- a/sound/pci/hda/hda_tegra.c > +++ b/sound/pci/hda/hda_tegra.c > @@ -388,8 +388,7 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) > * in powers of 2, next available ratio is 16 which can be > * used as a limiting factor here. > */ > - if (of_device_is_compatible(np, "nvidia,tegra194-hda")) > - chip->bus.core.sdo_limit = 16; > + chip->bus.core.sdo_limit = 16; Future Tegra chips address this problem and hence cannot be enforced by default. May be we can have like below: if (of_device_is_compatible(np, "nvidia,tegra30-hda")) chip->bus.core.sdo_limit = 16; > > /* codec detection */ > if (!bus->codec_mask) { > -- > 2.25.1 >