From nobody Sun Feb 8 18:43:32 2026 Received: from smtp134-83.sina.com.cn (smtp134-83.sina.com.cn [180.149.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD672329C69 for ; Mon, 5 Jan 2026 09:16:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604603; cv=none; b=FxcdvC88szvnqmR2J4kpLU53czUQ7Rlkv03u28icEs2WWBrPsiApXQVJIMivO7mbfGN8fuC7LqjZrL1UYlPyCvPoe7KVHVabn4U493JplBkfLmPjn2H9x2ERqDa5pqdgU0S4455cBbxkIk/tHQcqR7chS9OfxuTesaajgMQGjZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604603; c=relaxed/simple; bh=VmQeVIaLZY62OaL680YvbvJlEoAIIVmM+zLnwFNlDqE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=WdB4r2gA4m1QbzYoy6K7VrCz7YdpKrTfNbXVjKdR2zL86Id0gpI43GK9cjvlSFygQX66XGP4YL1tlm9U49OLeCAIKtohI4Rgq1WuDejoZxFeRsU1nr7omTXEPD3+Lsbdn/1bGTxXFp8iNwdHT52fIw7gww6p5Y90+QJLWLFe5js= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com; spf=pass smtp.mailfrom=everest-semi.com; arc=none smtp.client-ip=180.149.134.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=everest-semi.com Received: from unknown (HELO zy-virtual-machine.localdomain)([180.154.36.64]) by sina.net (10.185.250.29) with ESMTP id 695B814B000044A1; Mon, 5 Jan 2026 17:15:56 +0800 (CST) X-Sender: zhangyi@everest-semi.com X-Auth-ID: zhangyi@everest-semi.com Authentication-Results: sina.net; spf=none smtp.mailfrom=zhangyi@everest-semi.com; dkim=none header.i=none; dmarc=none action=none header.from=zhangyi@everest-semi.com X-SMAIL-MID: 22263D61B65940C5BE426C3B61AF3AD9 X-SMAIL-UIID: 22263D61B65940C5BE426C3B61AF3AD9-20260105-171556 From: Zhang Yi To: broonie@kernel.org, robh@kernel.org, tiwai@suse.com, devicetree@vger.kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, perex@perex.cz, krzk+dt@kernel.org Cc: amadeuszx.slawinski@linux.intel.com, krzk@kernel.org, Zhang Yi Subject: [PATCH 1/5] ASoC: dt-bindings: ES8389: Add property about power supply Date: Mon, 5 Jan 2026 17:15:44 +0800 Message-Id: <20260105091548.4196-2-zhangyi@everest-semi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260105091548.4196-1-zhangyi@everest-semi.com> References: <20260105091548.4196-1-zhangyi@everest-semi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add VDDA supply and VDDD supply Signed-off-by: Zhang Yi --- .../devicetree/bindings/sound/everest,es8389.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/everest,es8389.yaml b/= Documentation/devicetree/bindings/sound/everest,es8389.yaml index a673df485ab3..75ce0bc48904 100644 --- a/Documentation/devicetree/bindings/sound/everest,es8389.yaml +++ b/Documentation/devicetree/bindings/sound/everest,es8389.yaml @@ -30,10 +30,20 @@ properties: "#sound-dai-cells": const: 0 =20 + vdda-supply: + description: + Analogue power supply. + + vddd-supply: + description: + Interface power supply. + required: - compatible - reg - "#sound-dai-cells" + - vddd-supply + - vdda-supply =20 additionalProperties: false =20 @@ -46,5 +56,7 @@ examples: compatible =3D "everest,es8389"; reg =3D <0x10>; #sound-dai-cells =3D <0>; + vddd-supply =3D <&vdd3v3>; + vdda-supply =3D <&vdd3v3>; }; }; --=20 2.17.1 From nobody Sun Feb 8 18:43:32 2026 Received: from smtp134-79.sina.com.cn (smtp134-79.sina.com.cn [180.149.134.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23BD72C08D0 for ; Mon, 5 Jan 2026 09:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.79 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604603; cv=none; b=NM+H2S3vr1k17ldtjDQOHAKDtKXb2gMppGoCj20sdpIKUWNeHK+9CsWzGtV5AHyPmKWkniuNrYssHjIPB5Ni5N6PCl1XDai1Tv8I27kA5AfW/9yUHN5BUtV7CdickT4wxf7IppqpcJXeS95IpOSLxsxAKnWd4Nie21hxqBXnDJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604603; c=relaxed/simple; bh=lb4caJGvNDqIFgugodWEzfz06oormnVzjftBzzyBPl0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=tuTIw+ZE2Tpq7veNFc+RYejKBwK+LAwpIzkNKtLbmhIMawCbyvbCDkQ29J6iwSKgMT7gwaaNaPC4Lh8dMCd3BG8m818XLhBkTKbRm1HOGON4wh1a18iZPlWxB8KIUKYqYE0GqScjoZHIGZ7M8xQmlwM63fQNygC1m5JnkDzSNbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com; spf=pass smtp.mailfrom=everest-semi.com; arc=none smtp.client-ip=180.149.134.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=everest-semi.com Received: from unknown (HELO zy-virtual-machine.localdomain)([180.154.36.64]) by sina.net (10.185.250.29) with ESMTP id 695B814B000044A1; Mon, 5 Jan 2026 17:15:58 +0800 (CST) X-Sender: zhangyi@everest-semi.com X-Auth-ID: zhangyi@everest-semi.com Authentication-Results: sina.net; spf=none smtp.mailfrom=zhangyi@everest-semi.com; dkim=none header.i=none; dmarc=none action=none header.from=zhangyi@everest-semi.com X-SMAIL-MID: A959991583DE43449288B3140B5DABCB X-SMAIL-UIID: A959991583DE43449288B3140B5DABCB-20260105-171558 From: Zhang Yi To: broonie@kernel.org, robh@kernel.org, tiwai@suse.com, devicetree@vger.kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, perex@perex.cz, krzk+dt@kernel.org Cc: amadeuszx.slawinski@linux.intel.com, krzk@kernel.org, Zhang Yi Subject: [PATCH 2/5] ASoC: codecs: ES8389: Add members related to power supply Date: Mon, 5 Jan 2026 17:15:45 +0800 Message-Id: <20260105091548.4196-3-zhangyi@everest-semi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260105091548.4196-1-zhangyi@everest-semi.com> References: <20260105091548.4196-1-zhangyi@everest-semi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Added the members `avdd-supply` and `dvdd-supply` to enable the driver to get the power supply status. Signed-off-by: Zhang Yi --- sound/soc/codecs/es8389.c | 27 ++++++++++++++++++++++++++- sound/soc/codecs/es8389.h | 8 ++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c index a84d79f9d3d1..9400c5ca4e3a 100755 --- a/sound/soc/codecs/es8389.c +++ b/sound/soc/codecs/es8389.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -31,13 +32,20 @@ struct es8389_private { struct regmap *regmap; struct clk *mclk; + struct regulator_bulk_data core_supply[2]; unsigned int sysclk; int mastermode; =20 u8 mclk_src; + u8 vddd; enum snd_soc_bias_level bias_level; }; =20 +static const char * const es8389_core_supplies[] =3D { + "vddd", + "vdda", +}; + static bool es8389_volatile_register(struct device *dev, unsigned int reg) { @@ -818,7 +826,7 @@ static int es8389_resume(struct snd_soc_component *comp= onent) =20 static int es8389_probe(struct snd_soc_component *component) { - int ret; + int ret, i; struct es8389_private *es8389 =3D snd_soc_component_get_drvdata(component= ); =20 ret =3D device_property_read_u8(component->dev, "everest,mclk-src", &es83= 89->mclk_src); @@ -827,6 +835,14 @@ static int es8389_probe(struct snd_soc_component *comp= onent) es8389->mclk_src =3D ES8389_MCLK_SOURCE; } =20 + for (i =3D 0; i < ARRAY_SIZE(es8389_core_supplies); i++) + es8389->core_supply[i].supply =3D es8389_core_supplies[i]; + ret =3D devm_regulator_bulk_get(component->dev, ARRAY_SIZE(es8389_core_su= pplies), es8389->core_supply); + if (ret) { + dev_err(component->dev, "Failed to request core supplies %d\n", ret); + return ret; + } + es8389->mclk =3D devm_clk_get(component->dev, "mclk"); if (IS_ERR(es8389->mclk)) return dev_err_probe(component->dev, PTR_ERR(es8389->mclk), @@ -841,6 +857,13 @@ static int es8389_probe(struct snd_soc_component *comp= onent) return ret; } =20 + ret =3D regulator_bulk_enable(ARRAY_SIZE(es8389_core_supplies), es8389->c= ore_supply); + if (ret) { + dev_err(component->dev, "Failed to enable core supplies: %d\n", ret); + clk_disable_unprepare(es8389->mclk); + return ret; + } + es8389_init(component); es8389_set_bias_level(component, SND_SOC_BIAS_STANDBY); =20 @@ -907,6 +930,8 @@ static void es8389_i2c_shutdown(struct i2c_client *i2c) regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x08); regmap_write(es8389->regmap, ES8389_ISO_CTL, 0xC1); regmap_write(es8389->regmap, ES8389_PULL_DOWN, 0x00); + + regulator_bulk_disable(ARRAY_SIZE(es8389_core_supplies), es8389->core_sup= ply); } =20 static int es8389_i2c_probe(struct i2c_client *i2c_client) diff --git a/sound/soc/codecs/es8389.h b/sound/soc/codecs/es8389.h index 123d1e4b2d53..d21e72f876a6 100644 --- a/sound/soc/codecs/es8389.h +++ b/sound/soc/codecs/es8389.h @@ -137,4 +137,12 @@ #define ES8389_STATE_ON (13 << 0) #define ES8389_STATE_STANDBY (7 << 0) =20 +enum ES8389_supplies { + ES8389_SUPPLY_VD =3D 0, + ES8389_SUPPLY_VA, +}; + +#define ES8389_3V3 1 +#define ES8389_1V8 0 + #endif --=20 2.17.1 From nobody Sun Feb 8 18:43:32 2026 Received: from smtp134-83.sina.com.cn (smtp134-83.sina.com.cn [180.149.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD0C3274FDF for ; Mon, 5 Jan 2026 09:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604610; cv=none; b=Enf5ZOeZ/5EQ+VHn10RwhkOCX8WoyWSKYw+9Ds1uGulhvXbz9G4N/omIecnKqiVnpOBUfyMviXDeE5VLVerMccopgqhscAhVTkbyfJ2r0cBspei2MgpSxL6ugXqY+hzSnpjXee1Vn+BTU9+8y46tvjOvODyrz3GBtC1RB14grTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604610; c=relaxed/simple; bh=KcVv/vh+IMt2i/3H5LcV5fMNULiEDznlikXMlrPtHNs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=VeokCgWb7Asg18TUNTTDhiVtQe3ZpyGDjznstH4yL8R/DiG/h3FwM5Rf8Ik8QRBCcfo6qslG/leUDcZJefuH+moGsifnhmi6Fy4YsFemgOBfYjAePekx+vPnYsnfPr/WDHGiFhpKabA05/DD4YY7Xby9gOarlPruOyypdz5oqOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com; spf=pass smtp.mailfrom=everest-semi.com; arc=none smtp.client-ip=180.149.134.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=everest-semi.com Received: from unknown (HELO zy-virtual-machine.localdomain)([180.154.36.64]) by sina.net (10.185.250.29) with ESMTP id 695B814B000044A1; Mon, 5 Jan 2026 17:15:59 +0800 (CST) X-Sender: zhangyi@everest-semi.com X-Auth-ID: zhangyi@everest-semi.com Authentication-Results: sina.net; spf=none smtp.mailfrom=zhangyi@everest-semi.com; dkim=none header.i=none; dmarc=none action=none header.from=zhangyi@everest-semi.com X-SMAIL-MID: D78820E784BF46CAB6F27AA7255DFFEA X-SMAIL-UIID: D78820E784BF46CAB6F27AA7255DFFEA-20260105-171559 From: Zhang Yi To: broonie@kernel.org, robh@kernel.org, tiwai@suse.com, devicetree@vger.kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, perex@perex.cz, krzk+dt@kernel.org Cc: amadeuszx.slawinski@linux.intel.com, krzk@kernel.org, Zhang Yi Subject: [PATCH 3/5] ASoC: codecs: ES8389: Adjust wakeup configuration Date: Mon, 5 Jan 2026 17:15:46 +0800 Message-Id: <20260105091548.4196-4-zhangyi@everest-semi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260105091548.4196-1-zhangyi@everest-semi.com> References: <20260105091548.4196-1-zhangyi@everest-semi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Update wake-up configuration to ensure the codec works properly. Signed-off-by: Zhang Yi --- sound/soc/codecs/es8389.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c index 9400c5ca4e3a..fb650ab2dd17 100755 --- a/sound/soc/codecs/es8389.c +++ b/sound/soc/codecs/es8389.c @@ -629,10 +629,6 @@ static int es8389_set_bias_level(struct snd_soc_compon= ent *component, regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xE4); regmap_write(es8389->regmap, ES8389_RESET, 0x01); regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0xC3); - regmap_update_bits(es8389->regmap, ES8389_ADC_HPF1, 0x0f, 0x0a); - regmap_update_bits(es8389->regmap, ES8389_ADC_HPF2, 0x0f, 0x0a); - usleep_range(70000, 72000); - regmap_write(es8389->regmap, ES8389_DAC_RESET, 0X00); break; case SND_SOC_BIAS_PREPARE: break; @@ -663,6 +659,7 @@ static int es8389_mute(struct snd_soc_dai *dai, int mut= e, int direction) { struct snd_soc_component *component =3D dai->component; struct es8389_private *es8389 =3D snd_soc_component_get_drvdata(component= ); + unsigned int regv; =20 if (mute) { if (direction =3D=3D SNDRV_PCM_STREAM_PLAYBACK) { @@ -673,10 +670,22 @@ static int es8389_mute(struct snd_soc_dai *dai, int m= ute, int direction) 0x03, 0x03); } } else { + regmap_read(es8389->regmap, ES8389_CSM_STATE1, ®v); + if (regv !=3D ES8389_STATE_ON) { + regmap_update_bits(es8389->regmap, ES8389_HPSW, 0x20, 0x20); + regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0xD9); + regmap_write(es8389->regmap, ES8389_ADC_EN, 0x8F); + regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xE4); + regmap_write(es8389->regmap, ES8389_RESET, 0x01); + regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0xC3); + } + if (direction =3D=3D SNDRV_PCM_STREAM_PLAYBACK) { regmap_update_bits(es8389->regmap, ES8389_DAC_FORMAT_MUTE, 0x03, 0x00); } else { + regmap_update_bits(es8389->regmap, ES8389_ADC_HPF1, 0x0f, 0x0a); + regmap_update_bits(es8389->regmap, ES8389_ADC_HPF2, 0x0f, 0x0a); regmap_update_bits(es8389->regmap, ES8389_ADC_FORMAT_MUTE, 0x03, 0x00); } --=20 2.17.1 From nobody Sun Feb 8 18:43:32 2026 Received: from smtp134-83.sina.com.cn (smtp134-83.sina.com.cn [180.149.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15B2B1DE4F1 for ; Mon, 5 Jan 2026 09:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604610; cv=none; b=aRX5yh8ChWZkA2bjLTHVqZ1aKBw71/cvjPjWfKhrPoBEx7JH5zip2JSA3I8RT4p9ztD2x2kr6l5sghAIjqqf4m3IYOH4KJozvo7WDwui2nMajgXj2IudWMXhXGcd7bPrwmhjEgn2a7uDM+T/j/XgO8BTB1X/du0WbO8IAz63rZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604610; c=relaxed/simple; bh=dgQQ6F45oqeFammg0GAVl8jdTScUMRgVkphcMI7eQw0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=C+fg78xH5TTfVbzhIiqhfIw3BANKWwFSfexjX9ALGYowcamrEoYw9QN/BUS3WWNi4DWsQAcEPDRwF9rYtwj06uWx9V+bt/Rsg4q4AzNKfxvhfv/jNL5tw5CBBrDj4qGl88S4rVcqbk/y3D9jTbir3SiAgwgg3x/EZ7hHDsOgzmM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com; spf=pass smtp.mailfrom=everest-semi.com; arc=none smtp.client-ip=180.149.134.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=everest-semi.com Received: from unknown (HELO zy-virtual-machine.localdomain)([180.154.36.64]) by sina.net (10.185.250.29) with ESMTP id 695B814B000044A1; Mon, 5 Jan 2026 17:16:02 +0800 (CST) X-Sender: zhangyi@everest-semi.com X-Auth-ID: zhangyi@everest-semi.com Authentication-Results: sina.net; spf=none smtp.mailfrom=zhangyi@everest-semi.com; dkim=none header.i=none; dmarc=none action=none header.from=zhangyi@everest-semi.com X-SMAIL-MID: 040B10FC642D4BB7882F7315900E9696 X-SMAIL-UIID: 040B10FC642D4BB7882F7315900E9696-20260105-171602 From: Zhang Yi To: broonie@kernel.org, robh@kernel.org, tiwai@suse.com, devicetree@vger.kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, perex@perex.cz, krzk+dt@kernel.org Cc: amadeuszx.slawinski@linux.intel.com, krzk@kernel.org, Zhang Yi Subject: [PATCH 4/5] ASoC: codecs: ES8389: Add members about the version Date: Mon, 5 Jan 2026 17:15:47 +0800 Message-Id: <20260105091548.4196-5-zhangyi@everest-semi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260105091548.4196-1-zhangyi@everest-semi.com> References: <20260105091548.4196-1-zhangyi@everest-semi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Execute different configurations based on version number in order to support different versions of es8389. Signed-off-by: Zhang Yi --- sound/soc/codecs/es8389.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c index fb650ab2dd17..e16e68785088 100755 --- a/sound/soc/codecs/es8389.c +++ b/sound/soc/codecs/es8389.c @@ -38,6 +38,7 @@ struct es8389_private { =20 u8 mclk_src; u8 vddd; + int version; enum snd_soc_bias_level bias_level; }; =20 @@ -681,6 +682,10 @@ static int es8389_mute(struct snd_soc_dai *dai, int mu= te, int direction) } =20 if (direction =3D=3D SNDRV_PCM_STREAM_PLAYBACK) { + if (!es8389->version) { + regmap_write(es8389->regmap, ES8389_DAC_RESET, 0X00); + usleep_range(70000, 72000); + } regmap_update_bits(es8389->regmap, ES8389_DAC_FORMAT_MUTE, 0x03, 0x00); } else { @@ -730,7 +735,10 @@ static struct snd_soc_dai_driver es8389_dai =3D { static void es8389_init(struct snd_soc_component *component) { struct es8389_private *es8389 =3D snd_soc_component_get_drvdata(component= ); + unsigned int reg; =20 + regmap_read(es8389->regmap, ES8389_MAX_REGISTER, ®); + es8389->version =3D reg; regmap_write(es8389->regmap, ES8389_ISO_CTL, 0x00); regmap_write(es8389->regmap, ES8389_RESET, 0x7E); regmap_write(es8389->regmap, ES8389_ISO_CTL, 0x38); --=20 2.17.1 From nobody Sun Feb 8 18:43:32 2026 Received: from smtp134-83.sina.com.cn (smtp134-83.sina.com.cn [180.149.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D44C19E96D for ; Mon, 5 Jan 2026 09:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604575; cv=none; b=dl+9ieGNHBpC4EIRm8kHCAfgsZsPmMkU0QHjjofFHKDGIFhyC4I6SgrZPdvqudMHjs8G9hgyiXDsjkHVoE76DHJSh/xldzAZPdS7uDIuprX+lMmHmz+9eMK1K/kNnZIYHCPMBiLG4nUvIc/SA67B7zdu7dHkz8eWqhGtxdpH9wM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767604575; c=relaxed/simple; bh=vUvS34g9GXmO5IclRASr7QJu4wJZiTo7o8/NoyezmiU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=OioI+SAGOXFz5Fep8Ym8VP8XoypLGiM6taRat/EiyR3rdSnj2VD2n/an0KRACewLXpNvPvHIciTapymwaGd5N3DqZFSHuWJBz59tpr0cW69zOWYmu7B9zJHqohNqdKFceg4DscwJa1S8oV32QUK5YvyX9ibXZ1bHml2ZWFPdCyo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com; spf=pass smtp.mailfrom=everest-semi.com; arc=none smtp.client-ip=180.149.134.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=everest-semi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=everest-semi.com Received: from unknown (HELO zy-virtual-machine.localdomain)([180.154.36.64]) by sina.net (10.185.250.29) with ESMTP id 695B814B000044A1; Mon, 5 Jan 2026 17:16:04 +0800 (CST) X-Sender: zhangyi@everest-semi.com X-Auth-ID: zhangyi@everest-semi.com Authentication-Results: sina.net; spf=none smtp.mailfrom=zhangyi@everest-semi.com; dkim=none header.i=none; dmarc=none action=none header.from=zhangyi@everest-semi.com X-SMAIL-MID: 6994B5EED7BB4B65868C181F1DC52E7C X-SMAIL-UIID: 6994B5EED7BB4B65868C181F1DC52E7C-20260105-171604 From: Zhang Yi To: broonie@kernel.org, robh@kernel.org, tiwai@suse.com, devicetree@vger.kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, perex@perex.cz, krzk+dt@kernel.org Cc: amadeuszx.slawinski@linux.intel.com, krzk@kernel.org, Zhang Yi Subject: [PATCH 5/5] ASoC: codecs: ES8389: Update clock configuration Date: Mon, 5 Jan 2026 17:15:48 +0800 Message-Id: <20260105091548.4196-6-zhangyi@everest-semi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260105091548.4196-1-zhangyi@everest-semi.com> References: <20260105091548.4196-1-zhangyi@everest-semi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" To ensure better performance of the codec, different configurations will be employed based on power supply conditions. Signed-off-by: Zhang Yi --- sound/soc/codecs/es8389.c | 194 ++++++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 81 deletions(-) diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c index e16e68785088..8d418cae371a 100755 --- a/sound/soc/codecs/es8389.c +++ b/sound/soc/codecs/es8389.c @@ -376,95 +376,110 @@ struct _coeff_div { u8 Reg0x16; u8 Reg0x18; u8 Reg0x19; + u8 dvdd_vol; + u8 dmic_sel; }; =20 /* codec hifi mclk clock divider coefficients */ static const struct _coeff_div coeff_div[] =3D { - {32, 256000, 8000, 0x00, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {36, 288000, 8000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, = 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {48, 384000, 8000, 0x02, 0x5F, 0x04, 0xC0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {64, 512000, 8000, 0x00, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {72, 576000, 8000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, = 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {96, 768000, 8000, 0x02, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {128, 1024000, 8000, 0x00, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {192, 1536000, 8000, 0x02, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {256, 2048000, 8000, 0x01, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {288, 2304000, 8000, 0x01, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00= , 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {384, 3072000, 8000, 0x02, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {512, 4096000, 8000, 0x00, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {768, 6144000, 8000, 0x05, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {1024, 8192000, 8000, 0x01, 0x41, 0x06, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {1536, 12288000, 8000, 0x02, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {1625, 13000000, 8000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07}, - {2048, 16384000, 8000, 0x03, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {2304, 18432000, 8000, 0x11, 0x45, 0x25, 0xF0, 0x00, 0xD1, 0xB0, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {3072, 24576000, 8000, 0x05, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {32, 512000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {36, 576000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {48, 768000, 16000, 0x02, 0x57, 0x04, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {50, 800000, 16000, 0x00, 0x7E, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x00,= 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {64, 1024000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {72, 1152000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00= , 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {96, 1536000, 16000, 0x02, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {128, 2048000, 16000, 0x00, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {144, 2304000, 16000, 0x00, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x23, 0x8F, 0xB7, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {192, 3072000, 16000, 0x02, 0x65, 0x25, 0xE0, 0x00, 0xE1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {256, 4096000, 16000, 0x00, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {300, 4800000, 16000, 0x02, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {384, 6144000, 16000, 0x02, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {512, 8192000, 16000, 0x01, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {750, 12000000, 16000, 0x0E, 0x7E, 0x01, 0xC9, 0x00, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {768, 12288000, 16000, 0x02, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E}, - {1024, 16384000, 16000, 0x03, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {1152, 18432000, 16000, 0x08, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x40, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {1200, 19200000, 16000, 0x0B, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {1500, 24000000, 16000, 0x0E, 0x26, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0xC0, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {1536, 24576000, 16000, 0x05, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0xC0, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {1625, 26000000, 16000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0xC0, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= }, - {800, 19200000, 24000, 0x07, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x1A, 0x49, 0x14}, - {600, 19200000, 32000, 0x05, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x23, 0x61, 0x1B}, - {32, 1411200, 44100, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {64, 2822400, 44100, 0x00, 0x51, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {128, 5644800, 44100, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {256, 11289600, 44100, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {512, 22579200, 44100, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {32, 1536000, 48000, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {48, 2304000, 48000, 0x02, 0x55, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {50, 2400000, 48000, 0x00, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x00= , 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {64, 3072000, 48000, 0x00, 0x51, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {100, 4800000, 48000, 0x00, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {125, 6000000, 48000, 0x04, 0x6E, 0x05, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x0= 1, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {128, 6144000, 48000, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {200, 9600000, 48000, 0x01, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {250, 12000000, 48000, 0x04, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {256, 12288000, 48000, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {384, 18432000, 48000, 0x02, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {400, 19200000, 48000, 0x03, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {500, 24000000, 48000, 0x04, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0xC0, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {512, 24576000, 48000, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {800, 38400000, 48000, 0x18, 0x45, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28}, - {128, 11289600, 88200, 0x00, 0x50, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x40, 0x= 00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x32, 0x89, 0x25}, - {64, 6144000, 96000, 0x00, 0x41, 0x00, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28}, - {128, 12288000, 96000, 0x00, 0x50, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x= 00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28}, - {256, 24576000, 96000, 0x00, 0x40, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x= 00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28}, - {128, 24576000, 192000, 0x00, 0x50, 0x00, 0xC0, 0x18, 0xC1, 0x81, 0xC0, 0= x00, 0x8F, 0x7F, 0xEF, 0xC0, 0x3F, 0x7F, 0x80, 0x12, 0xC0, 0x3F, 0xF9, 0x3F= }, - - {50, 400000, 8000, 0x00, 0x75, 0x05, 0xC8, 0x01, 0xC1, 0x90, 0x10, 0x00, = 0x18, 0xC7, 0xD0, 0xC0, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {600, 4800000, 8000, 0x05, 0x65, 0x25, 0xF9, 0x00, 0xD1, 0x90, 0x10, 0x00= , 0x18, 0xC7, 0xD0, 0xC0, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {1500, 12000000, 8000, 0x0E, 0x25, 0x25, 0xE8, 0x00, 0xD1, 0x90, 0x40, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {2400, 19200000, 8000, 0x0B, 0x01, 0x00, 0xD0, 0x00, 0xD1, 0x80, 0x90, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0xC7, 0xC7, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07}, - {3000, 24000000, 8000, 0x0E, 0x24, 0x05, 0xD0, 0x00, 0xC2, 0x80, 0xC0, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07}, - {3250, 26000000, 8000, 0x40, 0x05, 0xA4, 0xC0, 0x00, 0xD1, 0x80, 0xD0, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0xC7, 0xC7, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07}, + {32, 256000, 8000, 0x00, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {36, 288000, 8000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, = 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {48, 384000, 8000, 0x02, 0x5F, 0x04, 0xC0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {50, 400000, 8000, 0x00, 0x75, 0x05, 0xC8, 0x01, 0xC1, 0x90, 0x00, 0x00, = 0x18, 0xC7, 0xD0, 0xC0, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 0}, + {50, 400000, 8000, 0x00, 0x15, 0x85, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, = 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 1}, + {64, 512000, 8000, 0x00, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {72, 576000, 8000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, = 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {96, 768000, 8000, 0x02, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, = 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2, = 2}, + {128, 1024000, 8000, 0x00, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {192, 1536000, 8000, 0x02, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {256, 2048000, 8000, 0x01, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {288, 2304000, 8000, 0x01, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00= , 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {384, 3072000, 8000, 0x02, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {512, 4096000, 8000, 0x00, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {600, 4800000, 8000, 0x05, 0x65, 0x25, 0xF9, 0x00, 0xD1, 0x90, 0x00, 0x00= , 0x18, 0xC7, 0xD0, 0xC0, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 0}, + {600, 4800000, 8000, 0x02, 0x24, 0x05, 0xD0, 0x00, 0xC2, 0x80, 0x00, 0x00= , 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 1}, + {768, 6144000, 8000, 0x05, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, 2= , 2}, + {1024, 8192000, 8000, 0x01, 0x41, 0x06, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07, = 2, 2}, + {1500, 12000000, 8000, 0x0E, 0x25, 0x25, 0xE8, 0x00, 0xD1, 0x90, 0x40, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {1536, 12288000, 8000, 0x02, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {1625, 13000000, 8000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {2048, 16384000, 8000, 0x03, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {2304, 18432000, 8000, 0x11, 0x45, 0x25, 0xF0, 0x00, 0xD1, 0xB0, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {2400, 19200000, 8000, 0x05, 0x14, 0x01, 0xC9, 0x00, 0xD2, 0x80, 0x80, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 1}, + {2400, 19200000, 8000, 0x0B, 0x01, 0x00, 0xD0, 0x00, 0xD1, 0x80, 0x80, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0xC7, 0xC7, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 0}, + {3000, 24000000, 8000, 0x0E, 0x24, 0x05, 0xD0, 0x00, 0xC2, 0x80, 0xC0, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {3072, 24576000, 8000, 0x05, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 2}, + {3250, 26000000, 8000, 0x40, 0x15, 0x85, 0xD0, 0x01, 0xC1, 0x90, 0xC0, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0x8F, 0xC7, 0x01, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 1}, + {3250, 26000000, 8000, 0x40, 0x05, 0xA4, 0xC0, 0x00, 0xD1, 0x80, 0xC0, 0x= 00, 0x31, 0xC7, 0xC5, 0x00, 0xC7, 0xC7, 0x00, 0x12, 0x00, 0x09, 0x19, 0x07,= 2, 0}, + {32, 512000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, 2,= 2}, + {36, 576000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E, 2,= 2}, + {48, 768000, 16000, 0x02, 0x57, 0x04, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00,= 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, 2,= 2}, + {50, 800000, 16000, 0x00, 0x7E, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x00,= 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, 2,= 2}, + {64, 1024000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, 2= , 2}, + {72, 1152000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00= , 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E, 2= , 2}, + {96, 1536000, 16000, 0x02, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, 2= , 2}, + {128, 2048000, 16000, 0x00, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {144, 2304000, 16000, 0x00, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x23, 0x8F, 0xBF, 0xC0, 0x1F, 0x8F, 0x01, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {192, 3072000, 16000, 0x02, 0x65, 0x25, 0xE0, 0x00, 0xE1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {256, 4096000, 16000, 0x00, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {300, 4800000, 16000, 0x02, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {384, 6144000, 16000, 0x02, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {512, 8192000, 16000, 0x01, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E, = 2, 2}, + {750, 12000000, 16000, 0x0E, 0x7E, 0x01, 0xC9, 0x00, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E,= 2, 2}, + {768, 12288000, 16000, 0x02, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E,= 2, 2}, + {1024, 16384000, 16000, 0x03, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {1152, 18432000, 16000, 0x08, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x40, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {1200, 19200000, 16000, 0x0B, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {1500, 24000000, 16000, 0x0E, 0x26, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0xC0, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {1536, 24576000, 16000, 0x05, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0xC0, 0= x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF, 0x7F, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {1625, 26000000, 16000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0xC0, 0= x00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x12, 0x31, 0x0E= , 2, 2}, + {800, 19200000, 24000, 0x07, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0xC7, 0x95, 0x00, 0x12, 0x00, 0x1A, 0x49, 0x14,= 2, 2}, + {375, 12000000, 32000, 0x0E, 0x2E, 0x05, 0xC8, 0x00, 0xC2, 0x80, 0x40, 0x= 01, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x23, 0x61, 0x1B,= 2, 0}, + {600, 19200000, 32000, 0x05, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x23, 0x61, 0x1B,= 2, 2}, + {32, 1411200, 44100, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {64, 2822400, 44100, 0x00, 0x51, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {128, 5644800, 44100, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, = 2, 2}, + {256, 11289600, 44100, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {512, 22579200, 44100, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {32, 1536000, 48000, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {48, 2304000, 48000, 0x02, 0x55, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {50, 2400000, 48000, 0x00, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x00= , 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {64, 3072000, 48000, 0x00, 0x51, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00= , 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, 2= , 2}, + {100, 4800000, 48000, 0x00, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, = 2, 2}, + {125, 6000000, 48000, 0x04, 0x6E, 0x05, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x0= 1, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, = 2, 2}, + {128, 6144000, 48000, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x0= 0, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, = 2, 2}, + {200, 9600000, 48000, 0x01, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x0= 0, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28, = 2, 2}, + {250, 12000000, 48000, 0x04, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {256, 12288000, 48000, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {384, 18432000, 48000, 0x02, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {400, 19200000, 48000, 0x03, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {500, 24000000, 48000, 0x04, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0xC0, 0x= 00, 0x18, 0x95, 0xD0, 0xC0, 0x63, 0x95, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {512, 24576000, 48000, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {800, 38400000, 48000, 0x18, 0x45, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x= 00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x00, 0x12, 0x00, 0x35, 0x91, 0x28,= 2, 2}, + {128, 11289600, 88200, 0x00, 0x50, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x40, 0x= 00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x32, 0x89, 0x25,= 2, 2}, + {64, 6144000, 96000, 0x00, 0x41, 0x00, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00= , 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28, 2= , 2}, + {96, 9216000, 96000, 0x02, 0x43, 0x00, 0xC0, 0x10, 0xC0, 0x80, 0x00, 0x00= , 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28, 2= , 2}, + {256, 24576000, 96000, 0x00, 0x40, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x= 00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F, 0x7F, 0x80, 0x12, 0xC0, 0x35, 0x91, 0x28,= 2, 2}, + {128, 24576000, 192000, 0x00, 0x50, 0x00, 0xC0, 0x18, 0xC1, 0x81, 0xC0, 0= x00, 0x8F, 0x7F, 0xBF, 0xC0, 0x3F, 0x7F, 0x80, 0x12, 0xC0, 0x3F, 0xF9, 0x3F= , 2, 2}, }; =20 -static inline int get_coeff(int mclk, int rate) +static inline int get_coeff(u8 vddd, u8 dmic, int mclk, int rate) { int i; + u8 dmic_det, vddd_det; =20 for (i =3D 0; i < ARRAY_SIZE(coeff_div); i++) { - if (coeff_div[i].rate =3D=3D rate && coeff_div[i].mclk =3D=3D mclk) - return i; + if (coeff_div[i].rate =3D=3D rate && coeff_div[i].mclk =3D=3D mclk) { + vddd_det =3D ~(coeff_div[i].dvdd_vol ^ vddd) & 0x01; + dmic_det =3D ~(coeff_div[i].dmic_sel ^ dmic) & 0x01; + vddd_det |=3D ~(coeff_div[i].dvdd_vol % 2) & 0x01; + dmic_det |=3D ~(coeff_div[i].dmic_sel % 2) & 0x01; + + if (vddd_det && dmic_det) + return i; + } } + return -EINVAL; } =20 @@ -546,8 +561,9 @@ static int es8389_pcm_hw_params(struct snd_pcm_substrea= m *substream, { struct snd_soc_component *component =3D dai->component; struct es8389_private *es8389 =3D snd_soc_component_get_drvdata(component= ); - int coeff; - u8 state =3D 0; + int coeff, ret; + u8 dmic_enable, state =3D 0; + unsigned int regv; =20 switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: @@ -578,7 +594,23 @@ static int es8389_pcm_hw_params(struct snd_pcm_substre= am *substream, es8389->sysclk =3D params_channels(params) * params_width(params) * para= ms_rate(params); } =20 - coeff =3D get_coeff(es8389->sysclk, params_rate(params)); + regmap_read(es8389->regmap, ES8389_DMIC_EN, ®v); + dmic_enable =3D regv >> 7 & 0x01; + + ret =3D regulator_get_voltage(es8389->core_supply[ES8389_SUPPLY_VD].consu= mer); + switch (ret) { + case 1800000 ... 2000000: + es8389->vddd =3D ES8389_1V8; + break; + case 2500000 ... 3300000: + es8389->vddd =3D ES8389_3V3; + break; + default: + es8389->vddd =3D ES8389_3V3; + break; + } + + coeff =3D get_coeff(es8389->vddd, dmic_enable, es8389->sysclk, params_rat= e(params)); if (coeff >=3D 0) { regmap_write(es8389->regmap, ES8389_CLK_DIV1, coeff_div[coeff].Reg0x04); regmap_write(es8389->regmap, ES8389_CLK_MUL, coeff_div[coeff].Reg0x05); --=20 2.17.1