Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2521895pxb; Mon, 19 Apr 2021 07:40:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3Uazl9cyNotiCz2VdeG01NuHZYnt/hzDKm6Yh3q6IiZ1Ts/bPvglLOdTB3LMRZnctyiWA X-Received: by 2002:a17:902:9b97:b029:eb:7a1b:5b88 with SMTP id y23-20020a1709029b97b02900eb7a1b5b88mr22524943plp.77.1618843221830; Mon, 19 Apr 2021 07:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618843221; cv=none; d=google.com; s=arc-20160816; b=hxa9G92RucNfZiR9lQNWY1g+A99NZV5qBJstev4v2X9yABh8ufAPeOrrAexzTFkok7 O5l9w/yT54KiRXA4/fSPau+haq1s+rOmOmo/B8fxvIiqKNWPIZ2axzQPzJesgMQw5W0D E2+4i+NAerEoFk0AxcIyRp1S1vV6oTPey0PGVJM26ZrbJUjsmgTPYwEIPcWtR6mN+ymw +BkqmMuPBaCAF1tuH9BF7bIr4ylriwYOcixXnxadIfr93S9NEB5GC8S7KiS3P8taZt+9 FGBoNtt3+oYU7xExOwdj1mCU/syM+/JIzssYnQfkoTKWHh9yCujrljB+s2fN8Cen2rLU rWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ofLqp2JqoRPI3lyXVX6yMPL2+GYwFNAsAe6AsBzJ4H4=; b=asqR+B4IjhZ3uvWSFuVQm0LgxiYxog12FLAGyoaBp7gpYlzcuAZF5UIjrMhJvw7F/B it7nwUnMjBcYIzyqjEcV8j+FKIIidsf7G0dUyqQhO6FMf++7a2amK57mN+tY4DzwuCGJ QDar+OMEZ+ODRnItjfOcwgSB4uv3oRpjazdrHzn+RQl0RTsVLLdO8CKz41B8uYnyQMK/ AgqYpt5j0aMDA4HpLfUjhb136P4OiPHyXR3TmraIFA0LvzfFFICYrw7S8D595TY8fCrL iWxQTQme7cOSWwWvgdO1UXvPYW8w79whOHfahJWo5DwfYGATo7/irO0o+uJ1D/+C+Q1f nGZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M3ChaC9o; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si10331951pfc.346.2021.04.19.07.40.09; Mon, 19 Apr 2021 07:40:21 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=M3ChaC9o; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240823AbhDSNVa (ORCPT + 99 others); Mon, 19 Apr 2021 09:21:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:55434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240435AbhDSNRM (ORCPT ); Mon, 19 Apr 2021 09:17:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 24EA1613D4; Mon, 19 Apr 2021 13:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838057; bh=LT19Tsj7rRQqwqIRqGo+4VMJMhxCyuV1B6R8L5c5T+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M3ChaC9oamtxXN6XP189Q37xDVilPO+H2+FfjekKFHs9l2BhedY3n3bMgJiZ+EXz/ UJXXqAiss2SFCZjBOKo1+z29BgG+RMZzqByZZIzqG8KptMV4ndIPEeMO2XEGPEsR5s hzRmP1UNwqoNwTdeSzm7E/+PMwlyeD5HIZ4WzE4Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Shiyan , Nicolin Chen , Mark Brown , Sasha Levin Subject: [PATCH 5.10 027/103] ASoC: fsl_esai: Fix TDM slot setup for I2S mode Date: Mon, 19 Apr 2021 15:05:38 +0200 Message-Id: <20210419130528.739405229@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Shiyan [ Upstream commit e7a48c710defa0e0fef54d42b7d9e4ab596e2761 ] When using the driver in I2S TDM mode, the fsl_esai_startup() function rewrites the number of slots previously set by the fsl_esai_set_dai_tdm_slot() function to 2. To fix this, let's use the saved slot count value or, if TDM is not used and the number of slots is not set, the driver will use the default value (2), which is set by fsl_esai_probe(). Signed-off-by: Alexander Shiyan Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20210402081405.9892-1-shc_work@mail.ru Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_esai.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 39637ca78cdb..9f5f217a9607 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -524,11 +524,13 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream, ESAI_SAICR_SYNC, esai_priv->synchronous ? ESAI_SAICR_SYNC : 0); - /* Set a default slot number -- 2 */ + /* Set slots count */ regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, - ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(2)); + ESAI_xCCR_xDC_MASK, + ESAI_xCCR_xDC(esai_priv->slots)); regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR, - ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(2)); + ESAI_xCCR_xDC_MASK, + ESAI_xCCR_xDC(esai_priv->slots)); } return 0; -- 2.30.2