aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_plugin.c
AgeCommit message (Collapse)Author
2021-11-17fix strncpy warningstoge
2020-08-12Fixed boundary check for enumTaylor Holberton
2020-06-02mixer: Fix memory leak and other issues in mixer eventRohit kumar
Fix memory leak in mixer_wait_event(). Also, poll should be unblocked after increasing event_cnt in mixer_plugin, otherwise event_cnt can become negative during read_event. Fix the same.
2020-04-24tinyalsa: mixer_plugin: remove dummy strings for sound cardMinecrell
There does not really seem to be an usage for these dummy string, so let's remove them.
2020-04-23tinyalsa: use strncpy instead of memcpy to copy string constantMinecrell
memcpy() is arguably wrong when copying these string constants. The string constants will usually just be as long as necessary, so we might copy some random memory behind it and eventually crash. Use strncpy() instead to avoid copying characters after the null terminator. For some reason the strings in snd_ctl_card_info use unsigned chars, so we need a cast to char* to make it compile unfortunately... This fixes the following compile error on ppc64le: In function 'mixer_plug_get_card_info', inlined from 'mixer_plug_ioctl' at mixer_plugin.c:371:15: mixer_plugin.c:333:5: error: 'memcpy' forming offset [9, 16] is out of the bounds [0, 8] [-Werror=array-bounds] 333 | memcpy(card_info->id, "card_id", sizeof(card_info->id)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Not sure why that warning does not exist on other architectures.
2020-02-07tinyalsa: add support for mixer pluginsBhalchandra Gajare
Update the mixer framework to support plugins. Add ability for physical card to have either kernel registered mixer controls or plugin registered mixer control or both. Split mixer controls into two groups, one for kernel registered (hw_grp) and the other for plugin registered (virtual_grp). Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>