diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-03-23 17:40:45 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-04-17 01:45:19 +0200 |
commit | 4220225c57e6a53fa96b9ea8cf9946d529048d63 (patch) | |
tree | b0cdd5b5cb1ce7074014284907e6efa907d6653f | |
parent | c43f8bdcc1d527e2d77481a66217771038be3acd (diff) | |
download | bluez-4220225c57e6a53fa96b9ea8cf9946d529048d63.tar.gz |
Replace asound.conf with a more full-fledged bluetooth.conf
The new fragment will introduce device strings that can be given the BT
address of the headset as parameter. Also, they integrate 'plug' so that
they can be used with any application.
This replaces the old 'asound.conf' file which was much more limited.
Also since we now install 'bluetooth.conf' to /etc/alsa it is not a good
idea to simply call that file 'asound.conf'.
Please note that this will install the config fragment but not actually
enable it. For that some minor changes to the /etc/asoundrc as shipped
by the distro are necessary. It's up to the distributions to do this.
How that works in explained in the header of bluetooth.conf.
-rw-r--r-- | audio/Makefile.am | 5 | ||||
-rw-r--r-- | audio/asound.conf | 7 | ||||
-rw-r--r-- | audio/bluetooth.conf | 36 |
3 files changed, 40 insertions, 8 deletions
diff --git a/audio/Makefile.am b/audio/Makefile.am index 2b0f41314..7c1c02e15 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -20,6 +20,7 @@ LDADD = $(top_builddir)/common/libhelper.a \ if ALSA alsadir = $(libdir)/alsa-lib +alsaconfdir = $(sysconfdir)/alsa alsa_LTLIBRARIES = libasound_module_pcm_bluetooth.la libasound_module_ctl_bluetooth.la @@ -32,6 +33,8 @@ libasound_module_ctl_bluetooth_la_SOURCES = ctl_bluetooth.c rtp.h ipc.h ipc.c libasound_module_ctl_bluetooth_la_LDFLAGS = -module -avoid-version #-export-symbols-regex [_]*snd_ctl_.* libasound_module_ctl_bluetooth_la_LIBADD = @BLUEZ_LIBS@ @ALSA_LIBS@ libasound_module_ctl_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @BLUEZ_CFLAGS@ + +alsaconf_DATA = bluetooth.conf endif if GSTREAMER @@ -71,7 +74,7 @@ CLEANFILES = $(BUILT_SOURCES) INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src -EXTRA_DIST = audio.conf asound.conf telephony-dummy.c telephony-maemo.c +EXTRA_DIST = audio.conf telephony-dummy.c telephony-maemo.c bluetooth.conf MAINTAINERCLEANFILES = Makefile.in diff --git a/audio/asound.conf b/audio/asound.conf deleted file mode 100644 index ec97d46fc..000000000 --- a/audio/asound.conf +++ /dev/null @@ -1,7 +0,0 @@ -pcm.headset { - type bluetooth -} - -ctl.headset { - type bluetooth -} diff --git a/audio/bluetooth.conf b/audio/bluetooth.conf new file mode 100644 index 000000000..55b51e436 --- /dev/null +++ b/audio/bluetooth.conf @@ -0,0 +1,36 @@ +# Please note that this ALSA configuration file fragment needs be enabled in +# /etc/asound.conf or a similar configuration file with directives similar to +# the following: +# +#@hooks [ +# { +# func load +# files [ +# "/etc/alsa/bluetooth.conf" +# ] +# errors false +# } +#] + +pcm.rawbluetooth { + @args [ ADDRESS ] + @args.ADDRESS { + type string + } + type bluetooth + device $ADDRESS +} + +pcm.bluetooth { + @args [ ADDRESS ] + @args.ADDRESS { + type string + } + type plug + slave { + pcm { + type bluetooth + device $ADDRESS + } + } +} |