21 lines
1.0 KiB
Diff
21 lines
1.0 KiB
Diff
Index: src/modules/module-alsa-source.c
|
|
===================================================================
|
|
--- src/modules/module-alsa-source.c.orig
|
|
+++ src/modules/module-alsa-source.c
|
|
@@ -1280,9 +1280,12 @@ int pa__init(pa_module*m) {
|
|
VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_max, sizeof(u->hw_dB_max));
|
|
#endif
|
|
|
|
- pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
|
|
- pa_assert(u->hw_dB_min < u->hw_dB_max);
|
|
- u->hw_dB_supported = TRUE;
|
|
+ if (u->hw_dB_min >= u->hw_dB_max)
|
|
+ pa_log_warn("Your kernel driver is broken: it reports a volume range from %0.2f dB to %0.2f dB which makes no sense.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
|
|
+ else {
|
|
+ pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", (double) u->hw_dB_min/100.0, (double) u->hw_dB_max/100.0);
|
|
+ u->hw_dB_supported = TRUE;
|
|
+ }
|
|
}
|
|
|
|
if (suitable &&
|