diff options
author | Lukas Märdian <luk@slyon.de> | 2012-11-05 20:37:24 +0100 |
---|---|---|
committer | Lukas Märdian <luk@slyon.de> | 2012-12-03 23:27:55 +0100 |
commit | d24a7eb5ca0dbca4edce97d2a8712cd650a505c4 (patch) | |
tree | cc19bb7c4cb5e9bd1db4a1cf52aa224c01742e42 | |
parent | a3ab1c182a45cbbf552db57cccba7bc6ae9dd59b (diff) | |
download | cornucopia-d24a7eb5ca0dbca4edce97d2a8712cd650a505c4.tar.gz cornucopia-d24a7eb5ca0dbca4edce97d2a8712cd650a505c4.tar.bz2 cornucopia-d24a7eb5ca0dbca4edce97d2a8712cd650a505c4.zip |
fsodeviced: router_alsa: add extra_path config
* This enables us to have a different set of scenarios
(e.g. for hwrouting on the GTA04A4)
* To use the hwrouting, we need this kernel patch (otherwise fsodeviced will crash):
http://lists.goldelico.com/pipermail/gta04-owner/2012-April/002191.html
* Just applying the kernel patch breaks swrouting on gta04a3 (everything silent during call).
Signed-off-by: Lukas Märdian <luk@slyon.de>
Tested-by: Benjamin Deering <ben_deering@swissmail.org>
-rw-r--r-- | fsodeviced/conf/GTA04/Makefile.am | 2 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/fsodeviced.conf | 5 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/Makefile.am | 12 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa-default/Makefile.am | 18 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmhandset (renamed from fsodeviced/conf/GTA04/alsa-3.4/hwgsmhandset) | 0 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmspeaker (renamed from fsodeviced/conf/GTA04/alsa-3.4/hwgsmspeaker) | 0 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa-default/headset (renamed from fsodeviced/conf/GTA04/alsa-3.4/hwheadset) | 0 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa-default/stereoout (renamed from fsodeviced/conf/GTA04/alsa-3.4/hwstereoout) | 0 | ||||
-rw-r--r-- | fsodeviced/conf/GTA04/hwrouting/alsa.conf | 21 | ||||
-rw-r--r-- | fsodeviced/configure.ac | 2 | ||||
-rw-r--r-- | fsodeviced/src/plugins/router_alsa/plugin.vala | 8 |
11 files changed, 65 insertions, 3 deletions
diff --git a/fsodeviced/conf/GTA04/Makefile.am b/fsodeviced/conf/GTA04/Makefile.am index d0ca0067..e5492c64 100644 --- a/fsodeviced/conf/GTA04/Makefile.am +++ b/fsodeviced/conf/GTA04/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.decl NULL= -SUBDIRS = alsa-3.4 +SUBDIRS = alsa-3.4 hwrouting confdir = $(sysconfdir)/freesmartphone/conf/GTA04 dist_conf_DATA = \ diff --git a/fsodeviced/conf/GTA04/fsodeviced.conf b/fsodeviced/conf/GTA04/fsodeviced.conf index ff368cc6..299781ca 100644 --- a/fsodeviced/conf/GTA04/fsodeviced.conf +++ b/fsodeviced/conf/GTA04/fsodeviced.conf @@ -58,6 +58,11 @@ suspend = 30 [fsodevice.player_alsa] [fsodevice.router_alsa] +# specify an extra path to search for alsa.conf and the scenarios +# can be used, to have a different set of scenarios +# (e.g. for hwrouting on GTA04) +# Extrapath is beeing appended to the MachineConfigurationDir. +extra_path = hwrouting/ [fsodevice.audio] player_type = alsa diff --git a/fsodeviced/conf/GTA04/hwrouting/Makefile.am b/fsodeviced/conf/GTA04/hwrouting/Makefile.am new file mode 100644 index 00000000..883a9939 --- /dev/null +++ b/fsodeviced/conf/GTA04/hwrouting/Makefile.am @@ -0,0 +1,12 @@ +include $(top_srcdir)/Makefile.decl + +NULL= + +SUBDIRS = alsa-default + +confdir = $(sysconfdir)/freesmartphone/conf/GTA04/hwrouting +dist_conf_DATA = \ + alsa.conf \ + $(NULL) + +MAINTAINERCLEANFILES = Makefile.in diff --git a/fsodeviced/conf/GTA04/hwrouting/alsa-default/Makefile.am b/fsodeviced/conf/GTA04/hwrouting/alsa-default/Makefile.am new file mode 100644 index 00000000..0cab5372 --- /dev/null +++ b/fsodeviced/conf/GTA04/hwrouting/alsa-default/Makefile.am @@ -0,0 +1,18 @@ +include $(top_srcdir)/Makefile.decl + +NULL= + +confdir = $(sysconfdir)/freesmartphone/conf/GTA04/hwrouting/alsa-default +dist_conf_DATA = \ + gsmhandset \ + gsmspeaker \ + headset \ + stereoout \ + $(NULL) + +# capturehandset +# gsmbluetooth +# gsmheadset +# voiphandset + +MAINTAINERCLEANFILES = Makefile.in diff --git a/fsodeviced/conf/GTA04/alsa-3.4/hwgsmhandset b/fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmhandset index e79c4319..e79c4319 100644 --- a/fsodeviced/conf/GTA04/alsa-3.4/hwgsmhandset +++ b/fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmhandset diff --git a/fsodeviced/conf/GTA04/alsa-3.4/hwgsmspeaker b/fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmspeaker index 50a75983..50a75983 100644 --- a/fsodeviced/conf/GTA04/alsa-3.4/hwgsmspeaker +++ b/fsodeviced/conf/GTA04/hwrouting/alsa-default/gsmspeaker diff --git a/fsodeviced/conf/GTA04/alsa-3.4/hwheadset b/fsodeviced/conf/GTA04/hwrouting/alsa-default/headset index ea28edd0..ea28edd0 100644 --- a/fsodeviced/conf/GTA04/alsa-3.4/hwheadset +++ b/fsodeviced/conf/GTA04/hwrouting/alsa-default/headset diff --git a/fsodeviced/conf/GTA04/alsa-3.4/hwstereoout b/fsodeviced/conf/GTA04/hwrouting/alsa-default/stereoout index d132568f..d132568f 100644 --- a/fsodeviced/conf/GTA04/alsa-3.4/hwstereoout +++ b/fsodeviced/conf/GTA04/hwrouting/alsa-default/stereoout diff --git a/fsodeviced/conf/GTA04/hwrouting/alsa.conf b/fsodeviced/conf/GTA04/hwrouting/alsa.conf new file mode 100644 index 00000000..ff92e2b6 --- /dev/null +++ b/fsodeviced/conf/GTA04/hwrouting/alsa.conf @@ -0,0 +1,21 @@ +[alsa] +cardname = default +default = scenario.stereoout + +# GSM +#[scenario.voiphandset] +# +[scenario.gsmspeaker] + +#[scenario.gsmheadset] +# +[scenario.gsmhandset] +# +#[scenario.gsmbluetooth] +# +#[scenario.capturehandset] + +# PCM +[scenario.stereoout] + +[scenario.headset] diff --git a/fsodeviced/configure.ac b/fsodeviced/configure.ac index 72b58e1e..1b0235c9 100644 --- a/fsodeviced/configure.ac +++ b/fsodeviced/configure.ac @@ -217,6 +217,8 @@ AC_CONFIG_FILES([ conf/openmoko_gta/alsa-2.6.39/Makefile conf/GTA04/Makefile conf/GTA04/alsa-3.4/Makefile + conf/GTA04/hwrouting/Makefile + conf/GTA04/hwrouting/alsa-default/Makefile conf/herring/Makefile conf/herring/alsa-default/Makefile data/Makefile diff --git a/fsodeviced/src/plugins/router_alsa/plugin.vala b/fsodeviced/src/plugins/router_alsa/plugin.vala index 432ed600..7cfb445e 100644 --- a/fsodeviced/src/plugins/router_alsa/plugin.vala +++ b/fsodeviced/src/plugins/router_alsa/plugin.vala @@ -95,7 +95,11 @@ class LibAlsa : FsoDevice.BaseAudioRouter private void initScenarios() { - configurationPath = FsoFramework.Utility.machineConfigurationDir() + "/alsa.conf"; + // load extra_path config + var config = FsoFramework.theConfig; + var extra_path = config.stringValue( Router.LibAlsa.MODULE_NAME, "extra_path", "" ); + + configurationPath = FsoFramework.Utility.machineConfigurationDir() + @"/$extra_path/alsa.conf"; scenarios = new GLib.Queue<string>(); allscenarios = new Gee.HashMap<string,FsoDevice.BunchOfMixerControls>(); @@ -106,7 +110,7 @@ class LibAlsa : FsoDevice.BaseAudioRouter if ( alsaconf.loadFromFile( configurationPath ) ) { var soundcard = alsaconf.stringValue( "alsa", "cardname", "default" ); - dataPath = FsoFramework.Utility.machineConfigurationDir() + @"/alsa-$soundcard"; + dataPath = FsoFramework.Utility.machineConfigurationDir() + @"/$extra_path/alsa-$soundcard"; try { |