Re: [PATCH 3/3] ASoC: tas2562: Fix default digital volume
From: Cezary Rojewski
Date: Thu Jul 16 2026 - 04:33:01 EST
On 7/15/2026 10:18 PM, Mark Brown wrote:
The tas2562 digital volume is spread over four registers and is implementedSounds like bug fix to me and a Fixes: candidate. That's a nitpick though and not a blocker.
as lookups into a table so the driver stores the value for the userspace
control in the driver data. This defaults to 0 due to kzalloc() but the
register default is 0x40400000 which maps onto something a bit over the
largest value defined in the lookup table. While it's not an exact match
update the default to the largest value, avoiding user surprise due to a
sudden change on first write.
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
sound/soc/codecs/tas2562.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index 9b863b000470..5fdbfec8ce3f 100644
--- a/sound/soc/codecs/tas2562.c
+++ b/sound/soc/codecs/tas2562.c
@@ -738,6 +738,8 @@ static int tas2562_probe(struct i2c_client *client)
data->client = client;
data->dev = &client->dev;
data->model_id = (uintptr_t)i2c_get_match_data(client);
+ /* Register default is 0x40400000, this is closest */
+ data->volume_lvl = (ARRAY_SIZE(float_vol_db_lookup) - 1) * 2;