David,

>> Firewire speakers are just three models.
(Vendor ID/Model ID)
iSight:  0x000a27:0x000010
Griffin: 0x001292:0x00f970
Lacie:   0x00d04b:0x00f970

I wrote a test for udev rules. Please see attached files in order of:
-> lsfirewire.log
-> cards.log
-> 0001-udev-add-entries-for-firewire-sound-devices-sample.patch
-> udevadm.log
-> pulse.log

I don't have devices of the first three entries. But an entry for 'Behringer F-Control Audio 202' has the same condition and actually 'analog-stereo' profile is applied. So these three devices may also have profiles except for 'multichannel.conf'.

FYI


Takashi Sakamoto
[email protected]

$ cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfbff4000 irq 54
 1 [F1814          ]: BeBoB - FW 1814
                      M-AUDIO FW 1814 (id:131, rev:1), GUID 000d6c04007feef8 at fw2.0, S400
 2 [F410           ]: BeBoB - FW 410
                      M-AUDIO FW 410 (id:2, rev:1), GUID 000d6c01000af510 at fw1.0, S400
 3 [FCA202         ]: OXFW - FCA202
                      Behringer FCA202 (OXFW970 0104), GUID 00156402009a70d8 at fw3.0, S400

$ ./lsfirewire -v
('lsfirewire' is in 'jujuutils', not packaging)
device fw0:
  vendor ID: 0xd00d1e
  model ID: 0x000001
  vendor: Linux Firewire
  model: Juju
  guid: 0x005b47de006cf049
device fw1:
  vendor ID: 0x0007f5
  model ID: 0x010046
  vendor: M-AUDIO
  model: FW 410
  guid: 0x000d6c01000af510
  units: 0x00a02d:0x014001
  unit fw1.0:
    model ID: 0x010046
    model: FW 410
    specifier ID: 0x00a02d
    version: 0x014001
device fw2:
  vendor ID: 0x000d6c
  model ID: 0x010071
  hardware version ID: 0x000083
  vendor: M-AUDIO
  model: FW 1814
  guid: 0x000d6c04007feef8
  units: 0x00a02d:0x014001
  unit fw2.0:
    model ID: 0x010071
    model: FW 1814
    specifier ID: 0x00a02d
    version: 0x014001
device fw3:
  vendor ID: 0x001564
  model ID: 0x00fc22
  vendor: Behringer
  model: FCA202
  guid: 0x00156402009a70d8
  units: 0x00a02d:0x010001
  unit fw3.0:
    model ID: 0x00fc22
    model: FCA202
    specifier ID: 0x00a02d
    version: 0x010001
$ pactl list sinks
Sink #0
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1b.0.analog-stereo
	Description: Built-in Audio Analog Stereo
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 5
	Mute: no
	Volume: 0:  43% 1:  43%
	        0: -22.00 dB 1: -22.00 dB
	        balance 0.00
	Base Volume:  93%
	             -2.00 dB
	Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC889 Analog"
		alsa.id = "ALC889 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel"
		alsa.long_card_name = "HDA Intel at 0xfbff4000 irq 54"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "3a3e"
		device.product.name = "GA-EP45-DS5/GA-EG45M-DS2H Motherboard"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Realtek ALC889"
		alsa.components = "HDA:10ec0889,1458a022,00100004"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Ports:
		analog-output: Analog Output (priority: 9900)
		analog-output-headphones: Headphones (priority: 9000, not available)
	Active Port: analog-output
	Formats:
		pcm

Sink #2
	State: SUSPENDED
	Name: alsa_output.firewire-0x000d6c01000af510.10-channels
	Description: Motherboard 10 Channels
	Driver: module-alsa-card.c
	Sample Specification: s16le 10ch 44100Hz
	Channel Map: front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right,aux0,aux1
	Owner Module: 23
	Mute: no
	Volume: 0: 100% 1: 100% 2: 100% 3: 100% 4: 100% 5: 100% 6: 100% 7: 100% 8: 100% 9: 100%
	        0: 0.00 dB 1: 0.00 dB 2: 0.00 dB 3: 0.00 dB 4: 0.00 dB 5: 0.00 dB 6: 0.00 dB 7: 0.00 dB 8: 0.00 dB 9: 0.00 dB
	        balance 0.00
	Base Volume: 100%
	             0.00 dB
	Monitor Source: alsa_output.firewire-0x000d6c01000af510.10-channels.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "FW 410 PCM"
		alsa.id = "BeBoB"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "2"
		alsa.card_name = "FW 410"
		alsa.long_card_name = "M-AUDIO FW 410 (id:2, rev:1), GUID 000d6c01000af510 at fw1.0, S400"
		alsa.driver_name = "snd_bebob"
		device.bus_path = "pci-0000:0c:06.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw1/fw1.0/sound/card2"
		udev.id = "firewire-0x000d6c01000af510"
		device.bus = "firewire"
		device.vendor.name = "Texas Instruments"
		device.product.name = "Motherboard"
		device.string = "hw:2"
		device.buffering.buffer_size = "131040"
		device.buffering.fragment_size = "131040"
		device.access_mode = "mmap+timer"
		device.profile.name = "10-channels"
		device.profile.description = "10 Channels"
		device.description = "Motherboard 10 Channels"
		alsa.mixer_name = "FW 410"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-firewire"
	Formats:
		pcm

