How do I run Kodi under non-root user?

How do I run Kodi under non-root user?
What permissions do I need to set?
What group(s) does the Kodi user need to belong to?

I had to set “chmod 777 /dev/vchiq” just to get Kodi to start as non-root user; otherwise, I get this error:

Code:
* failed to open vchiq instance

Also, when I try playing a video, I get this error when running as non-root:

Code:
*** Error in `/usr/lib/kodi/kodi.bin': double free or corruption (!prev): 0x0306c680 ***
/usr/bin/kodi: line 172:  1265 Aborted                 (core dumped) "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS

I’m thinking I set the wrong permissions when I packaged my build of Kodi.