forked from pool/alsa-utils
This commit is contained in:
parent
49326f9b97
commit
cf9ec031c4
@ -55,6 +55,18 @@ index c9aa7cc..8653ec6 100644
|
|||||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Synth Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Synth Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
diff --git a/alsactl/init/hda b/alsactl/init/hda
|
||||||
|
index f457ca4..a6919f1 100644
|
||||||
|
--- a/alsactl/init/hda
|
||||||
|
+++ b/alsactl/init/hda
|
||||||
|
@@ -29,6 +29,7 @@ CTL{reset}="mixer"
|
||||||
|
CTL{name}="Master Playback Volume", CTL{value}="-13.5dB"
|
||||||
|
CTL{name}="Master Playback Switch", CTL{value}="on"
|
||||||
|
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
|
||||||
|
+CTL{name}="Speaker Playback Switch", CTL{value}="on,on"
|
||||||
|
CTL{name}="PCM Playback Volume", CTL{value}="0dB,0dB"
|
||||||
|
# capture
|
||||||
|
CTL{name}="Input Source", CTL{value}="Internal Mic"
|
||||||
diff --git a/alsamixer/Makefile.am b/alsamixer/Makefile.am
|
diff --git a/alsamixer/Makefile.am b/alsamixer/Makefile.am
|
||||||
index 6426193..1de47c6 100644
|
index 6426193..1de47c6 100644
|
||||||
--- a/alsamixer/Makefile.am
|
--- a/alsamixer/Makefile.am
|
||||||
@ -3097,10 +3109,10 @@ index 0000000..ab6255f
|
|||||||
+}
|
+}
|
||||||
diff --git a/alsamixer/colors.c b/alsamixer/colors.c
|
diff --git a/alsamixer/colors.c b/alsamixer/colors.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..f68de54
|
index 0000000..fcceb16
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/alsamixer/colors.c
|
+++ b/alsamixer/colors.c
|
||||||
@@ -0,0 +1,103 @@
|
@@ -0,0 +1,119 @@
|
||||||
+/*
|
+/*
|
||||||
+ * colors.c - color and attribute definitions
|
+ * colors.c - color and attribute definitions
|
||||||
+ * Copyright (c) 1998,1999 Tim Janik <timj@gtk.org>
|
+ * Copyright (c) 1998,1999 Tim Janik <timj@gtk.org>
|
||||||
@ -3136,7 +3148,11 @@ index 0000000..f68de54
|
|||||||
+int attr_ctl_label;
|
+int attr_ctl_label;
|
||||||
+int attr_ctl_label_focus;
|
+int attr_ctl_label_focus;
|
||||||
+int attr_ctl_mark_focus;
|
+int attr_ctl_mark_focus;
|
||||||
+int attr_ctl_bar;
|
+int attr_ctl_bar_lo;
|
||||||
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+int attr_ctl_bar_mi;
|
||||||
|
+int attr_ctl_bar_hi;
|
||||||
|
+#endif
|
||||||
+int attr_ctl_inactive;
|
+int attr_ctl_inactive;
|
||||||
+int attr_ctl_label_inactive;
|
+int attr_ctl_label_inactive;
|
||||||
+int attr_errormsg;
|
+int attr_errormsg;
|
||||||
@ -3160,6 +3176,10 @@ index 0000000..f68de54
|
|||||||
+ init_pair(7, COLOR_RED, COLOR_BLUE);
|
+ init_pair(7, COLOR_RED, COLOR_BLUE);
|
||||||
+ init_pair(8, COLOR_GREEN, COLOR_GREEN);
|
+ init_pair(8, COLOR_GREEN, COLOR_GREEN);
|
||||||
+ init_pair(9, COLOR_WHITE, COLOR_RED);
|
+ init_pair(9, COLOR_WHITE, COLOR_RED);
|
||||||
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+ init_pair(10, COLOR_WHITE, COLOR_WHITE);
|
||||||
|
+ init_pair(11, COLOR_RED, COLOR_RED);
|
||||||
|
+#endif
|
||||||
+
|
+
|
||||||
+ attr_mixer_frame = COLOR_PAIR(1);
|
+ attr_mixer_frame = COLOR_PAIR(1);
|
||||||
+ attr_mixer_text = COLOR_PAIR(1);
|
+ attr_mixer_text = COLOR_PAIR(1);
|
||||||
@ -3172,7 +3192,11 @@ index 0000000..f68de54
|
|||||||
+ attr_ctl_label = A_BOLD | COLOR_PAIR(6);
|
+ attr_ctl_label = A_BOLD | COLOR_PAIR(6);
|
||||||
+ attr_ctl_label_focus = A_BOLD | COLOR_PAIR(7);
|
+ attr_ctl_label_focus = A_BOLD | COLOR_PAIR(7);
|
||||||
+ attr_ctl_mark_focus = A_BOLD | COLOR_PAIR(4);
|
+ attr_ctl_mark_focus = A_BOLD | COLOR_PAIR(4);
|
||||||
+ attr_ctl_bar = A_BOLD | COLOR_PAIR(8);
|
+ attr_ctl_bar_lo = A_BOLD | COLOR_PAIR(8);
|
||||||
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+ attr_ctl_bar_mi = A_BOLD | COLOR_PAIR(10);
|
||||||
|
+ attr_ctl_bar_hi = A_BOLD | COLOR_PAIR(11);
|
||||||
|
+#endif
|
||||||
+ attr_ctl_inactive = COLOR_PAIR(5);
|
+ attr_ctl_inactive = COLOR_PAIR(5);
|
||||||
+ attr_ctl_label_inactive = A_REVERSE | COLOR_PAIR(5);
|
+ attr_ctl_label_inactive = A_REVERSE | COLOR_PAIR(5);
|
||||||
+ attr_errormsg = A_BOLD | COLOR_PAIR(9);
|
+ attr_errormsg = A_BOLD | COLOR_PAIR(9);
|
||||||
@ -3193,7 +3217,11 @@ index 0000000..f68de54
|
|||||||
+ attr_ctl_label = A_REVERSE;
|
+ attr_ctl_label = A_REVERSE;
|
||||||
+ attr_ctl_label_focus = A_REVERSE | A_BOLD;
|
+ attr_ctl_label_focus = A_REVERSE | A_BOLD;
|
||||||
+ attr_ctl_mark_focus = A_BOLD;
|
+ attr_ctl_mark_focus = A_BOLD;
|
||||||
+ attr_ctl_bar = A_BOLD;
|
+ attr_ctl_bar_lo = A_BOLD;
|
||||||
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+ attr_ctl_bar_mi = A_BOLD;
|
||||||
|
+ attr_ctl_bar_hi = A_BOLD;
|
||||||
|
+#endif
|
||||||
+ attr_ctl_inactive = A_NORMAL;
|
+ attr_ctl_inactive = A_NORMAL;
|
||||||
+ attr_ctl_label_inactive = A_REVERSE;
|
+ attr_ctl_label_inactive = A_REVERSE;
|
||||||
+ attr_errormsg = A_STANDOUT;
|
+ attr_errormsg = A_STANDOUT;
|
||||||
@ -3206,13 +3234,15 @@ index 0000000..f68de54
|
|||||||
+}
|
+}
|
||||||
diff --git a/alsamixer/colors.h b/alsamixer/colors.h
|
diff --git a/alsamixer/colors.h b/alsamixer/colors.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..e1d3b1a
|
index 0000000..9396004
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/alsamixer/colors.h
|
+++ b/alsamixer/colors.h
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,33 @@
|
||||||
+#ifndef COLORS_H_INCLUDED
|
+#ifndef COLORS_H_INCLUDED
|
||||||
+#define COLORS_H_INCLUDED
|
+#define COLORS_H_INCLUDED
|
||||||
+
|
+
|
||||||
|
+#define TRICOLOR_VOLUME_BAR
|
||||||
|
+
|
||||||
+extern int attr_mixer_frame;
|
+extern int attr_mixer_frame;
|
||||||
+extern int attr_mixer_text;
|
+extern int attr_mixer_text;
|
||||||
+extern int attr_mixer_active;
|
+extern int attr_mixer_active;
|
||||||
@ -3224,7 +3254,11 @@ index 0000000..e1d3b1a
|
|||||||
+extern int attr_ctl_label;
|
+extern int attr_ctl_label;
|
||||||
+extern int attr_ctl_label_focus;
|
+extern int attr_ctl_label_focus;
|
||||||
+extern int attr_ctl_mark_focus;
|
+extern int attr_ctl_mark_focus;
|
||||||
+extern int attr_ctl_bar;
|
+extern int attr_ctl_bar_lo;
|
||||||
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+extern int attr_ctl_bar_mi;
|
||||||
|
+extern int attr_ctl_bar_hi;
|
||||||
|
+#endif
|
||||||
+extern int attr_ctl_inactive;
|
+extern int attr_ctl_inactive;
|
||||||
+extern int attr_ctl_label_inactive;
|
+extern int attr_ctl_label_inactive;
|
||||||
+extern int attr_errormsg;
|
+extern int attr_errormsg;
|
||||||
@ -4330,10 +4364,10 @@ index 0000000..dbb3a9d
|
|||||||
+#endif
|
+#endif
|
||||||
diff --git a/alsamixer/mixer_display.c b/alsamixer/mixer_display.c
|
diff --git a/alsamixer/mixer_display.c b/alsamixer/mixer_display.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..aade71d
|
index 0000000..9eadcc9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/alsamixer/mixer_display.c
|
+++ b/alsamixer/mixer_display.c
|
||||||
@@ -0,0 +1,739 @@
|
@@ -0,0 +1,751 @@
|
||||||
+/*
|
+/*
|
||||||
+ * mixer_display.c - handles displaying of mixer widget and controls
|
+ * mixer_display.c - handles displaying of mixer widget and controls
|
||||||
+ * Copyright (c) 1874 Lewis Carroll
|
+ * Copyright (c) 1874 Lewis Carroll
|
||||||
@ -4730,7 +4764,7 @@ index 0000000..aade71d
|
|||||||
+{
|
+{
|
||||||
+ struct control *control;
|
+ struct control *control;
|
||||||
+ int col;
|
+ int col;
|
||||||
+ int i;
|
+ int i, c;
|
||||||
+ int left, frame_left;
|
+ int left, frame_left;
|
||||||
+ int bar_height, value;
|
+ int bar_height, value;
|
||||||
+ long volumes[2];
|
+ long volumes[2];
|
||||||
@ -4801,19 +4835,31 @@ index 0000000..aade71d
|
|||||||
+
|
+
|
||||||
+ if (control->flags & IS_ACTIVE)
|
+ if (control->flags & IS_ACTIVE)
|
||||||
+ wattrset(mixer_widget.window, 0);
|
+ wattrset(mixer_widget.window, 0);
|
||||||
+ bar_height = ((volumes[0] - min) * volume_height + max - min - 1) / (max - min);
|
+ for (c = 0; c < 2; c++) {
|
||||||
+ for (i = 0; i < volume_height; ++i)
|
+ bar_height = ((volumes[c] - min) * volume_height +
|
||||||
+ mvwaddch(mixer_widget.window, base_y - i - 1, frame_left + 1,
|
+ max - min - 1) / (max - min);
|
||||||
+ i + 1 <= bar_height
|
+ for (i = 0; i < volume_height; ++i) {
|
||||||
+ ? ACS_CKBOARD | (control->flags & IS_ACTIVE ? attr_ctl_bar : 0)
|
+ chtype ch;
|
||||||
+ : ' ' | (control->flags & IS_ACTIVE ? attr_ctl_frame : 0));
|
+ if (i + 1 > bar_height)
|
||||||
+ bar_height = ((volumes[1] - min) * volume_height + max - min - 1) / (max - min);
|
+ ch = ' ' | (control->flags & IS_ACTIVE ?
|
||||||
+ for (i = 0; i < volume_height; ++i)
|
+ attr_ctl_frame : 0);
|
||||||
+ mvwaddch(mixer_widget.window, base_y - i - 1, frame_left + 2,
|
+ else {
|
||||||
+ i + 1 <= bar_height
|
+ ch = ACS_CKBOARD;
|
||||||
+ ? ACS_CKBOARD | (control->flags & IS_ACTIVE ? attr_ctl_bar : 0)
|
+ if (!(control->flags & IS_ACTIVE))
|
||||||
+ : ' ' | (control->flags & IS_ACTIVE ? attr_ctl_frame : 0));
|
+ ;
|
||||||
+
|
+#ifdef TRICOLOR_VOLUME_BAR
|
||||||
|
+ else if (i > volume_height * 8 / 10)
|
||||||
|
+ ch |= attr_ctl_bar_hi;
|
||||||
|
+ else if (i > volume_height * 4 / 10)
|
||||||
|
+ ch |= attr_ctl_bar_mi;
|
||||||
|
+#endif
|
||||||
|
+ else
|
||||||
|
+ ch |= attr_ctl_bar_lo;
|
||||||
|
+ }
|
||||||
|
+ mvwaddch(mixer_widget.window, base_y - i - 1,
|
||||||
|
+ frame_left + c + 1, ch);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ if (control->flags & IS_ACTIVE)
|
+ if (control->flags & IS_ACTIVE)
|
||||||
+ wattrset(mixer_widget.window, attr_mixer_active);
|
+ wattrset(mixer_widget.window, attr_mixer_active);
|
||||||
+ value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
|
+ value = ((volumes[0] - min) * 100 + (max - min) / 2) / (max - min);
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 19 16:12:04 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
- tricolorize alsamixer volumes
|
||||||
|
- fix alsactl init values
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 2 16:40:29 CEST 2009 - tiwai@suse.de
|
Tue Jun 2 16:40:29 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Requires: dialog pciutils
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: Advanced Linux Sound Architecture Utilities
|
Summary: Advanced Linux Sound Architecture Utilities
|
||||||
Version: 1.0.20
|
Version: 1.0.20
|
||||||
Release: 2
|
Release: 3
|
||||||
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
||||||
Patch: alsa-utils-git-fixes.diff
|
Patch: alsa-utils-git-fixes.diff
|
||||||
Patch1: alsa-utils-gettext-version-removal.diff
|
Patch1: alsa-utils-gettext-version-removal.diff
|
||||||
@ -96,6 +96,9 @@ make %{?jobs:-j %jobs}
|
|||||||
%{_datadir}/alsa
|
%{_datadir}/alsa
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 19 2009 tiwai@suse.de
|
||||||
|
- tricolorize alsamixer volumes
|
||||||
|
- fix alsactl init values
|
||||||
* Tue Jun 02 2009 tiwai@suse.de
|
* Tue Jun 02 2009 tiwai@suse.de
|
||||||
- fix alsamixer man page about capture elements
|
- fix alsamixer man page about capture elements
|
||||||
* Fri May 29 2009 tiwai@suse.de
|
* Fri May 29 2009 tiwai@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user