Sink #3
	State: SUSPENDED
	Name: alsa_output.firewire-0x00156402009a70d8.analog-stereo
	Description: Motherboard Analog Stereo
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 24
	Mute: no
	Volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	Base Volume: 100%
	             0.00 dB
	Monitor Source: alsa_output.firewire-0x00156402009a70d8.analog-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "FCA202"
		alsa.id = "OXFW"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "3"
		alsa.card_name = "FCA202"
		alsa.long_card_name = "Behringer FCA202 (OXFW970 0104), GUID 00156402009a70d8 at fw3.0, S400"
		alsa.driver_name = "snd_oxfw"
		device.bus_path = "pci-0000:0c:06.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw3/fw3.0/sound/card3"
		udev.id = "firewire-0x00156402009a70d8"
		device.bus = "firewire"
		device.vendor.name = "Texas Instruments"
		device.product.name = "Motherboard"
		device.string = "hw:3"
		device.buffering.buffer_size = "131072"
		device.buffering.fragment_size = "131072"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Motherboard Analog Stereo"
		alsa.mixer_name = "FCA202"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-firewire"
	Ports:
		analog-output: Analog Output (priority: 9900)
	Active Port: analog-output
	Formats:
		pcm
$ udevadm info --path  /sys/class/sound/card1
P: /devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw2/fw2.0/sound/card1
E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw2/fw2.0/sound/card1
E: ID_BUS=firewire
E: ID_FOR_SEAT=sound-pci-0000_0c_06_0
E: ID_ID=firewire-0x000d6c04007feef8
E: ID_MODEL=FW 1814
E: ID_MODEL_FROM_DATABASE=Motherboard
E: ID_PATH=pci-0000:0c:06.0
E: ID_PATH_TAG=pci-0000_0c_06_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_VENDOR=M-AUDIO
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: PULSE_IGNORE=1
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: TAGS=:seat:
E: USEC_INITIALIZED=9158223

$ udevadm info --path  /sys/class/sound/card2
P: /devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw1/fw1.0/sound/card2
E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw1/fw1.0/sound/card2
E: ID_BUS=firewire
E: ID_FOR_SEAT=sound-pci-0000_0c_06_0
E: ID_ID=firewire-0x000d6c01000af510
E: ID_MODEL=FW 410
E: ID_MODEL_FROM_DATABASE=Motherboard
E: ID_PATH=pci-0000:0c:06.0
E: ID_PATH_TAG=pci-0000_0c_06_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_VENDOR=M-AUDIO
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: PULSE_PROFILE_SET=multichannel.conf
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: TAGS=:seat:
E: USEC_INITIALIZED=9612668

$ udevadm info --path  /sys/class/sound/card3
P: /devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw3/fw3.0/sound/card3
E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0c:06.0/fw3/fw3.0/sound/card3
E: ID_BUS=firewire
E: ID_FOR_SEAT=sound-pci-0000_0c_06_0
E: ID_ID=firewire-0x00156402009a70d8
E: ID_MODEL=FCA202
E: ID_MODEL_FROM_DATABASE=Motherboard
E: ID_PATH=pci-0000:0c:06.0
E: ID_PATH_TAG=pci-0000_0c_06_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_VENDOR=Behringer
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: TAGS=:seat:
E: USEC_INITIALIZED=26147842


>From 860fa3c635d8032fccfc363937b59a3fa7ea9a84 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto <[email protected]>
Date: Sun, 26 Jan 2014 23:40:45 +0900
Subject: [PATCH] udev: add entries for firewire sound devices (sample)

This is a sample for entries of firewire sound devices.

Intent of this rule:
 - 'alalog-stereo' is applied for 'Behringer F-Control Audio 202'.
 - 'M-Audio Firewire 1814' is not detected.
 - 'multichannel.conf' is not applied for 'iSight/Firewave/LaCie'
 - 'multichannels.conf' is applied for the other devices

Signed-off-by: Takashi Sakamoto <[email protected]>
---
 .../alsa/mixer/profile-sets/90-pulseaudio.rules       | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
index 560ff1c..a6e3b9a 100644
--- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
+++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
@@ -20,6 +20,7 @@ SUBSYSTEM!="sound", GOTO="pulseaudio_end"
 ACTION!="change", GOTO="pulseaudio_end"
 KERNEL!="card*", GOTO="pulseaudio_end"
 SUBSYSTEMS=="usb", GOTO="pulseaudio_check_usb"
+SUBSYSTEMS=="firewire", GOTO="pulseaudio_firewire"
 
 SUBSYSTEMS=="platform", DRIVERS=="thinkpad_acpi", ENV{PULSE_IGNORE}="1"
 
@@ -103,4 +104,22 @@ ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1021", ENV{PULSE_PROFILE_SET}="nativ
 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"
 
+GOTO="pulseaudio_end"
+
+LABEL="pulseaudio_firewire"
+# Apple iSight
+ATTRS{vendor}=="0x000a27", ATTRS{model}=="0x000010", GOTO="pulseaudio_end"
+# Griffin Firewave
+ATTRS{vendor}=="0x001292", ATTRS{model}=="0x00f970", GOTO="pulseaudio_end"
+# Lacie Firewire Speakers
+ATTRS{vendor}=="0x00d04b", ATTRS{model}=="0x00f970", GOTO="pulseaudio_end"
+# Behringer F-Control Audio 202
+ATTRS{vendor}=="0x001564", ATTRS{model}=="0x00fc22", GOTO="pulseaudio_end"
+# M-Audio Firewire 1814
+ATTRS{vendor}=="0x000d6c", ATTRS{model}=="0x010071", ENV{PULSE_IGNORE}="1", GOTO="pulseaudio_end"
+# M-Audio ProjectMix I/O
+ATTRS{vendor}=="0x000d6c", ATTRS{model}=="0x010091", ENV{PULSE_IGNORE}="1", GOTO="pulseaudio_end"
+# other devices
+ENV{PULSE_PROFILE_SET}="multichannel.conf"
+
 LABEL="pulseaudio_end"
-- 
1.8.3.2

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to