Commit 8aaa414fadaec2b682168a5c937a3950a77956bf
Committed by
Mark Brown
1 parent
c9eaa447e7
Exists in
master
and in
13 other branches
ASoC: alc5623: Fix regmap endianness
Commit 0cd257bf9b9b0cbb4fa1a5c988a232506997867c, "ASoC: alc5623: Convert to direct regmap API usage" broke probing of the codec, because of wrong endinness of the ID and codec version read from the device. Fix this by removing the existing flipping of the endiannes, and extracting the codec type byte from the word from the regmap. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
sound/soc/codecs/alc5623.c
... | ... | @@ -1018,13 +1018,13 @@ |
1018 | 1018 | dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret); |
1019 | 1019 | return ret; |
1020 | 1020 | } |
1021 | - vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8); | |
1022 | 1021 | |
1023 | 1022 | ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2); |
1024 | 1023 | if (ret < 0) { |
1025 | 1024 | dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret); |
1026 | 1025 | return ret; |
1027 | 1026 | } |
1027 | + vid2 >>= 8; | |
1028 | 1028 | |
1029 | 1029 | if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) { |
1030 | 1030 | dev_err(&client->dev, "unknown or wrong codec\n"); |