pkarashchenko commented on code in PR #8819:
URL: https://github.com/apache/nuttx/pull/8819#discussion_r1139387487
##########
boards/xtensa/esp32/common/src/esp32_es8388.c:
##########
@@ -179,6 +177,35 @@ int esp32_es8388_initialize(int i2c_port, uint8_t
i2c_addr, int i2c_freq,
goto errout;
}
+ /* Now we can use this I2S interface to initialize the ES8388 input
+ * which will return an audio interface.
+ */
+
+ g_es8388_lower[1].address = i2c_addr;
+ g_es8388_lower[1].frequency = i2c_freq;
+
+ es8388 = es8388_initialize(i2c, i2s, &g_es8388_lower[1]);
+ if (es8388 == NULL)
+ {
+ auderr("ERROR: Failed to initialize the ES8388\n");
+ ret = -ENODEV;
+ goto errout;
+ }
+
+ /* Create a device name */
+
+ snprintf(devname, 12, "pcm_in%d", i2s_port);
Review Comment:
```suggestion
snprintf(devname, sizeof(devname), "pcm_in%d", i2s_port);
```
Here and similar places
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]