@@ -84,7 +84,7 @@ impl Mixer for AlsaMixer {
8484 warn ! ( "Alsa rounding error detected, setting maximum dB to {:.2} instead of {:.2}" , ZERO_DB . to_db( ) , max_millibel. to_db( ) ) ;
8585 max_millibel = ZERO_DB ;
8686 } else {
87- warn ! ( "Please manually set with `--volume-ctrl ` if this is incorrect" ) ;
87+ warn ! ( "Please manually set `--volume-range ` if this is incorrect" ) ;
8888 }
8989 }
9090 ( min_millibel, max_millibel)
@@ -104,12 +104,23 @@ impl Mixer for AlsaMixer {
104104
105105 let min_db = min_millibel. to_db ( ) as f64 ;
106106 let max_db = max_millibel. to_db ( ) as f64 ;
107- let db_range = f64:: abs ( max_db - min_db) ;
107+ let mut db_range = f64:: abs ( max_db - min_db) ;
108108
109109 // Synchronize the volume control dB range with the mixer control,
110110 // unless it was already set with a command line option.
111111 if !config. volume_ctrl . range_ok ( ) {
112+ if db_range > 100.0 {
113+ debug ! ( "Alsa mixer reported dB range > 100, which is suspect" ) ;
114+ warn ! ( "Please manually set `--volume-range` if this is incorrect" ) ;
115+ }
112116 config. volume_ctrl . set_db_range ( db_range) ;
117+ } else {
118+ let db_range_override = config. volume_ctrl . db_range ( ) ;
119+ debug ! (
120+ "Alsa dB volume range was detected as {} but overridden as {}" ,
121+ db_range, db_range_override
122+ ) ;
123+ db_range = db_range_override;
113124 }
114125
115126 // For hardware controls with a small range (24 dB or less),
0 commit comments