diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-02-23 07:17:03 +0100 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2012-03-11 12:23:46 +0530 |
commit | 56018683b147740129538737722590bc5824dbe1 (patch) | |
tree | a409c3f968d684daf3f9869ed8843a8098ff0e06 | |
parent | dedf1340c611c3d9b17a08e0ee18ae22afac623c (diff) |
alsa: Add port information to HDMI profiles
For Nvidia and Intel, support probing of up to four HDMI devices.
Also add port information to all HDMI profiles.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/modules/alsa/mixer/paths/hdmi-output-0.conf | 6 | ||||
-rw-r--r-- | src/modules/alsa/mixer/paths/hdmi-output-1.conf | 6 | ||||
-rw-r--r-- | src/modules/alsa/mixer/paths/hdmi-output-2.conf | 6 | ||||
-rw-r--r-- | src/modules/alsa/mixer/paths/hdmi-output-3.conf | 6 | ||||
-rw-r--r-- | src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules | 26 | ||||
-rw-r--r-- | src/modules/alsa/mixer/profile-sets/default.conf | 1 | ||||
-rw-r--r-- | src/modules/alsa/mixer/profile-sets/extra-hdmi.conf | 158 |
8 files changed, 206 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 130d33b2..f2321517 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1091,6 +1091,7 @@ modlibexec_LTLIBRARIES += \ dist_alsaprofilesets_DATA = \ modules/alsa/mixer/profile-sets/default.conf \ + modules/alsa/mixer/profile-sets/extra-hdmi.conf \ modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \ modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \ modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \ @@ -1128,7 +1129,11 @@ dist_alsapaths_DATA = \ modules/alsa/mixer/paths/analog-output-headphones-2.conf \ modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \ modules/alsa/mixer/paths/analog-output-mono.conf \ - modules/alsa/mixer/paths/iec958-stereo-output.conf + modules/alsa/mixer/paths/iec958-stereo-output.conf \ + modules/alsa/mixer/paths/hdmi-output-0.conf \ + modules/alsa/mixer/paths/hdmi-output-1.conf \ + modules/alsa/mixer/paths/hdmi-output-2.conf \ + modules/alsa/mixer/paths/hdmi-output-3.conf endif diff --git a/src/modules/alsa/mixer/paths/hdmi-output-0.conf b/src/modules/alsa/mixer/paths/hdmi-output-0.conf new file mode 100644 index 00000000..46ee4fd1 --- /dev/null +++ b/src/modules/alsa/mixer/paths/hdmi-output-0.conf @@ -0,0 +1,6 @@ +[General] +description = HDMI / DisplayPort +priority = 59 + +[Jack HDMI/DP,pcm=3] +required-any = any diff --git a/src/modules/alsa/mixer/paths/hdmi-output-1.conf b/src/modules/alsa/mixer/paths/hdmi-output-1.conf new file mode 100644 index 00000000..da8fcb41 --- /dev/null +++ b/src/modules/alsa/mixer/paths/hdmi-output-1.conf @@ -0,0 +1,6 @@ +[General] +description = HDMI / DisplayPort 2 +priority = 58 + +[Jack HDMI/DP,pcm=7] +required-any = any diff --git a/src/modules/alsa/mixer/paths/hdmi-output-2.conf b/src/modules/alsa/mixer/paths/hdmi-output-2.conf new file mode 100644 index 00000000..5fcddc61 --- /dev/null +++ b/src/modules/alsa/mixer/paths/hdmi-output-2.conf @@ -0,0 +1,6 @@ +[General] +description = HDMI / DisplayPort 3 +priority = 57 + +[Jack HDMI/DP,pcm=8] +required-any = any diff --git a/src/modules/alsa/mixer/paths/hdmi-output-3.conf b/src/modules/alsa/mixer/paths/hdmi-output-3.conf new file mode 100644 index 00000000..82007870 --- /dev/null +++ b/src/modules/alsa/mixer/paths/hdmi-output-3.conf @@ -0,0 +1,6 @@ +[General] +description = HDMI / DisplayPort 4 +priority = 56 + +[Jack HDMI/DP,pcm=9] +required-any = any diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules index e6cfef5e..fc332c3f 100644 --- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules +++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules @@ -10,7 +10,7 @@ # PulseAudio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. +# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with PulseAudio; if not, write to the Free Software Foundation, @@ -19,15 +19,23 @@ SUBSYSTEM!="sound", GOTO="pulseaudio_end" ACTION!="change", GOTO="pulseaudio_end" KERNEL!="card*", GOTO="pulseaudio_end" +SUBSYSTEMS=="usb", GOTO="pulseaudio_check_usb" SUBSYSTEMS=="platform", DRIVERS=="thinkpad_acpi", ENV{PULSE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="baff", ENV{PULSE_PROFILE_SET}="native-instruments-traktorkontrol-s4.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="4711", ENV{PULSE_PROFILE_SET}="native-instruments-korecontroller.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1011", ENV{PULSE_PROFILE_SET}="native-instruments-traktor-audio6.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1021", ENV{PULSE_PROFILE_SET}="native-instruments-traktor-audio10.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{PULSE_PROFILE_SET}="maudio-fasttrack-pro.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02bb", ENV{PULSE_PROFILE_SET}="kinect-audio.conf" + +# NVidia and Intel HDAs often have more than one HDMI codec/port on the same card +ATTRS{vendor}=="0x10de", ENV{PULSE_PROFILE_SET}="extra-hdmi.conf" +ATTRS{vendor}=="0x8086", ENV{PULSE_PROFILE_SET}="extra-hdmi.conf" +GOTO="pulseaudio_end" + +LABEL="pulseaudio_check_usb" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="baff", ENV{PULSE_PROFILE_SET}="native-instruments-traktorkontrol-s4.conf" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="4711", ENV{PULSE_PROFILE_SET}="native-instruments-korecontroller.conf" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1011", ENV{PULSE_PROFILE_SET}="native-instruments-traktor-audio6.conf" +ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1021", ENV{PULSE_PROFILE_SET}="native-instruments-traktor-audio10.conf" +ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{PULSE_PROFILE_SET}="maudio-fasttrack-pro.conf" +ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02bb", ENV{PULSE_PROFILE_SET}="kinect-audio.conf" LABEL="pulseaudio_end" diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf index d1d4ba3c..5ac322b8 100644 --- a/src/modules/alsa/mixer/profile-sets/default.conf +++ b/src/modules/alsa/mixer/profile-sets/default.conf @@ -181,6 +181,7 @@ device-strings = hdmi:%f channel-map = left,right priority = 4 direction = output +paths-output = hdmi-output-0 ; An example for defining multiple-sink profiles #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo] diff --git a/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf b/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf new file mode 100644 index 00000000..d0bff6a3 --- /dev/null +++ b/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf @@ -0,0 +1,158 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +; This is a profile for Nvidia and Intel cards - some cards have four HDMI codecs, +; and which ones are working seems to vary a lot between GPU boards. In addition, +; Nvidia and Intel make southbridges as well, so we need to keep the existing +; analog profiles. +; (And by not adding all these extra profiles to default.conf, we make sure +; there is no performance hit for non-Nvidia/Intel cards.) + +[General] +auto-profiles = yes + +[Mapping analog-mono] +device-strings = hw:%f +channel-map = mono +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono +paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line +priority = 1 + +[Mapping analog-stereo] +device-strings = front:%f hw:%f +channel-map = left,right +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono +paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line +priority = 10 + +[Mapping analog-surround-40] +device-strings = surround40:%f +channel-map = front-left,front-right,rear-left,rear-right +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono +priority = 7 +direction = output + +[Mapping analog-surround-41] +device-strings = surround41:%f +channel-map = front-left,front-right,rear-left,rear-right,lfe +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono +priority = 8 +direction = output + +[Mapping analog-surround-50] +device-strings = surround50:%f +channel-map = front-left,front-right,rear-left,rear-right,front-center +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono +priority = 7 +direction = output + +[Mapping analog-surround-51] +device-strings = surround51:%f +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono +priority = 8 +direction = output + +[Mapping analog-surround-71] +device-strings = surround71:%f +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right +description = Analog Surround 7.1 +paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono +priority = 7 +direction = output + +[Mapping iec958-stereo] +device-strings = iec958:%f +channel-map = left,right +paths-input = iec958-stereo-input +paths-output = iec958-stereo-output +priority = 5 + +[Mapping iec958-ac3-surround-40] +device-strings = a52:%f +channel-map = front-left,front-right,rear-left,rear-right +priority = 2 +direction = output + +[Mapping iec958-ac3-surround-51] +device-strings = a52:%f +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +priority = 3 +direction = output + +[Mapping hdmi-stereo] +device-strings = hdmi:%f +description = Digital Stereo (HDMI) +paths-output = hdmi-output-0 +channel-map = left,right +priority = 4 +direction = output + +[Mapping hdmi-surround] +description = Digital Surround 5.1 (HDMI) +device-strings = hdmi:%f +paths-output = hdmi-output-0 +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +priority = 3 +direction = output + +[Mapping hdmi-stereo-extra1] +description = Digital Stereo (HDMI) +device-strings = hdmi:%f,1 +paths-output = hdmi-output-1 +channel-map = left,right +priority = 2 +direction = output + +[Mapping hdmi-surround-extra1] +description = Digital Surround 5.1 (HDMI) +device-strings = hdmi:%f,1 +paths-output = hdmi-output-1 +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +priority = 1 +direction = output + +[Mapping hdmi-stereo-extra2] +description = Digital Stereo (HDMI) +device-strings = hdmi:%f,2 +paths-output = hdmi-output-2 +channel-map = left,right +priority = 2 +direction = output + +[Mapping hdmi-surround-extra2] +description = Digital Surround 5.1 (HDMI) +device-strings = hdmi:%f,2 +paths-output = hdmi-output-2 +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +priority = 1 +direction = output + +[Mapping hdmi-stereo-extra3] +description = Digital Stereo (HDMI) +device-strings = hdmi:%f,3 +paths-output = hdmi-output-3 +channel-map = left,right +priority = 2 +direction = output + +[Mapping hdmi-surround-extra3] +description = Digital Surround 5.1 (HDMI) +device-strings = hdmi:%f,3 +paths-output = hdmi-output-3 +channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe +priority = 1 +direction = output |