Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732657

RE: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B format

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Ryan Lee <RyanS.Lee@maximintegrated.com>
Newsgroups linux.kernel
Subject RE: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B format
Date Fri, 15 Sep 2017 02:40:01 +0200
Message-ID <upMPL-3L6-1@gated-at.bofh.it> (permalink)
References <upHwK-hq-11@gated-at.bofh.it> <upHwK-hq-9@gated-at.bofh.it>
X-Original-To Mark Brown <broonie@kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=maximintegrated.onmicrosoft.com; s=selector1-maximintegrated-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=33xeGi+de0vFBAF8fCdjbrl6GAmO6GnQjc+yOZusVD8=; b=SbtPtvUfwV5dWc+MX8ETW4pxKSSQFLrDmzvMVn4lds/XeuWTXDaJy4Fpu2nWRo1dSFiq9TQIhnBCGS3Bg1/MmG1K4oVLc5y1pu4nVTYyx+IeGJlrlSIBVzJCLC1TkfnwpIBdS9VDAQdiJqbRUeBOzBiCOTm0S/uH0gDAyBjPpCM=
Thread-Topic [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B format
Thread-Index AQHTKxjU67KyBS/f6U2VnvD7xd71p6K0vkqAgABfGUA=
Accept-Language en-US, ko-KR
Content-Language en-US
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=RyanS.Lee@maximintegrated.com;
X-Originating-IP [204.17.143.20]
X-Ms-Publictraffictype Email
X-Microsoft-Exchange-Diagnostics 1;SN1PR11MB0813;6:hu6JYW905+kCqYnMiLpgbHEBKT3g9MytjvanGWR06I1VUCbRltIikjSaCLh2H76SPeII9u6/3hWuIj3UzNL0eL74whXF0E0Prx+i13ijVYBsl7ECKHe7f6FGI4jcFU6NWKVk2/k6X+LI96mL2+D/tQV79l/eLgBsUgLL8tq9hvfjI8u2HZ1EI63f6gVuAnkXPof8ue7g4Z4NJ/uwxmuqfawfjtJ8o98nE2MFJdAr7F6ldJAeMV2aG3Rns8JbxLCCxPpk9pMbHnSUArLwSXL1PvkHC0BfjT4dMpOuZH9cful+Q81+FB5v5XlmQ88UJwjm4AP17w5zcDyIZ3NiP1wlsw==;5:Qyjnomr/4UNWz/7OjkkrIqSxomr+AYnHVbq95WBGurTHoAGzF5xNuFUDk3zWV7+9cQ/2xYB6fjkBLdm00Ma2DvDAhnCWvVy9lrFSdIPxEAK8Gwh3xszWv5Vk7Febzofo6RwuF/EtAx9O2J4KDAheDN+khngbo2cXz3JAaBFSBK4=;24:N9lP4nnGrmZDwTkAG4bz0VH1ZU1LZK2VuGxpyiMgJYfkbJrL4hJQHGCXOELQ8+POlOf3wztXG1fbjnTSIOqOl0UrjKwwpr/CO8UiEGvgLec=;7:LnKUkto2Io0ZE38VxV90G/xEXXwR25MYryw9NsKfMIHo5Av/OmgPAKiHhL0eUzgjCeTEcHpUZlmA+zXBsbi+vcG/mp35RF6c3hIFY13AZfNcm0rUoHIySnlZnqiscpbE9mrLOVek5g33FmZgTO2N6yllIS3oUdTwMvHT9Lr08wlYvhS+A2WesY0nk79bEsMQl7geuMkm2B7PdBCwX1WFSVWQn7XQpLMDjpgO8sx/kJ8=
X-Ms-Exchange-Antispam-Srfa-Diagnostics SSOS;
X-Ms-Office365-Filtering-Correlation-ID 761801ea-eb45-4dc9-3673-08d4fbd0ee23
X-Ms-Office365-Filtering-Ht Tenant
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:SN1PR11MB0813;
X-Ms-Traffictypediagnostic SN1PR11MB0813:
X-Exchange-Antispam-Report-Test UriScan:(9452136761055)(108721460000369)(17755550239193);
X-Microsoft-Antispam-Prvs <SN1PR11MB0813FFB0BA0D85438D1391AFE76C0@SN1PR11MB0813.namprd11.prod.outlook.com>
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SN1PR11MB0813;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SN1PR11MB0813;
X-Forefront-Prvs 0431F981D8
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(376002)(346002)(24454002)(189002)(199003)(377454003)(54534003)(13464003)(316002)(7696004)(25786009)(3280700002)(2900100001)(189998001)(6916009)(54356999)(33656002)(77096006)(50986999)(5660300001)(86362001)(229853002)(2906002)(2950100002)(68736007)(105586002)(106356001)(76176999)(8936002)(6506006)(6436002)(6246003)(101416001)(72206003)(478600001)(97736004)(7736002)(81156014)(3846002)(81166006)(53936002)(102836003)(8676002)(66066001)(110136004)(54906002)(4326008)(14454004)(9686003)(99286003)(74316002)(6116002)(55016002)(305945005)(39060400002)(3660700001);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR11MB0813;H:SN1PR11MB0847.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en;
Received-Spf None (protection.outlook.com: maximintegrated.com does not designate permitted sender hosts)
Spamdiagnosticoutput 1:99
Spamdiagnosticmetadata NSPM
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-Originatororg maximintegrated.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 15 Sep 2017 00:30:13.1355 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Crosstenant-ID fbd909df-ea69-4788-a554-f24b7854ad03
X-Ms-Exchange-Transport-Crosstenantheadersstamped SN1PR11MB0813
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 54
Organization linux.* mail to news gateway
X-Original-Cc "lgirdwood@gmail.com" <lgirdwood@gmail.com>, "perex@perex.cz" <perex@perex.cz>, "tiwai@suse.com" <tiwai@suse.com>, "kuninori.morimoto.gx@renesas.com" <kuninori.morimoto.gx@renesas.com>, "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "ryan.lee.maxim@gmail.com" <ryan.lee.maxim@gmail.com>
X-Original-Date Fri, 15 Sep 2017 00:30:13 +0000
X-Original-Message-ID <SN1PR11MB08476B6890CBC614DE9FB886E76C0@SN1PR11MB0847.namprd11.prod.outlook.com>
X-Original-References <1505146339-19380-1-git-send-email-ryans.lee@maximintegrated.com> <20170914184949.enuziddz27polfyf@sirena.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1732657

Show key headers only | View raw


>-----Original Message-----
>From: Mark Brown [mailto:broonie@kernel.org]
>Sent: Thursday, September 14, 2017 11:50 AM
>To: Ryan Lee <RyanS.Lee@maximintegrated.com>
>Cc: lgirdwood@gmail.com; perex@perex.cz; tiwai@suse.com;
>kuninori.morimoto.gx@renesas.com; alsa-devel@alsa-project.org; linux-
>kernel@vger.kernel.org; ryan.lee.maxim@gmail.com
>Subject: Re: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and
>DSP_B format
>
>On Mon, Sep 11, 2017 at 09:12:18AM -0700, Ryan Lee wrote:
>> Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
>> ---
>
>Please make an effort to write changelogs that clearly describe the change
>you're making.  This is doing way more than just implementing DSP mode, it's
>also adding a fairly complicated set_tdm_slot() implementation which isn't
>mentioned at all.  It probably needs splitting into multiple patches as well.

I split this patch as two separated patches and sent again.
One is about adding DSP_A, DSP_B support.
Another is about TDM slot configuration.
I added more changelog inside.

>
>> @@ -414,6 +504,9 @@ static int max98927_dac_event(struct
>snd_soc_dapm_widget *w,
>>  	struct max98927_priv *max98927 =
>snd_soc_codec_get_drvdata(codec);
>>
>>  	switch (event) {
>> +	case SND_SOC_DAPM_PRE_PMU:
>> +		max98927->tdm_mode = 0;
>> +		break;
>>  	case SND_SOC_DAPM_POST_PMU:
>>  		regmap_update_bits(max98927->regmap,
>>  			MAX98927_R003A_AMP_EN,
>
>Why is an event associated with the DAC changing something related to the DAI
>format?  These things should be unrelated.

In TDM mode, BCLK is being configured inside 'max98927_dai_tdm_slot' because TDM slot information(number of slots, slot width) is available in there.
In normal case, BCLK is being configured when 'hw_params' is called and TDM slot information is not available in this function.
So I added 'tdm_mode' variable to avoid overwrite BCLK configuration when 'hw_params' function is called after TDM slot configuration is done.
I wanted to clear this variable once playback is over so I added clear function when DAPM event is received.
I referred some codec driver change TDM related things when DAC event is received after TDM slot configuration is done.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B  format Mark Brown <broonie@kernel.org> - 2017-09-14 21:00 +0200
  RE: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B  format Ryan Lee <RyanS.Lee@maximintegrated.com> - 2017-09-15 02:40 +0200

csiph-web