diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 10:48:52 -0400 |
commit | 7d63b54a65ce902f9aaa8efe8192aa3b983264d4 (patch) | |
tree | 250a77bebe92cbd6edac70a649866044295876db /Documentation | |
parent | fd88de569b802c4a04aaa6ee74667775f4aed8c6 (diff) | |
parent | d8c3291c73b958243b33f8509d4507e76dafd055 (diff) |
Merge branch 'master'
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/HOWTO | 3 | ||||
-rw-r--r-- | Documentation/networking/operstates.txt | 161 | ||||
-rw-r--r-- | Documentation/pci.txt | 12 | ||||
-rw-r--r-- | Documentation/power/video.txt | 2 | ||||
-rw-r--r-- | Documentation/scsi/ChangeLog.megaraid | 25 | ||||
-rw-r--r-- | Documentation/sound/alsa/Audiophile-Usb.txt | 81 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 4 |
7 files changed, 256 insertions, 32 deletions
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 6c9e746267da..915ae8c986c6 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -603,7 +603,8 @@ start exactly where you are now. | |||
603 | 603 | ||
604 | 604 | ||
605 | ---------- | 605 | ---------- |
606 | Thanks to Paolo Ciarrocchi who allowed the "Development Process" section | 606 | Thanks to Paolo Ciarrocchi who allowed the "Development Process" |
607 | (http://linux.tar.bz/articles/2.6-development_process) section | ||
607 | to be based on text he had written, and to Randy Dunlap and Gerrit | 608 | to be based on text he had written, and to Randy Dunlap and Gerrit |
608 | Huizenga for some of the list of things you should and should not say. | 609 | Huizenga for some of the list of things you should and should not say. |
609 | Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, | 610 | Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, |
diff --git a/Documentation/networking/operstates.txt b/Documentation/networking/operstates.txt new file mode 100644 index 000000000000..4a21d9bb836b --- /dev/null +++ b/Documentation/networking/operstates.txt | |||
@@ -0,0 +1,161 @@ | |||
1 | |||
2 | 1. Introduction | ||
3 | |||
4 | Linux distinguishes between administrative and operational state of an | ||
5 | interface. Admininstrative state is the result of "ip link set dev | ||
6 | <dev> up or down" and reflects whether the administrator wants to use | ||
7 | the device for traffic. | ||
8 | |||
9 | However, an interface is not usable just because the admin enabled it | ||
10 | - ethernet requires to be plugged into the switch and, depending on | ||
11 | a site's networking policy and configuration, an 802.1X authentication | ||
12 | to be performed before user data can be transferred. Operational state | ||
13 | shows the ability of an interface to transmit this user data. | ||
14 | |||
15 | Thanks to 802.1X, userspace must be granted the possibility to | ||
16 | influence operational state. To accommodate this, operational state is | ||
17 | split into two parts: Two flags that can be set by the driver only, and | ||
18 | a RFC2863 compatible state that is derived from these flags, a policy, | ||
19 | and changeable from userspace under certain rules. | ||
20 | |||
21 | |||
22 | 2. Querying from userspace | ||
23 | |||
24 | Both admin and operational state can be queried via the netlink | ||
25 | operation RTM_GETLINK. It is also possible to subscribe to RTMGRP_LINK | ||
26 | to be notified of updates. This is important for setting from userspace. | ||
27 | |||
28 | These values contain interface state: | ||
29 | |||
30 | ifinfomsg::if_flags & IFF_UP: | ||
31 | Interface is admin up | ||
32 | ifinfomsg::if_flags & IFF_RUNNING: | ||
33 | Interface is in RFC2863 operational state UP or UNKNOWN. This is for | ||
34 | backward compatibility, routing daemons, dhcp clients can use this | ||
35 | flag to determine whether they should use the interface. | ||
36 | ifinfomsg::if_flags & IFF_LOWER_UP: | ||
37 | Driver has signaled netif_carrier_on() | ||
38 | ifinfomsg::if_flags & IFF_DORMANT: | ||
39 | Driver has signaled netif_dormant_on() | ||
40 | |||
41 | These interface flags can also be queried without netlink using the | ||
42 | SIOCGIFFLAGS ioctl. | ||
43 | |||
44 | TLV IFLA_OPERSTATE | ||
45 | |||
46 | contains RFC2863 state of the interface in numeric representation: | ||
47 | |||
48 | IF_OPER_UNKNOWN (0): | ||
49 | Interface is in unknown state, neither driver nor userspace has set | ||
50 | operational state. Interface must be considered for user data as | ||
51 | setting operational state has not been implemented in every driver. | ||
52 | IF_OPER_NOTPRESENT (1): | ||
53 | Unused in current kernel (notpresent interfaces normally disappear), | ||
54 | just a numerical placeholder. | ||
55 | IF_OPER_DOWN (2): | ||
56 | Interface is unable to transfer data on L1, f.e. ethernet is not | ||
57 | plugged or interface is ADMIN down. | ||
58 | IF_OPER_LOWERLAYERDOWN (3): | ||
59 | Interfaces stacked on an interface that is IF_OPER_DOWN show this | ||
60 | state (f.e. VLAN). | ||
61 | IF_OPER_TESTING (4): | ||
62 | Unused in current kernel. | ||
63 | IF_OPER_DORMANT (5): | ||
64 | Interface is L1 up, but waiting for an external event, f.e. for a | ||
65 | protocol to establish. (802.1X) | ||
66 | IF_OPER_UP (6): | ||
67 | Interface is operational up and can be used. | ||
68 | |||
69 | This TLV can also be queried via sysfs. | ||
70 | |||
71 | TLV IFLA_LINKMODE | ||
72 | |||
73 | contains link policy. This is needed for userspace interaction | ||
74 | described below. | ||
75 | |||
76 | This TLV can also be queried via sysfs. | ||
77 | |||
78 | |||
79 | 3. Kernel driver API | ||
80 | |||
81 | Kernel drivers have access to two flags that map to IFF_LOWER_UP and | ||
82 | IFF_DORMANT. These flags can be set from everywhere, even from | ||
83 | interrupts. It is guaranteed that only the driver has write access, | ||
84 | however, if different layers of the driver manipulate the same flag, | ||
85 | the driver has to provide the synchronisation needed. | ||
86 | |||
87 | __LINK_STATE_NOCARRIER, maps to !IFF_LOWER_UP: | ||
88 | |||
89 | The driver uses netif_carrier_on() to clear and netif_carrier_off() to | ||
90 | set this flag. On netif_carrier_off(), the scheduler stops sending | ||
91 | packets. The name 'carrier' and the inversion are historical, think of | ||
92 | it as lower layer. | ||
93 | |||
94 | netif_carrier_ok() can be used to query that bit. | ||
95 | |||
96 | __LINK_STATE_DORMANT, maps to IFF_DORMANT: | ||
97 | |||
98 | Set by the driver to express that the device cannot yet be used | ||
99 | because some driver controlled protocol establishment has to | ||
100 | complete. Corresponding functions are netif_dormant_on() to set the | ||
101 | flag, netif_dormant_off() to clear it and netif_dormant() to query. | ||
102 | |||
103 | On device allocation, networking core sets the flags equivalent to | ||
104 | netif_carrier_ok() and !netif_dormant(). | ||
105 | |||
106 | |||
107 | Whenever the driver CHANGES one of these flags, a workqueue event is | ||
108 | scheduled to translate the flag combination to IFLA_OPERSTATE as | ||
109 | follows: | ||
110 | |||
111 | !netif_carrier_ok(): | ||
112 | IF_OPER_LOWERLAYERDOWN if the interface is stacked, IF_OPER_DOWN | ||
113 | otherwise. Kernel can recognise stacked interfaces because their | ||
114 | ifindex != iflink. | ||
115 | |||
116 | netif_carrier_ok() && netif_dormant(): | ||
117 | IF_OPER_DORMANT | ||
118 | |||
119 | netif_carrier_ok() && !netif_dormant(): | ||
120 | IF_OPER_UP if userspace interaction is disabled. Otherwise | ||
121 | IF_OPER_DORMANT with the possibility for userspace to initiate the | ||
122 | IF_OPER_UP transition afterwards. | ||
123 | |||
124 | |||
125 | 4. Setting from userspace | ||
126 | |||
127 | Applications have to use the netlink interface to influence the | ||
128 | RFC2863 operational state of an interface. Setting IFLA_LINKMODE to 1 | ||
129 | via RTM_SETLINK instructs the kernel that an interface should go to | ||
130 | IF_OPER_DORMANT instead of IF_OPER_UP when the combination | ||
131 | netif_carrier_ok() && !netif_dormant() is set by the | ||
132 | driver. Afterwards, the userspace application can set IFLA_OPERSTATE | ||
133 | to IF_OPER_DORMANT or IF_OPER_UP as long as the driver does not set | ||
134 | netif_carrier_off() or netif_dormant_on(). Changes made by userspace | ||
135 | are multicasted on the netlink group RTMGRP_LINK. | ||
136 | |||
137 | So basically a 802.1X supplicant interacts with the kernel like this: | ||
138 | |||
139 | -subscribe to RTMGRP_LINK | ||
140 | -set IFLA_LINKMODE to 1 via RTM_SETLINK | ||
141 | -query RTM_GETLINK once to get initial state | ||
142 | -if initial flags are not (IFF_LOWER_UP && !IFF_DORMANT), wait until | ||
143 | netlink multicast signals this state | ||
144 | -do 802.1X, eventually abort if flags go down again | ||
145 | -send RTM_SETLINK to set operstate to IF_OPER_UP if authentication | ||
146 | succeeds, IF_OPER_DORMANT otherwise | ||
147 | -see how operstate and IFF_RUNNING is echoed via netlink multicast | ||
148 | -set interface back to IF_OPER_DORMANT if 802.1X reauthentication | ||
149 | fails | ||
150 | -restart if kernel changes IFF_LOWER_UP or IFF_DORMANT flag | ||
151 | |||
152 | if supplicant goes down, bring back IFLA_LINKMODE to 0 and | ||
153 | IFLA_OPERSTATE to a sane value. | ||
154 | |||
155 | A routing daemon or dhcp client just needs to care for IFF_RUNNING or | ||
156 | waiting for operstate to go IF_OPER_UP/IF_OPER_UNKNOWN before | ||
157 | considering the interface / querying a DHCP address. | ||
158 | |||
159 | |||
160 | For technical questions and/or comments please e-mail to Stefan Rompf | ||
161 | (stefan at loplof.de). | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 711210b38f5f..66bbbf1d1ef6 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -259,7 +259,17 @@ on the bus need to be capable of doing it, so this is something which needs | |||
259 | to be handled by platform and generic code, not individual drivers. | 259 | to be handled by platform and generic code, not individual drivers. |
260 | 260 | ||
261 | 261 | ||
262 | 8. Obsolete functions | 262 | 8. Vendor and device identifications |
263 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
264 | For the future, let's avoid adding device ids to include/linux/pci_ids.h. | ||
265 | |||
266 | PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids. | ||
267 | |||
268 | Rationale: PCI_VENDOR_ID_xxx constants are re-used, but device ids are not. | ||
269 | Further, device ids are arbitrary hex numbers, normally used only in a | ||
270 | single location, the pci_device_id table. | ||
271 | |||
272 | 9. Obsolete functions | ||
263 | ~~~~~~~~~~~~~~~~~~~~~ | 273 | ~~~~~~~~~~~~~~~~~~~~~ |
264 | There are several functions which you might come across when trying to | 274 | There are several functions which you might come across when trying to |
265 | port an old driver to the new PCI interface. They are no longer present | 275 | port an old driver to the new PCI interface. They are no longer present |
diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt index d18a57d1a531..43a889f8f08d 100644 --- a/Documentation/power/video.txt +++ b/Documentation/power/video.txt | |||
@@ -140,7 +140,7 @@ IBM TP T41p s3_bios (2), switch to X after resume | |||
140 | IBM TP T42 s3_bios (2) | 140 | IBM TP T42 s3_bios (2) |
141 | IBM ThinkPad T42p (2373-GTG) s3_bios (2) | 141 | IBM ThinkPad T42p (2373-GTG) s3_bios (2) |
142 | IBM TP X20 ??? (*) | 142 | IBM TP X20 ??? (*) |
143 | IBM TP X30 s3_bios (2) | 143 | IBM TP X30 s3_bios, s3_mode (4) |
144 | IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. | 144 | IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. |
145 | IBM TP X32 none (1), but backlight is on and video is trashed after long suspend. s3_bios,s3_mode (4) works too. Perhaps that gets better results? | 145 | IBM TP X32 none (1), but backlight is on and video is trashed after long suspend. s3_bios,s3_mode (4) works too. Perhaps that gets better results? |
146 | IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) | 146 | IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) |
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid index 09f6300eda4b..c173806c91fa 100644 --- a/Documentation/scsi/ChangeLog.megaraid +++ b/Documentation/scsi/ChangeLog.megaraid | |||
@@ -1,3 +1,28 @@ | |||
1 | Release Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com> | ||
2 | Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) | ||
3 | Older Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) | ||
4 | |||
5 | 1. Fixed a bug in megaraid_reset_handler(). | ||
6 | Customer reported "Unable to handle kernel NULL pointer dereference | ||
7 | at virtual address 00000000" when system goes to reset condition | ||
8 | for some reason. It happened randomly. | ||
9 | Root Cause: in the megaraid_reset_handler(), there is possibility not | ||
10 | returning pending packets in the pend_list if there are multiple | ||
11 | pending packets. | ||
12 | Fix: Made the change in the driver so that it will return all packets | ||
13 | in the pend_list. | ||
14 | |||
15 | 2. Added change request. | ||
16 | As found in the following URL, rmb() only didn't help the | ||
17 | problem. I had to increase the loop counter to 0xFFFFFF. (6 F's) | ||
18 | http://marc.theaimsgroup.com/?l=linux-scsi&m=110971060502497&w=2 | ||
19 | |||
20 | I attached a patch for your reference, too. | ||
21 | Could you check and get this fix in your driver? | ||
22 | |||
23 | Best Regards, | ||
24 | Jun'ichi Nomura | ||
25 | |||
1 | Release Date : Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> | 26 | Release Date : Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> |
2 | Current Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) | 27 | Current Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) |
3 | Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) | 28 | Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) |
diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt index 4692c8e77dc1..b535c2a198f8 100644 --- a/Documentation/sound/alsa/Audiophile-Usb.txt +++ b/Documentation/sound/alsa/Audiophile-Usb.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | Guide to using M-Audio Audiophile USB with ALSA and Jack v1.2 | 1 | Guide to using M-Audio Audiophile USB with ALSA and Jack v1.3 |
2 | ======================================================== | 2 | ======================================================== |
3 | 3 | ||
4 | Thibault Le Meur <Thibault.LeMeur@supelec.fr> | 4 | Thibault Le Meur <Thibault.LeMeur@supelec.fr> |
@@ -22,16 +22,16 @@ The device has 4 audio interfaces, and 2 MIDI ports: | |||
22 | * Midi In (Mi) | 22 | * Midi In (Mi) |
23 | * Midi Out (Mo) | 23 | * Midi Out (Mo) |
24 | 24 | ||
25 | The internal DAC/ADC has the following caracteristics: | 25 | The internal DAC/ADC has the following characteristics: |
26 | * sample depth of 16 or 24 bits | 26 | * sample depth of 16 or 24 bits |
27 | * sample rate from 8kHz to 96kHz | 27 | * sample rate from 8kHz to 96kHz |
28 | * Two ports can't use different sample depths at the same time.Moreover, the | 28 | * Two ports can't use different sample depths at the same time. Moreover, the |
29 | Audiophile USB documentation gives the following Warning: "Please exit any | 29 | Audiophile USB documentation gives the following Warning: "Please exit any |
30 | audio application running before switching between bit depths" | 30 | audio application running before switching between bit depths" |
31 | 31 | ||
32 | Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be | 32 | Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be |
33 | activated at the same time depending on the audio mode selected: | 33 | activated at the same time depending on the audio mode selected: |
34 | * 16-bit/48kHz ==> 4 channels in/ 4 channels out | 34 | * 16-bit/48kHz ==> 4 channels in/4 channels out |
35 | - Ai+Ao+Di+Do | 35 | - Ai+Ao+Di+Do |
36 | * 24-bit/48kHz ==> 4 channels in/2 channels out, | 36 | * 24-bit/48kHz ==> 4 channels in/2 channels out, |
37 | or 2 channels in/4 channels out | 37 | or 2 channels in/4 channels out |
@@ -41,8 +41,8 @@ activated at the same time depending on the audio mode selected: | |||
41 | 41 | ||
42 | Important facts about the Digital interface: | 42 | Important facts about the Digital interface: |
43 | -------------------------------------------- | 43 | -------------------------------------------- |
44 | * The Do port additionnaly supports surround-encoded AC-3 and DTS passthrough, | 44 | * The Do port additionally supports surround-encoded AC-3 and DTS passthrough, |
45 | though I haven't tested it under linux | 45 | though I haven't tested it under Linux |
46 | - Note that in this setup only the Do interface can be enabled | 46 | - Note that in this setup only the Do interface can be enabled |
47 | * Apart from recording an audio digital stream, enabling the Di port is a way | 47 | * Apart from recording an audio digital stream, enabling the Di port is a way |
48 | to synchronize the device to an external sample clock | 48 | to synchronize the device to an external sample clock |
@@ -60,24 +60,23 @@ synchronization error (for instance sound played at an odd sample rate) | |||
60 | The Audiophile USB MIDI ports will be automatically supported once the | 60 | The Audiophile USB MIDI ports will be automatically supported once the |
61 | following modules have been loaded: | 61 | following modules have been loaded: |
62 | * snd-usb-audio | 62 | * snd-usb-audio |
63 | * snd-seq | ||
64 | * snd-seq-midi | 63 | * snd-seq-midi |
65 | 64 | ||
66 | No additionnal setting is required. | 65 | No additional setting is required. |
67 | 66 | ||
68 | 2.2 - Audio ports | 67 | 2.2 - Audio ports |
69 | ----------------- | 68 | ----------------- |
70 | 69 | ||
71 | Audio functions of the Audiophile USB device are handled by the snd-usb-audio | 70 | Audio functions of the Audiophile USB device are handled by the snd-usb-audio |
72 | module. This module can work in a default mode (without any device-specific | 71 | module. This module can work in a default mode (without any device-specific |
73 | parameter), or in an advanced mode with the device-specific parameter called | 72 | parameter), or in an "advanced" mode with the device-specific parameter called |
74 | "device_setup". | 73 | "device_setup". |
75 | 74 | ||
76 | 2.2.1 - Default Alsa driver mode | 75 | 2.2.1 - Default Alsa driver mode |
77 | 76 | ||
78 | The default behaviour of the snd-usb-audio driver is to parse the device | 77 | The default behavior of the snd-usb-audio driver is to parse the device |
79 | capabilities at startup and enable all functions inside the device (including | 78 | capabilities at startup and enable all functions inside the device (including |
80 | all ports at any sample rates and any sample depths supported). This approach | 79 | all ports at any supported sample rates and sample depths). This approach |
81 | has the advantage to let the driver easily switch from sample rates/depths | 80 | has the advantage to let the driver easily switch from sample rates/depths |
82 | automatically according to the need of the application claiming the device. | 81 | automatically according to the need of the application claiming the device. |
83 | 82 | ||
@@ -114,9 +113,9 @@ gain). | |||
114 | For people having this problem, the snd-usb-audio module has a new module | 113 | For people having this problem, the snd-usb-audio module has a new module |
115 | parameter called "device_setup". | 114 | parameter called "device_setup". |
116 | 115 | ||
117 | 2.2.2.1 - Initializing the working mode of the Audiohile USB | 116 | 2.2.2.1 - Initializing the working mode of the Audiophile USB |
118 | 117 | ||
119 | As far as the Audiohile USB device is concerned, this value let the user | 118 | As far as the Audiophile USB device is concerned, this value let the user |
120 | specify: | 119 | specify: |
121 | * the sample depth | 120 | * the sample depth |
122 | * the sample rate | 121 | * the sample rate |
@@ -174,20 +173,20 @@ The parameter can be given: | |||
174 | 173 | ||
175 | IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: | 174 | IMPORTANT NOTE WHEN SWITCHING CONFIGURATION: |
176 | ------------------------------------------- | 175 | ------------------------------------------- |
177 | * You may need to _first_ intialize the module with the correct device_setup | 176 | * You may need to _first_ initialize the module with the correct device_setup |
178 | parameter and _only_after_ turn on the Audiophile USB device | 177 | parameter and _only_after_ turn on the Audiophile USB device |
179 | * This is especially true when switching the sample depth: | 178 | * This is especially true when switching the sample depth: |
180 | - first trun off the device | 179 | - first turn off the device |
181 | - de-register the snd-usb-audio module | 180 | - de-register the snd-usb-audio module (modprobe -r) |
182 | - change the device_setup parameter (by either manually reprobing the module | 181 | - change the device_setup parameter by changing the device_setup |
183 | or changing modprobe.conf) | 182 | option in /etc/modprobe.conf |
184 | - turn on the device | 183 | - turn on the device |
185 | 184 | ||
186 | 2.2.2.3 - Audiophile USB's device_setup structure | 185 | 2.2.2.3 - Audiophile USB's device_setup structure |
187 | 186 | ||
188 | If you want to understand the device_setup magic numbers for the Audiophile | 187 | If you want to understand the device_setup magic numbers for the Audiophile |
189 | USB, you need some very basic understanding of binary computation. However, | 188 | USB, you need some very basic understanding of binary computation. However, |
190 | this is not required to use the parameter and you may skip thi section. | 189 | this is not required to use the parameter and you may skip this section. |
191 | 190 | ||
192 | The device_setup is one byte long and its structure is the following: | 191 | The device_setup is one byte long and its structure is the following: |
193 | 192 | ||
@@ -231,11 +230,11 @@ Caution: | |||
231 | 230 | ||
232 | 2.2.3 - USB implementation details for this device | 231 | 2.2.3 - USB implementation details for this device |
233 | 232 | ||
234 | You may safely skip this section if you're not interrested in driver | 233 | You may safely skip this section if you're not interested in driver |
235 | development. | 234 | development. |
236 | 235 | ||
237 | This section describes some internals aspect of the device and summarize the | 236 | This section describes some internal aspects of the device and summarize the |
238 | data I got by usb-snooping the windows and linux drivers. | 237 | data I got by usb-snooping the windows and Linux drivers. |
239 | 238 | ||
240 | The M-Audio Audiophile USB has 7 USB Interfaces: | 239 | The M-Audio Audiophile USB has 7 USB Interfaces: |
241 | a "USB interface": | 240 | a "USB interface": |
@@ -277,9 +276,9 @@ Here is a short description of the AltSettings capabilities: | |||
277 | - 16-bit depth, 8-48kHz sample mode | 276 | - 16-bit depth, 8-48kHz sample mode |
278 | - Synch playback (Do), audio format type III IEC1937_AC-3 | 277 | - Synch playback (Do), audio format type III IEC1937_AC-3 |
279 | 278 | ||
280 | In order to ensure a correct intialization of the device, the driver | 279 | In order to ensure a correct initialization of the device, the driver |
281 | _must_know_ how the device will be used: | 280 | _must_know_ how the device will be used: |
282 | * if DTS is choosen, only Interface 2 with AltSet nb.6 must be | 281 | * if DTS is chosen, only Interface 2 with AltSet nb.6 must be |
283 | registered | 282 | registered |
284 | * if 96KHz only AltSets nb.1 of each interface must be selected | 283 | * if 96KHz only AltSets nb.1 of each interface must be selected |
285 | * if samples are using 24bits/48KHz then AltSet 2 must me used if | 284 | * if samples are using 24bits/48KHz then AltSet 2 must me used if |
@@ -290,7 +289,7 @@ _must_know_ how the device will be used: | |||
290 | is not connected | 289 | is not connected |
291 | 290 | ||
292 | When device_setup is given as a parameter to the snd-usb-audio module, the | 291 | When device_setup is given as a parameter to the snd-usb-audio module, the |
293 | parse_audio_enpoint function uses a quirk called | 292 | parse_audio_endpoints function uses a quirk called |
294 | "audiophile_skip_setting_quirk" in order to prevent AltSettings not | 293 | "audiophile_skip_setting_quirk" in order to prevent AltSettings not |
295 | corresponding to device_setup from being registered in the driver. | 294 | corresponding to device_setup from being registered in the driver. |
296 | 295 | ||
@@ -317,9 +316,8 @@ However you may see the following warning message: | |||
317 | using the "default" ALSA device. This is less efficient than it could be. | 316 | using the "default" ALSA device. This is less efficient than it could be. |
318 | Consider using a hardware device instead rather than using the plug layer." | 317 | Consider using a hardware device instead rather than using the plug layer." |
319 | 318 | ||
320 | |||
321 | 3.2 - Patching alsa to use direct pcm device | 319 | 3.2 - Patching alsa to use direct pcm device |
322 | ------------------------------------------- | 320 | -------------------------------------------- |
323 | A patch for Jack by Andreas Steinmetz adds support for Big Endian devices. | 321 | A patch for Jack by Andreas Steinmetz adds support for Big Endian devices. |
324 | However it has not been included in the CVS tree. | 322 | However it has not been included in the CVS tree. |
325 | 323 | ||
@@ -331,3 +329,32 @@ After having applied the patch you can run jackd with the following command | |||
331 | line: | 329 | line: |
332 | % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 | 330 | % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 |
333 | 331 | ||
332 | 3.2 - Getting 2 input and/or output interfaces in Jack | ||
333 | ------------------------------------------------------ | ||
334 | |||
335 | As you can see, starting the Jack server this way will only enable 1 stereo | ||
336 | input (Di or Ai) and 1 stereo output (Ao or Do). | ||
337 | |||
338 | This is due to the following restrictions: | ||
339 | * Jack can only open one capture device and one playback device at a time | ||
340 | * The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1 | ||
341 | (and optionally hw:1,2) | ||
342 | If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to | ||
343 | combine the Alsa devices into one logical "complex" device. | ||
344 | |||
345 | If you want to give it a try, I recommend reading the information from | ||
346 | this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html | ||
347 | It is related to another device (ice1712) but can be adapted to suit | ||
348 | the Audiophile USB. | ||
349 | |||
350 | Enabling multiple Audiophile USB interfaces for Jackd will certainly require: | ||
351 | * patching Jack with the previously mentioned "Big Endian" patch | ||
352 | * patching Jackd with the MMAP_COMPLEX patch (see the ice1712 page) | ||
353 | * patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page) | ||
354 | * define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc | ||
355 | file | ||
356 | * start jackd with this device | ||
357 | |||
358 | I had no success in testing this for now, but this may be due to my OS | ||
359 | configuration. If you have any success with this kind of setup, please | ||
360 | drop me an email. | ||
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 68eeebc17ff4..1faf76383bab 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1172,7 +1172,7 @@ | |||
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* PCI IDs */ | 1174 | /* PCI IDs */ |
1175 | static struct pci_device_id snd_mychip_ids[] = { | 1175 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { |
1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1178 | .... | 1178 | .... |
@@ -1565,7 +1565,7 @@ | |||
1565 | <informalexample> | 1565 | <informalexample> |
1566 | <programlisting> | 1566 | <programlisting> |
1567 | <![CDATA[ | 1567 | <![CDATA[ |
1568 | static struct pci_device_id snd_mychip_ids[] = { | 1568 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { |
1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1571 | .... | 1571 | .... |