gharris999 wrote:
> Ok, -o hw:CARD=DragonFly -V PCM allows me to...um, do nothing. It
> seems like squeezelite thinks it has control of volume via alsamixer,
> but all attempts at changing the volume immediately sets the volume in
> alsamixer to 0:
>
> >
Code:
--------------------
> >
> /usr/local/bin/squeezelite -o hw:CARD=DragonFly -V PCM -d output=debug -f
/var/log/squeezelite/squeezelite.log -m 19:9e:74:71:e9:a9 -n
SQUEEZENAS_SqueezeLite -s 127.0.0.1
> [13:35:15.582134] output_init_alsa:789 init output
> [13:35:15.582352] output_init_alsa:813 requested alsa_buffer: 40
alsa_period: 4 format: any mmap: 1
> [13:35:15.582395] output_init_common:342 outputbuf size: 3528000
> [13:35:15.582472] output_init_common:366 idle timeout: 0
> [13:35:15.585320] output_init_common:405 supported rates: 96000 88200 48000
44100
> [13:35:15.591806] output_init_alsa:825 memory locked
> [13:35:15.592250] output_thread:613 open output device: hw:CARD=DragonFly
> [13:35:15.592272] output_init_alsa:848 set output sched fifo rt: 45
> [13:35:15.593417] alsa_open:330 opening device at: 44100
> [13:35:15.596189] alsa_open:381 opened device hw:CARD=DragonFly using
format: S24_3LE sample rate: 44100 mmap: 1
> [13:35:15.596304] alsa_open:460 buffer: 40 period: 4 -> buffer size: 1764
period size: 441
> [13:35:15.802381] set_volume:220 setting vol dB
> [13:35:15.806609] set_volume:236 PCM left: 0.0dB -> 0 right: 0.0dB -> 0
> [13:35:15.807146] set_volume:220 setting vol dB
> [13:35:15.807215] set_volume:236 PCM left: 0.0dB -> 0 right: 0.0dB -> 0
> [13:35:15.918472] _output_frames:59 start buffer frames: 102400
> [13:35:15.918652] _output_frames:144 track start sample rate: 44100
replay_gain: 0
> [13:35:41.162943] set_volume:220 setting vol dB
> [13:35:41.167208] set_volume:236 PCM left: -19.9dB -> 0 right: -19.9dB -> 0
> [13:35:41.167689] set_volume:220 setting vol dB
> [13:35:41.167755] set_volume:236 PCM left: -19.9dB -> 0 right: -19.9dB -> 0
> [13:35:42.226221] set_volume:220 setting vol dB
> [13:35:42.226305] set_volume:236 PCM left: -14.7dB -> 0 right: -14.7dB -> 0
> [13:35:42.227404] set_volume:220 setting vol dB
> [13:35:42.227477] set_volume:236 PCM left: -14.7dB -> 0 right: -14.7dB -> 0
> [13:35:44.434119] set_volume:220 setting vol dB
> [13:35:44.434194] set_volume:236 PCM left: -9.9dB -> 0 right: -9.9dB -> 0
> [13:35:44.435336] set_volume:220 setting vol dB
> [13:35:44.435410] set_volume:236 PCM left: -9.9dB -> 0 right: -9.9dB -> 0
> [13:35:58.379154] set_volume:220 setting vol dB
> [13:35:58.379233] set_volume:236 PCM left: -4.9dB -> 0 right: -4.9dB -> 0
> [13:35:58.380362] set_volume:220 setting vol dB
> [13:35:58.380435] set_volume:236 PCM left: -4.9dB -> 0 right: -4.9dB -> 0
> [13:35:59.315002] set_volume:220 setting vol dB
> [13:35:59.315078] set_volume:236 PCM left: 0.0dB -> 0 right: 0.0dB -> 0
> [13:35:59.316168] set_volume:220 setting vol dB
> [13:35:59.316240] set_volume:236 PCM left: 0.0dB -> 0 right: 0.0dB -> 0
>
--------------------
> >
> I have to manually go into alsamixer and push the PCM volume back up
> to get any sound out of the DragonFly.
Hum - that's strange - could you try adjusting the code so it sets via
the raw setting rather than db api?
Code:
--------------------
diff --git a/output_alsa.c b/output_alsa.c
index ad36384..f265499 100644
--- a/output_alsa.c
+++ b/output_alsa.c
@@ -200,7 +200,7 @@ void set_volume(unsigned left, unsigned right) {
snd_mixer_selem_set_playback_switch_all(elem, 1); // unmute
}
- if ((err = snd_mixer_selem_get_playback_dB_range(elem, &min, &max)) <
0) {
+ if (0 && (err = snd_mixer_selem_get_playback_dB_range(elem, &min,
&max)) < 0) {
// unable to get db range - set using raw values
if ((err = snd_mixer_selem_get_playback_volume_range(elem, &min, &max)) < 0) {
LOG_ERROR("unable to get volume raw", min, max);
--------------------
------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=97046
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix