size_t frame_size;
snd_pcm_info_t *pcm_info = NULL;
int err;
- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d;
+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE;
pa_usec_t usec;
pa_sink_new_data data;
goto fail;
}
+ if (pa_modargs_get_value_boolean(ma, "ignore_dB", &ignore_dB) < 0) {
+ pa_log("Failed to parse ignore_dB argument.");
+ goto fail;
+ }
+
if (use_tsched && !pa_rtclock_hrtimer()) {
pa_log_notice("Disabling timer-based scheduling because high-resolution timers are not available from the kernel.");
use_tsched = FALSE;
}
if (suitable) {
- if (snd_mixer_selem_get_playback_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
- pa_log_info("Mixer doesn't support dB information.");
+ if (ignore_dB || snd_mixer_selem_get_playback_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
+ pa_log_info("Mixer doesn't support dB information or data is ignored.");
else {
#ifdef HAVE_VALGRIND_MEMCHECK_H
VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
size_t frame_size;
snd_pcm_info_t *pcm_info = NULL;
int err;
- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d;
+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE;
pa_source_new_data data;
snd_pcm_info_alloca(&pcm_info);
goto fail;
}
+ if (pa_modargs_get_value_boolean(ma, "ignore_dB", &ignore_dB) < 0) {
+ pa_log("Failed to parse ignore_dB argument.");
+ goto fail;
+ }
+
if (use_tsched && !pa_rtclock_hrtimer()) {
pa_log_notice("Disabling timer-based scheduling because high-resolution timers are not available from the kernel.");
use_tsched = FALSE;
}
if (suitable) {
- if (snd_mixer_selem_get_capture_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
- pa_log_info("Mixer doesn't support dB information.");
+ if (ignore_dB || snd_mixer_selem_get_capture_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
+ pa_log_info("Mixer doesn't support dB information or data is ignored.");
else {
#ifdef HAVE_VALGRIND_MEMCHECK_H
VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
"tsched=<enable system timer based scheduling mode?> "
"tsched_buffer_size=<buffer size when using timer based scheduling> "
"tsched_buffer_watermark=<lower fill watermark> "
- "profile=<profile name>");
+ "profile=<profile name> "
+ "ignore_dB=<ignore dB information from the device?>");
static const char* const valid_modargs[] = {
"name",
"tsched_buffer_size",
"tsched_buffer_watermark",
"profile",
+ "ignore_dB",
NULL
};
"mmap=<enable memory mapping?> "
"tsched=<enable system timer based scheduling mode?> "
"tsched_buffer_size=<buffer size when using timer based scheduling> "
- "tsched_buffer_watermark=<lower fill watermark>");
+ "tsched_buffer_watermark=<lower fill watermark> "
+ "ignore_dB=<ignore dB information from the device?>");
static const char* const valid_modargs[] = {
"name",
"tsched",
"tsched_buffer_size",
"tsched_buffer_watermark",
+ "ignore_dB",
NULL
};
"mmap=<enable memory mapping?> "
"tsched=<enable system timer based scheduling mode?> "
"tsched_buffer_size=<buffer size when using timer based scheduling> "
- "tsched_buffer_watermark=<upper fill watermark>");
+ "tsched_buffer_watermark=<upper fill watermark> "
+ "ignore_dB=<ignore dB information from the device?>");
static const char* const valid_modargs[] = {
"name",
"tsched",
"tsched_buffer_size",
"tsched_buffer_watermark",
+ "ignore_dB",
NULL
};