#10 Create configuration screen for sound and brightness (if available)

Đã đóng
%! (template.HTML=6 năm trước cách đây)đang mở bởi clementinecomputing · 3 ý kiến

As far as I can tell, the screens don't have a brightness setting.

With the 'quick dim' feature, the brightness shouldn't be such a high priority.

The sound is a priority and should have a facility to reduce be able to set the volume in the driver facing application.

This "works for me" (save into changevol script):

#!/bin/bash

volpct=100
if [[ "$1" != "" ]] ; then
  volpct=$1
fi
numid=`amixer controls | grep 'PCM Playback Volume' | head -n1 | cut -f1 -d',' | cut -f2 -d'='`
if [[ "$numid" == "" ]] ; then exit 1; fi
amixer cset numid=$numid "${volpct}%"  > /dev/null
exit 0

Quick test:

changevol 90
espeak "I'm speaking at 90% volume" --stdout | aplay -
changevol 100
espeak "I'm speaking at 100% volume" --stdout | aplay -

Note that at 50% it's barely audible (for me).

As far as I can tell, the screens don't have a brightness setting. With the 'quick dim' feature, the brightness shouldn't be such a high priority. The sound is a priority and should have a facility to reduce be able to set the volume in the driver facing application. This "works for me" (save into `changevol` script): ``` #!/bin/bash volpct=100 if [[ "$1" != "" ]] ; then volpct=$1 fi numid=`amixer controls | grep 'PCM Playback Volume' | head -n1 | cut -f1 -d',' | cut -f2 -d'='` if [[ "$numid" == "" ]] ; then exit 1; fi amixer cset numid=$numid "${volpct}%" > /dev/null exit 0 ``` Quick test: ``` changevol 90 espeak "I'm speaking at 90% volume" --stdout | aplay - changevol 100 espeak "I'm speaking at 100% volume" --stdout | aplay - ``` Note that at 50% it's barely audible (for me).
resolved in 7c3e3be3ec617878b68fb588faf7a92d8a856583
Đăng nhập để tham gia bình luận.
Không có Milestone
Không có người được phân công
1 tham gia
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.