Uninitialized variable sig_bits was used while configuring stream params
for codec module. These params are used to configure PCM settings for
APBridgeA.
Usually, this is dependent on codec capability and thus populated via
codec dai_driver definition. In our case, it is fixed to 16 based on the
data format, container supported.
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
gb_pm_runtime_put_noidle(bundle);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ sig_bits = dai->driver->playback.sig_bits;
+ else
+ sig_bits = dai->driver->capture.sig_bits;
+
params->state = GBAUDIO_CODEC_HWPARAMS;
params->format = format;
params->rate = rate;
.rate_min = 48000,
.channels_min = 1,
.channels_max = 2,
+ .sig_bits = 16,
},
.capture = {
.stream_name = "I2S 0 Capture",
.rate_min = 48000,
.channels_min = 1,
.channels_max = 2,
+ .sig_bits = 16,
},
.ops = &gbcodec_dai_ops,
},