Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp206324yba; Sat, 20 Apr 2019 00:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqybm39vsB/c2twCWhLbzHGOE3hsd1MIIo1OclZ/2feFCoMrZgYDuA8aMk82vAECjwBWGcB9 X-Received: by 2002:a17:902:d24:: with SMTP id 33mr8237767plu.246.1555745182906; Sat, 20 Apr 2019 00:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555745182; cv=none; d=google.com; s=arc-20160816; b=tsqyBHB5MsB3PGtw1M5MDCuAJ32GxWSBzpYp39DUXi3RJQJNp0agbupk69y3oBfN4n Y0AyfVXJ946QfJuvSVE8z0Zke/J/lHf2p22YZaJct6Pn25WFR7oXZCnDtH+CgVP7yScF FDHVoxYYFHr5XvP+rx0Z8euvg8NiD3nxJF/XjARXZmf6w16EPfIu8TXSSdVWA6esSFYA oiZFralSJLebMyZYfRHtFBHzvr57f/PxNkxVtVbZVBomOqxQTHMoVlTBY4ou3wtpxhuR NVJCvG6eN5heonZrHDvvloLF9lnS0D1lZWvMPjfubwi61gFev8467e+DHXg80TU6s3Ub y1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=WuOClTrSOvNmKqAXD1SuSJVpiyHZUdR7xNusVbm1MKo=; b=ZkRos1RqvBhtOxAJnOVDwhM0MQeuTF1jPNgAfXD9tFnwS3bdn42/VcUDvTmn7I2Yqu uOEcHPpkpESc6Yr05dlPwjNioZ35UDBRIYqLiHM1qIhaQ1pf5aiSX9ozRhD5mlSXGXjx t3gNXteYuss44M3oCR7BcEmots1pnKQ8V90m0meFDsY1+KONUv4aMxA3W4tbMxBR2zw/ 5md18x/KI6MGgOhGBO6hb04aDQvYdvvAqk7awlEdkhGgQA/mRU6VU1uAclbVfL/n+2Vj KPX1FUyZmf7xI1MQiV+Ysvl8vuuUn9TXhVIX7h52ZSVxBX7t/9by1CDOBrYFHhKEh1lt mWMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=pd0zzxxM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si7022554pgh.409.2019.04.20.00.26.07; Sat, 20 Apr 2019 00:26:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=pd0zzxxM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727397AbfDTHYE (ORCPT + 99 others); Sat, 20 Apr 2019 03:24:04 -0400 Received: from mail-eopbgr80051.outbound.protection.outlook.com ([40.107.8.51]:63214 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725912AbfDTHYD (ORCPT ); Sat, 20 Apr 2019 03:24:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WuOClTrSOvNmKqAXD1SuSJVpiyHZUdR7xNusVbm1MKo=; b=pd0zzxxMi3iSCP/i99V0t1zebTPkDZzeLwOK6PSjoT+4NnWv2dN9V4nz+AaelydsqE6USPxQxes1qb5No0ow3Fdl5de5pyAEz1qfT8Auc+hCF5id+jijwI050S6KvUHT7mWnFeH6gbOkQQsMaHkoDtBDYES6bFTaK8Pknq2o+do= Received: from AM0PR04MB6468.eurprd04.prod.outlook.com (20.179.253.81) by AM0PR04MB4738.eurprd04.prod.outlook.com (20.177.41.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.17; Sat, 20 Apr 2019 07:23:59 +0000 Received: from AM0PR04MB6468.eurprd04.prod.outlook.com ([fe80::107:1bdc:981e:e292]) by AM0PR04MB6468.eurprd04.prod.outlook.com ([fe80::107:1bdc:981e:e292%4]) with mapi id 15.20.1813.017; Sat, 20 Apr 2019 07:23:59 +0000 From: "S.j. Wang" To: Nicolin Chen CC: "timur@kernel.org" , "Xiubo.Lee@gmail.com" , "festevam@gmail.com" , "broonie@kernel.org" , "alsa-devel@alsa-project.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V4 3/3] ASoC: fsl_asrc: Unify the supported input and output rate Thread-Topic: [PATCH V4 3/3] ASoC: fsl_asrc: Unify the supported input and output rate Thread-Index: AdT3Se/OJCHu/1nQSGmgszexFm3bDw== Date: Sat, 20 Apr 2019 07:23:59 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shengjiu.wang@nxp.com; x-originating-ip: [119.31.174.69] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd501440-ccf8-4ba8-5ed2-08d6c5612866 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM0PR04MB4738; x-ms-traffictypediagnostic: AM0PR04MB4738: x-microsoft-antispam-prvs: x-forefront-prvs: 0013079544 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(396003)(366004)(39860400002)(136003)(199004)(189003)(68736007)(52536014)(66066001)(71200400001)(71190400001)(55016002)(6436002)(66556008)(64756008)(66446008)(73956011)(66946007)(1411001)(229853002)(66476007)(76116006)(6916009)(9686003)(53936002)(476003)(486006)(25786009)(6246003)(5660300002)(4326008)(102836004)(6506007)(33656002)(86362001)(14454004)(7736002)(26005)(305945005)(74316002)(186003)(478600001)(8676002)(81156014)(8936002)(81166006)(316002)(54906003)(97736004)(7696005)(99286004)(2906002)(6116002)(3846002)(19627235002)(256004)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4738;H:AM0PR04MB6468.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 84i5aHXo/BHjM5mA34aau3pxCdwC+XA5i9sGWM/zYBAwRAcIkpIr4u3Njr4UCNrsc2UpbUuLuPfMLWgrVl9ZsiWkwWKNgIQtOXS8bt8TEmP10kEwlllePXJ+Kuf33D2C8iPJnwXQpg7caJ6f5VKlV0A9ilbP1l+2VuItsNiqOpAtACKyuD/nkRXfnaseYKDQWhZYlIou+wFnqNz/sTFJl7oOLW/J8AipeX4R2EKPnja8xveG89JfYTmesD60tlBjPorC55CFUWyfKyiwpzbtkGhy3N65YIyQvX8ZSNhrlvLi5vfAKJV1ypf2kXyPcXFKKy31hlU5xhCWQS2yUc09tCFqqTeZ3MaXmCp5Vu4kUHxkgaFmOHL8TybVBZxZ2gz4E5BdWRmcxgu0XqhXeCawPxd+NEjTcLviAII7vENE8Gg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd501440-ccf8-4ba8-5ed2-08d6c5612866 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2019 07:23:59.8570 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4738 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi. >=20 > On Fri, Apr 19, 2019 at 10:23:56AM +0000, S.j. Wang wrote: > > Unify the supported input and output rate, add the 12kHz/24kHz/128kHz > > to the support list > > > > Signed-off-by: Shengjiu Wang > > --- > > sound/soc/fsl/fsl_asrc.c | 32 +++++++++++++++++++------------- > > 1 file changed, 19 insertions(+), 13 deletions(-) > > > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index > > 2c4bbc3499db..0d06e738264a 100644 > > --- a/sound/soc/fsl/fsl_asrc.c > > +++ b/sound/soc/fsl/fsl_asrc.c > > @@ -27,13 +27,14 @@ > > dev_dbg(&asrc_priv->pdev->dev, "Pair %c: " fmt, 'A' + index, > > ##__VA_ARGS__) > > > > /* Corresponding to process_option */ -static int > > supported_input_rate[] =3D { > > - 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 8820= 0, > > - 96000, 176400, 192000, > > +static unsigned int supported_asrc_rate[] =3D { > > + 5512, 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 4800= 0, > > + 64000, 88200, 96000, 128000, 176400, 192000, > > }; > > > > -static int supported_asrc_rate[] =3D { > > - 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 960= 00, > 176400, 192000, > > +static struct snd_pcm_hw_constraint_list fsl_asrc_rate_constraints =3D= { > > + .count =3D ARRAY_SIZE(supported_asrc_rate), > > + .list =3D supported_asrc_rate, > > }; > > > > /** > > @@ -293,11 +294,11 @@ static int fsl_asrc_config_pair(struct > fsl_asrc_pair *pair) > > ideal =3D config->inclk =3D=3D INCLK_NONE; > > > > /* Validate input and output sample rates */ > > - for (in =3D 0; in < ARRAY_SIZE(supported_input_rate); in++) > > - if (inrate =3D=3D supported_input_rate[in]) > > + for (in =3D 0; in < ARRAY_SIZE(supported_asrc_rate); in++) > > + if (inrate =3D=3D supported_asrc_rate[in]) > > break; >=20 > Not sure if we still need it upon having hw_constraint. Maybe m2m needs i= t? Yes. Best regards Wang shengjiu