See also the linked bug report, but the short description is that some wine-only fake device was removed at some point, and winecfg's audio tab was never updated to handle that situation. This MR fixes that problem by using real devices and filling in some data structures to make that work.
I'm marking this as a draft so that others can suggest improvements or alternatives, as I'm not sure if this means of doing it is acceptable to Wine.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58204
-- v5: winecfg: Fix audio tab by fetching the default device's audio driver. mmdevapi: Set DEVPKEY_Device_Driver during MMDevice_Create().