diff options
Diffstat (limited to 'src/modules/alsa/module-alsa-card.c')
-rw-r--r-- | src/modules/alsa/module-alsa-card.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c index ebd2f8ae..e60aa5ef 100644 --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -65,7 +65,8 @@ PA_MODULE_USAGE( "tsched_buffer_watermark=<lower fill watermark> " "profile=<profile name> " "ignore_dB=<ignore dB information from the device?> " - "sync_volume=<syncronize sw and hw voluchanges in IO-thread?>"); + "sync_volume=<syncronize sw and hw voluchanges in IO-thread?> " + "profile_set=<profile set configuration file> "); static const char* const valid_modargs[] = { "name", @@ -88,6 +89,7 @@ static const char* const valid_modargs[] = { "profile", "ignore_dB", "sync_volume", + "profile_set", NULL }; @@ -328,6 +330,11 @@ int pa__init(pa_module *m) { fn = pa_udev_get_property(alsa_card_index, "PULSE_PROFILE_SET"); #endif + if (pa_modargs_get_value(ma, "profile_set", NULL)) { + pa_xfree(fn); + fn = pa_xstrdup(pa_modargs_get_value(ma, "profile_set", NULL)); + } + u->profile_set = pa_alsa_profile_set_new(fn, &u->core->default_channel_map); pa_xfree(fn); @@ -335,6 +342,7 @@ int pa__init(pa_module *m) { goto fail; pa_alsa_profile_set_probe(u->profile_set, u->device_id, &m->core->default_sample_spec, m->core->default_n_fragments, m->core->default_fragment_size_msec); + pa_alsa_profile_set_dump(u->profile_set); pa_card_new_data_init(&data); data.driver = __FILE__; @@ -393,6 +401,14 @@ int pa__init(pa_module *m) { if (reserve) pa_reserve_wrapper_unref(reserve); + if (!pa_hashmap_isempty(u->profile_set->decibel_fixes)) + pa_log_warn("Card %s uses decibel fixes (i.e. overrides the decibel information for some alsa volume elements). " + "Please note that this feature is meant just as a help for figuring out the correct decibel values. " + "Pulseaudio is not the correct place to maintain the decibel mappings! The fixed decibel values " + "should be sent to ALSA developers so that they can fix the driver. If it turns out that this feature " + "is abused (i.e. fixes are not pushed to ALSA), the decibel fix feature may be removed in some future " + "Pulseaudio version.", u->card->name); + return 0; fail: |