Author: pebender
Date: Tue Apr 7 09:35:54 2009
New Revision: 4568
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/html/minimyth/document-configure.html
trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
trunk/gar-minimyth/script/meta/minimyth/files/source/lists/minimyth-bin-list
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/audio.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_AUDIO.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/05-minimyth-detect-audio.rules.disabled
trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
Log:
- Added MiniMyth configuration variables MM_AUDIO_GAIN,
MM_AUDIO_FETCH_ASOUND_CONF and MM_AUDIO_FETCH_ASOUND_STATE.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Tue Apr 7
09:35:54 2009
@@ -28,6 +28,8 @@
- Added boot line variable MM_MINIMYTH_BOOT_DEVICE for overriding the
device that MiniMyth will mount as the local MiniMyth boot directory
/minimyth.
+ - Added MiniMyth configuration variables MM_AUDIO_GAIN,
+ MM_AUDIO_FETCH_ASOUND_CONF and MM_AUDIO_FETCH_ASOUND_STATE.
Modified kernel
- Enabled IP multicast to so the kernel can drop IPTV multicast
traffic.
Modified: trunk/gar-minimyth/html/minimyth/document-configure.html
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-configure.html (original)
+++ trunk/gar-minimyth/html/minimyth/document-configure.html Tue Apr 7
09:35:54 2009
@@ -522,6 +522,38 @@
MiniMyth can override the following configuration files:
</p>
<dl>
+ <dt id="asound_conf">asound.conf</dt>
+ <dd>
+ <p>
+ The ASLA configuration file.
+ MiniMyth will use this file as the '/etc/asound.conf'.
+ Whether or not 'asound.conf' is retrieved depends on
+ '<a
href="document-minimyth_conf.html#MM_AUDIO_FETCH_ASOUND_CONF">MM_AUDIO_FETCH_ASOUND_CONF</a>'.
+ </p>
+ <p>
+ MiniMyth should be able to create a
working '/etc/asound.conf' file.
+ Therefore, if you need to modify the
auto-generated '/etc/asound.conf' file,
+ then please
+ <a href="http://www.minimyth.org/forum/">let us know</a>
+ the modifications required.
+ </p>
+ </dd>
+ <dt id="asound_state">asound.state</dt>
+ <dd>
+ <p>
+ The ASLA state file.
+ MiniMyth will use this file as the '/etc/asound.state'.
+ Whether or not 'asound.state' is retrieved depends on
+ '<a
href="document-minimyth_conf.html#MM_AUDIO_FETCH_ASOUND_STATE">MM_AUDIO_FETCH_ASOUND_STATE</a>'.
+ </p>
+ <p>
+ MiniMyth should be able to configure the audio controls
correctly.
+ Therefore, if you need to use an '/etc/asound.state' file
in order to configure the audio controls correctly,
+ then please
+ <a href="http://www.minimyth.org/forum/">let us know</a>
+ the changes that you needed to make to the audio controls.
+ </p>
+ </dd>
<dt id="authorized_keys">authorized_keys</dt>
<dd>
<p>
@@ -679,6 +711,13 @@
Whether or not 'xorg.conf' is retrieved depends on
'<a
href="document-minimyth_conf.html#MM_X_FETCH_XORG_CONF">MM_X_FETCH_XORG_CONF</a>'.
</p>
+ <p>
+ MiniMyth should be able to create a
working '/etc/X11/xorg.conf' file.
+ Therefore, if you need to modify the
auto-generated '/etc/X11/xorg.conf' file,
+ then please
+ <a href="http://www.minimyth.org/forum/">let us know</a>
+ the modifications required.
+ </p>
</dd>
</dl>
<p>
@@ -701,7 +740,7 @@
alt="Valid CSS!" height="31" width="88" /></a>
</div>
<div class="version">
- Last Updated on 2009-04-06
+ Last Updated on 2009-04-07
<br />
< mailto : webmaster at minimyth dot org >
</div>
Modified: trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html
(original)
+++ trunk/gar-minimyth/html/minimyth/document-minimyth_conf.html Tue Apr
7
09:35:54 2009
@@ -463,6 +463,9 @@
<li><a href="#MM_AUDIO_TYPE">MM_AUDIO_TYPE</a></li>
<li><a
href="#MM_AUDIO_CARD_NUMBER">MM_AUDIO_CARD_NUMBER</a></li>
<li><a
href="#MM_AUDIO_DEVICE_NUMBER">MM_AUDIO_DEVICE_NUMBER</a></li>
+ <li><a href="#MM_AUDIO_GAIN">MM_AUDIO_GAIN</a></li>
+ <li><a
href="#MM_AUDIO_FETCH_ASOUND_CONF">MM_AUDIO_FETCH_ASOUND_CONF</a></li>
+ <li><a
href="#MM_AUDIO_FETCH_ASOUND_STATE">MM_AUDIO_FETCH_ASOUND_STATE</a></li>
</ul>
<dl>
<dt id="MM_AUDIO-overview"><strong>Overview</strong></dt>
@@ -513,6 +516,40 @@
the audio device number that makes the audio work.
</p>
</dd>
+ <dt id="MM_AUDIO_GAIN"><strong>MM_AUDIO_GAIN</strong></dt>
+ <dd>
+ <p>
+ Set audio gain in percent. Valid values are 'auto' and any
integer between 0 and 100, with 'auto' the default'.
+ </p>
+ <p>
+ If the value is 'auto', then MiniMyth will auto configure
the audio gain.
+ MiniMyth uses audio card PCI/USB ids indexed lookup table
to determine the correct audio gain.
+ If your audio gain is not auto-configured to the correct
value,
+ then
+ <a href="http://www.minimyth.org/forum/">let us know</a>
+ the motherboard vendor and model,
+ the output of the commands 'lspci -mn' and 'lsusb',
and
+ the the highest audio gain that does not create distortion.
+ </p>
+ </dd>
+ <dt
id="MM_AUDIO_FETCH_ASOUND_CONF"><strong>MM_AUDIO_FETCH_ASOUND_CONF</strong></dt>
+ <dd>
+ <p>
+ Indicate whether or not to fetch the
+ '<a
href="document-configure.html#asound_conf">asound.conf</a>'
+ file from the MiniMyth system's MiniMyth read-only
configuration directory.
+ Valid values are 'yes' and 'no', with 'no' the default.
+ </p>
+ </dd>
+ <dt
id="MM_AUDIO_FETCH_ASOUND_STATE"><strong>MM_AUDIO_FETCH_ASOUND_STATE</strong></dt>
+ <dd>
+ <p>
+ Indicate whether or not to fetch the
+ '<a
href="document-configure.html#asound_state">asound.state</a>'
+ file from the MiniMyth system's MiniMyth read-only
configuration directory.
+ Valid values are 'yes' and 'no', with 'no' the default.
+ </p>
+ </dd>
</dl>
</div>
<div id="MM_VIDEO" class="section">
@@ -3025,7 +3062,7 @@
alt="Valid CSS!" height="31" width="88" /></a>
</div>
<div class="version">
- Last Updated on 2009-02-03
+ Last Updated on 2009-04-07
<br />
< mailto : webmaster at minimyth dot org >
</div>
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/lists/minimyth-bin-list
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/lists/minimyth-bin-list
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/lists/minimyth-bin-list
Tue Apr 7 09:35:54 2009
@@ -1,5 +1,6 @@
acpid
agetty
+alsactl
amixer
cvt
curl
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/audio.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/audio.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/audio.pm
Tue Apr 7 09:35:54 2009
@@ -61,53 +61,61 @@
# Unmute audio.
if (system(qq($amixer_command > $devnull 2>&1)) == 0)
{
- if ($type =~ /^(.*\+)?analog(\+.*)?$/)
+ if ((-e qq(/usr/sbin/alsactl)) && (-e q(/etc/asound.state)))
+ {
+ system(qq(/usr/sbin/alsactl -f /etc/asound.state restore));
+ }
+ else
{
- if (open(FILE, '-|', "$amixer_command"))
+ my $gain = $minimyth->var_get('MM_AUDIO_GAIN') . '%';
+ if ($type =~ /^(.*\+)?analog(\+.*)?$/)
{
- foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
+ if (open(FILE, '-|', "$amixer_command scontrols"))
{
- given ($_)
+ foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
{
- # General unmuting.
- when (/^PCM$/) {
system(qq($amixer_command set 'PCM' 90% unmute)); }
- when (/^Master$/) {
system(qq($amixer_command set 'Master' 90% unmute)); }
- when (/^Front$/) {
system(qq($amixer_command set 'Front' 90% unmute)); }
- when (/^Master Front$/) {
system(qq($amixer_command set 'Master Front' 90% unmute)); }
- when (/^Analog Front$/) {
system(qq($amixer_command set 'Analog Front' 90% unmute)); }
- when (/^Surround$/) {
system(qq($amixer_command set 'Surround' 90% unmute)); }
- when (/^Analog Side$/) {
system(qq($amixer_command set 'Analog Side' 90% unmute)); }
- when (/^Analog Rear$/) {
system(qq($amixer_command set 'Analog Rear' 90% unmute)); }
- when (/^Center$/) {
system(qq($amixer_command set 'Center' 90% unmute)); }
- when (/^LFE$/) {
system(qq($amixer_command set 'LFE' 90% unmute)); }
- when (/^Analog Center\/LFE$/) {
system(qq($amixer_command set 'Analog Center/LFE' 90% unmute)); }
- # VIA Specific unmuting.
- when (/^VIA DXS$/) {
system(qq($amixer_command set 'VIA DXS' 100% )); }
+ given ($_)
+ {
+ # General unmuting.
+ when (/^PCM$/) {
system(qq($amixer_command sset 'PCM' $gain unmute)); }
+ when (/^Master$/) {
system(qq($amixer_command sset 'Master' $gain unmute)); }
+ when (/^Front$/) {
system(qq($amixer_command sset 'Front' $gain unmute)); }
+ when (/^Master Front$/) {
system(qq($amixer_command sset 'Master Front' $gain unmute)); }
+ when (/^Analog Front$/) {
system(qq($amixer_command sset 'Analog Front' $gain unmute)); }
+ when (/^Surround$/) {
system(qq($amixer_command sset 'Surround' $gain unmute)); }
+ when (/^Analog Side$/) {
system(qq($amixer_command sset 'Analog Side' $gain unmute)); }
+ when (/^Analog Rear$/) {
system(qq($amixer_command sset 'Analog Rear' $gain unmute)); }
+ when (/^Center$/) {
system(qq($amixer_command sset 'Center' $gain unmute)); }
+ when (/^LFE$/) {
system(qq($amixer_command sset 'LFE' $gain unmute)); }
+ when (/^Analog Center\/LFE$/) {
system(qq($amixer_command sset 'Analog Center/LFE' $gain unmute)); }
+ # VIA Specific unmuting.
+ when (/^VIA DXS$/) {
system(qq($amixer_command sset 'VIA DXS' 100% )); }
+ }
}
+ close(FILE);
}
- close(FILE);
}
- }
- if ($type =~ /^(.*\+)?digital(\+.*)?$/)
- {
- if (open(FILE, '-|', "$amixer_command"))
+ if ($type =~ /^(.*\+)?digital(\+.*)?$/)
{
- foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
+ if (open(FILE, '-|', "$amixer_command scontrols"))
{
- given ($_)
+ foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
{
- # General unmuting.
- when (/^IEC958$/) {
system(qq($amixer_command set 'IEC958' on )); }
- when (/^IEC958 Front$/) {
system(qq($amixer_command set 'IEC958 Front' 90% unmute)); }
- when (/^IEC958 Side$/) {
system(qq($amixer_command set 'IEC958 Side' 90% unmute)); }
- when (/^IEC958 Rear$/) {
system(qq($amixer_command set 'IEC958 Rear' 90% unmute)); }
- when (/^IEC958 Center\/LFE$/) {
system(qq($amixer_command set 'IEC958 Center/LFE' 90% unmute)); }
- # VIA Specific unmuting.
- when (/^IEC958 Playback AC97-SPSA$/)
- {
system(qq($amixer_command set 'IEC958 Playback AC97-SPSA' 0 )); }
+ given ($_)
+ {
+ # General unmuting.
+ when (/^IEC958$/) {
system(qq($amixer_command sset 'IEC958' on )); }
+ when (/^IEC958 Front$/) {
system(qq($amixer_command sset 'IEC958 Front' $gain unmute)); }
+ when (/^IEC958 Side$/) {
system(qq($amixer_command sset 'IEC958 Side' $gain unmute)); }
+ when (/^IEC958 Rear$/) {
system(qq($amixer_command sset 'IEC958 Rear' $gain unmute)); }
+ when (/^IEC958 Center\/LFE$/) {
system(qq($amixer_command sset 'IEC958 Center/LFE' $gain unmute)); }
+ # VIA Specific unmuting.
+ when (/^IEC958 Playback AC97-SPSA$/)
+ {
system(qq($amixer_command sset 'IEC958 Playback AC97-SPSA' 0 )); }
+ }
}
+ close(FILE);
}
- close(FILE);
}
}
}
@@ -135,7 +143,7 @@
{
if ($type =~ /^(.*\+)?analog(\+.*)?$/)
{
- if (open(FILE, '-|', "$amixer_command"))
+ if (open(FILE, '-|', "$amixer_command scontrols"))
{
foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
{
@@ -162,7 +170,7 @@
}
if ($type =~ /^(.*\+)?digital(\+.*)?$/)
{
- if (open(FILE, '-|', "$amixer_command"))
+ if (open(FILE, '-|', "$amixer_command scontrols"))
{
foreach (grep(s/^Simple mixer
control '([^']*)'(,[0-9]+)?$/$1/, (<FILE>)))
{
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_AUDIO.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_AUDIO.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init/conf/MM_AUDIO.pm
Tue Apr 7 09:35:54 2009
@@ -55,4 +55,41 @@
}
};
+$var_list{'MM_AUDIO_GAIN'} =
+{
+ value_default => 'auto',
+ value_valid => 'auto|[0-9]+',
+ value_auto => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ my $value = $minimyth->detect_state_get('audio', 0, 'gain');
+ if (! defined $value)
+ {
+ $minimyth->message_log('warn', qq('unknown audio device.
assuming audio gain is '90'.));
+ $value = '90';
+ }
+ return $value;
+ }
+};
+
+$var_list{'MM_AUDIO_FETCH_ASOUND_CONF'} =
+{
+ value_default => 'no',
+ value_valid => 'no|yes',
+ value_file => 'yes',
+ file => {name_remote => '/asound.conf',
+ name_local => '/etc/asound.conf'}
+};
+
+$var_list{'MM_AUDIO_FETCH_ASOUND_STATE'} =
+{
+ value_default => 'no',
+ value_valid => 'no|yes',
+ value_file => 'yes',
+ file => {name_remote => '/asound.state',
+ name_local => '/etc/asound.state'}
+};
+
1;
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/05-minimyth-detect-audio.rules.disabled
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/05-minimyth-detect-audio.rules.disabled
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/lib/udev/rules.d/05-minimyth-detect-audio.rules.disabled
Tue Apr 7 09:35:54 2009
@@ -26,37 +26,37 @@
#-------------------------------------------------------------------------------
# Jetway J9F2-Extreme
-# ENV{mm_detect_id}=="pci:0403:00:8086:27d8:16f3:806e",
ENV{mm_detect_state_audio}="%n,"
+# ENV{mm_detect_id}=="pci:0403:00:8086:27d8:16f3:806e",
ENV{mm_detect_state_audio}="%n,,90"
# Intel DG965OT
-# ENV{mm_detect_id}=="pci:0403:00:8086:284b:8086:2503",
ENV{mm_detect_state_audio}="%n,"
+# ENV{mm_detect_id}=="pci:0403:00:8086:284b:8086:2503",
ENV{mm_detect_state_audio}="%n,,90"
# ASUS P5E-VM HDMI
-# ENV{mm_detect_id}=="pci:0403:00:8086:293e:1043:8277",
ENV{mm_detect_state_audio}="%n,"
+# ENV{mm_detect_id}=="pci:0403:00:8086:293e:1043:8277",
ENV{mm_detect_state_audio}="%n,,90"
#-------------------------------------------------------------------------------
# NVIDIA
#-------------------------------------------------------------------------------
# ASUS A7N8X-E
- ENV{mm_detect_id}=="pci:0401:00:10de:006b:1043:0c11",
ENV{mm_detect_state_audio}="%n,2"
+ ENV{mm_detect_id}=="pci:0401:00:10de:006b:1043:0c11",
ENV{mm_detect_state_audio}="%n,2,90"
# ASUS A7N8X-E
-# ENV{mm_detect_id}=="pci:0401:00:10de:006a:1043:8095",
ENV{mm_detect_state_audio}="%n,2"
+# ENV{mm_detect_id}=="pci:0401:00:10de:006a:1043:8095",
ENV{mm_detect_state_audio}="%n,2,90"
# ASUS M2NPV-VM
- ENV{mm_detect_id}=="pci:0403:00:10de:026c:1043:81cb",
ENV{mm_detect_state_audio}="%n,0"
+ ENV{mm_detect_id}=="pci:0403:00:10de:026c:1043:81cb",
ENV{mm_detect_state_audio}="%n,0,90"
# ASUS A8N-VM CSM
- ENV{mm_detect_id}=="pci:0403:00:10de:026c:10de:cb84",
ENV{mm_detect_state_audio}="%n,0"
+ ENV{mm_detect_id}=="pci:0403:00:10de:026c:10de:cb84",
ENV{mm_detect_state_audio}="%n,0,90"
#-------------------------------------------------------------------------------
# VIA
#-------------------------------------------------------------------------------
# VIA EPIA PD10000 and VIA EPIA ME6000
- ENV{mm_detect_id}=="pci:0401:00:1106:3059:1106:aa01",
ENV{mm_detect_state_audio}="%n,0"
+ ENV{mm_detect_id}=="pci:0401:00:1106:3059:1106:aa01",
ENV{mm_detect_state_audio}="%n,0,90"
# VIA EPIA SP8000E
- ENV{mm_detect_id}=="pci:0401:00:1106:3059:1106:aa01",
ENV{mm_detect_state_audio}="%n,0"
+ ENV{mm_detect_id}=="pci:0401:00:1106:3059:1106:aa01",
ENV{mm_detect_state_audio}="%n,0,90"
# VIA EPIA NX15000G
-# ENV{mm_detect_id}=="pci:0403:00:1106:3288:1106:aa09",
ENV{mm_detect_state_audio}="%n,"
+# ENV{mm_detect_id}=="pci:0403:00:1106:3288:1106:aa09",
ENV{mm_detect_state_audio}="%n,,90"
# Albatron PX865PE
-# ENV{mm_detect_id}=="pci:0401:00:1412:1724:1412:1724",
ENV{mm_detect_state_audio}="%n,"
+# ENV{mm_detect_id}=="pci:0401:00:1412:1724:1412:1724",
ENV{mm_detect_state_audio}="%n,,90"
# The state has been set, so save it.
ENV{mm_detect_state_audio}=="?*", RUN+="/lib/udev/mm_detect audio %k
$env{mm_detect_state_audio}"
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums (original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/checksums Tue Apr 7
09:35:54 2009
@@ -1 +1 @@
-3efb66840b62c7e3f9b2d5ad1cffb32c download/MiniMyth.pm
+c1666c1e504fc065f5d7a4f0bcc504df download/MiniMyth.pm
Modified: trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
==============================================================================
--- trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm
(original)
+++ trunk/gar-minimyth/script/perl/perl-MiniMyth/files/MiniMyth.pm Tue Apr
7 09:35:54 2009
@@ -391,7 +391,7 @@
my $field = shift;
my %map;
- $map{'audio'} = [ 'card_number' , 'device_number' ];
+ $map{'audio'} = [ 'card_number' , 'device_number' , 'gain' ];
$map{'backend'} = [ 'enabled'];
$map{'event'} = [ 'device' , 'type' ];
$map{'lcdproc'} = [ 'device' , 'driver'];
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---