mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 12:02:03 +02:00
ASoC: tas2562: Fix default digital volume
The tas2562 digital volume is spread over four registers and is implemented 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. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260715-asoc-tas2562-put-retval-v1-3-97bf467c924e@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9a9269dbbf
commit
58b638e7c4
|
|
@ -739,6 +739,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;
|
||||
|
||||
tas2562_parse_dt(data);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user