module-alsa-card: handle udev PULSE_MODARGS

Allow adding module arguments using udev PULSE_MODARGS environment variable and
fail module loading if there is a problem with PULSE_MODARGS

This helps setting e.g. 'tsched=0' for specific devices without a need to create
full load module entry in default.pa.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/436>
This commit is contained in:
Igor V. Kovalenko 2020-12-13 13:09:19 +03:00
parent 19e34d8d5b
commit d15b31d751
3 changed files with 77 additions and 0 deletions

View file

@ -95,4 +95,11 @@ int pa_modargs_get_proplist(pa_modargs *ma, const char *name, pa_proplist *p, pa
* have any particular order. */
const char *pa_modargs_iterate(pa_modargs *ma, void **state);
/* Remove entry by key. Returns 0 if successful, -1 otherwise */
int pa_modargs_remove_key(pa_modargs *ma, const char *key);
/* Add all key/value pairs from src that are is not already present in dst, to dst.
* Returns 0 if there were no errors, -1 otherwise. */
int pa_modargs_merge_missing(pa_modargs *dst, pa_modargs *src, const char* const valid_keys[]);
#endif