Commit 6c986cfef4a104ad39faf381014b7c315984cab8
1 parent
a1b17e4f4c
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
dm: sound: Start i2c IDs from 0
The current ID enums start from 1 but there does not seem to be any reason that they cannot start with 0. Adjust the code to avoid the +1 in codec_init(). Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 3 changed files with 4 additions and 6 deletions Side-by-side Diff
drivers/sound/max98095.h
drivers/sound/sound-i2s.c
... | ... | @@ -120,13 +120,11 @@ |
120 | 120 | debug("device = %s\n", codectype); |
121 | 121 | if (!strcmp(codectype, "wm8994")) { |
122 | 122 | /* Check the codec type and initialise the same */ |
123 | - ret = wm8994_init(blob, pi2s_tx->id + 1, | |
124 | - pi2s_tx->samplingrate, | |
123 | + ret = wm8994_init(blob, pi2s_tx->id, pi2s_tx->samplingrate, | |
125 | 124 | (pi2s_tx->samplingrate * (pi2s_tx->rfs)), |
126 | 125 | pi2s_tx->bitspersample, pi2s_tx->channels); |
127 | 126 | } else if (!strcmp(codectype, "max98095")) { |
128 | - ret = max98095_init(blob, pi2s_tx->id + 1, | |
129 | - pi2s_tx->samplingrate, | |
127 | + ret = max98095_init(blob, pi2s_tx->id, pi2s_tx->samplingrate, | |
130 | 128 | (pi2s_tx->samplingrate * (pi2s_tx->rfs)), |
131 | 129 | pi2s_tx->bitspersample); |
132 | 130 | } else { |