Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26363
b: refs/heads/master
c: 9f29333
h: refs/heads/master
i:
  26361: 0ef5d86
  26359: a604d9b
v: v3
  • Loading branch information
Linus Torvalds committed May 1, 2006
1 parent 62b70de commit 5102bf7
Show file tree
Hide file tree
Showing 106 changed files with 1,437 additions and 2,316 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fdc19486f4d3b0fc5f1c7ce69fe5f7b1c653e62
refs/heads/master: 9f29333dae3488542b1344871e8ecb84084ad80e
81 changes: 54 additions & 27 deletions trunk/Documentation/sound/alsa/Audiophile-Usb.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Guide to using M-Audio Audiophile USB with ALSA and Jack v1.2
Guide to using M-Audio Audiophile USB with ALSA and Jack v1.3
========================================================

Thibault Le Meur <Thibault.LeMeur@supelec.fr>
Expand All @@ -22,16 +22,16 @@ The device has 4 audio interfaces, and 2 MIDI ports:
* Midi In (Mi)
* Midi Out (Mo)

The internal DAC/ADC has the following caracteristics:
The internal DAC/ADC has the following characteristics:
* sample depth of 16 or 24 bits
* sample rate from 8kHz to 96kHz
* Two ports can't use different sample depths at the same time.Moreover, the
* Two ports can't use different sample depths at the same time. Moreover, the
Audiophile USB documentation gives the following Warning: "Please exit any
audio application running before switching between bit depths"

Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be
activated at the same time depending on the audio mode selected:
* 16-bit/48kHz ==> 4 channels in/ 4 channels out
* 16-bit/48kHz ==> 4 channels in/4 channels out
- Ai+Ao+Di+Do
* 24-bit/48kHz ==> 4 channels in/2 channels out,
or 2 channels in/4 channels out
Expand All @@ -41,8 +41,8 @@ activated at the same time depending on the audio mode selected:

Important facts about the Digital interface:
--------------------------------------------
* The Do port additionnaly supports surround-encoded AC-3 and DTS passthrough,
though I haven't tested it under linux
* The Do port additionally supports surround-encoded AC-3 and DTS passthrough,
though I haven't tested it under Linux
- Note that in this setup only the Do interface can be enabled
* Apart from recording an audio digital stream, enabling the Di port is a way
to synchronize the device to an external sample clock
Expand All @@ -60,24 +60,23 @@ synchronization error (for instance sound played at an odd sample rate)
The Audiophile USB MIDI ports will be automatically supported once the
following modules have been loaded:
* snd-usb-audio
* snd-seq
* snd-seq-midi

No additionnal setting is required.
No additional setting is required.

2.2 - Audio ports
-----------------

Audio functions of the Audiophile USB device are handled by the snd-usb-audio
module. This module can work in a default mode (without any device-specific
parameter), or in an advanced mode with the device-specific parameter called
parameter), or in an "advanced" mode with the device-specific parameter called
"device_setup".

2.2.1 - Default Alsa driver mode

The default behaviour of the snd-usb-audio driver is to parse the device
The default behavior of the snd-usb-audio driver is to parse the device
capabilities at startup and enable all functions inside the device (including
all ports at any sample rates and any sample depths supported). This approach
all ports at any supported sample rates and sample depths). This approach
has the advantage to let the driver easily switch from sample rates/depths
automatically according to the need of the application claiming the device.

Expand Down Expand Up @@ -114,9 +113,9 @@ gain).
For people having this problem, the snd-usb-audio module has a new module
parameter called "device_setup".

2.2.2.1 - Initializing the working mode of the Audiohile USB
2.2.2.1 - Initializing the working mode of the Audiophile USB

As far as the Audiohile USB device is concerned, this value let the user
As far as the Audiophile USB device is concerned, this value let the user
specify:
* the sample depth
* the sample rate
Expand Down Expand Up @@ -174,20 +173,20 @@ The parameter can be given:

IMPORTANT NOTE WHEN SWITCHING CONFIGURATION:
-------------------------------------------
* You may need to _first_ intialize the module with the correct device_setup
* You may need to _first_ initialize the module with the correct device_setup
parameter and _only_after_ turn on the Audiophile USB device
* This is especially true when switching the sample depth:
- first trun off the device
- de-register the snd-usb-audio module
- change the device_setup parameter (by either manually reprobing the module
or changing modprobe.conf)
- first turn off the device
- de-register the snd-usb-audio module (modprobe -r)
- change the device_setup parameter by changing the device_setup
option in /etc/modprobe.conf
- turn on the device

2.2.2.3 - Audiophile USB's device_setup structure

If you want to understand the device_setup magic numbers for the Audiophile
USB, you need some very basic understanding of binary computation. However,
this is not required to use the parameter and you may skip thi section.
this is not required to use the parameter and you may skip this section.

The device_setup is one byte long and its structure is the following:

Expand Down Expand Up @@ -231,11 +230,11 @@ Caution:

2.2.3 - USB implementation details for this device

You may safely skip this section if you're not interrested in driver
You may safely skip this section if you're not interested in driver
development.

This section describes some internals aspect of the device and summarize the
data I got by usb-snooping the windows and linux drivers.
This section describes some internal aspects of the device and summarize the
data I got by usb-snooping the windows and Linux drivers.

The M-Audio Audiophile USB has 7 USB Interfaces:
a "USB interface":
Expand Down Expand Up @@ -277,9 +276,9 @@ Here is a short description of the AltSettings capabilities:
- 16-bit depth, 8-48kHz sample mode
- Synch playback (Do), audio format type III IEC1937_AC-3

In order to ensure a correct intialization of the device, the driver
In order to ensure a correct initialization of the device, the driver
_must_know_ how the device will be used:
* if DTS is choosen, only Interface 2 with AltSet nb.6 must be
* if DTS is chosen, only Interface 2 with AltSet nb.6 must be
registered
* if 96KHz only AltSets nb.1 of each interface must be selected
* if samples are using 24bits/48KHz then AltSet 2 must me used if
Expand All @@ -290,7 +289,7 @@ _must_know_ how the device will be used:
is not connected

When device_setup is given as a parameter to the snd-usb-audio module, the
parse_audio_enpoint function uses a quirk called
parse_audio_endpoints function uses a quirk called
"audiophile_skip_setting_quirk" in order to prevent AltSettings not
corresponding to device_setup from being registered in the driver.

Expand All @@ -317,9 +316,8 @@ However you may see the following warning message:
using the "default" ALSA device. This is less efficient than it could be.
Consider using a hardware device instead rather than using the plug layer."


3.2 - Patching alsa to use direct pcm device
-------------------------------------------
--------------------------------------------
A patch for Jack by Andreas Steinmetz adds support for Big Endian devices.
However it has not been included in the CVS tree.

Expand All @@ -331,3 +329,32 @@ After having applied the patch you can run jackd with the following command
line:
% jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1

3.2 - Getting 2 input and/or output interfaces in Jack
------------------------------------------------------

As you can see, starting the Jack server this way will only enable 1 stereo
input (Di or Ai) and 1 stereo output (Ao or Do).

This is due to the following restrictions:
* Jack can only open one capture device and one playback device at a time
* The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1
(and optionally hw:1,2)
If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to
combine the Alsa devices into one logical "complex" device.

If you want to give it a try, I recommend reading the information from
this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html
It is related to another device (ice1712) but can be adapted to suit
the Audiophile USB.

Enabling multiple Audiophile USB interfaces for Jackd will certainly require:
* patching Jack with the previously mentioned "Big Endian" patch
* patching Jackd with the MMAP_COMPLEX patch (see the ice1712 page)
* patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page)
* define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc
file
* start jackd with this device

I had no success in testing this for now, but this may be due to my OS
configuration. If you have any success with this kind of setup, please
drop me an email.
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@
}

/* PCI IDs */
static struct pci_device_id snd_mychip_ids[] = {
static struct pci_device_id snd_mychip_ids[] __devinitdata = {
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
....
Expand Down Expand Up @@ -1565,7 +1565,7 @@
<informalexample>
<programlisting>
<![CDATA[
static struct pci_device_id snd_mychip_ids[] = {
static struct pci_device_id snd_mychip_ids[] __devinitdata = {
{ PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
....
Expand Down
40 changes: 25 additions & 15 deletions trunk/arch/powerpc/configs/cell_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
Expand Down Expand Up @@ -55,6 +56,7 @@ CONFIG_SYSCTL=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_CPUSETS is not set
# CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_EMBEDDED is not set
Expand All @@ -69,10 +71,6 @@ CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
CONFIG_SLAB=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
Expand All @@ -84,7 +82,6 @@ CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
Expand All @@ -93,6 +90,7 @@ CONFIG_STOP_MACHINE=y
#
# Block layer
#
# CONFIG_BLK_DEV_IO_TRACE is not set

#
# IO Schedulers
Expand Down Expand Up @@ -126,6 +124,7 @@ CONFIG_RTAS_FLASH=y
CONFIG_MMIO_NVRAM=y
CONFIG_CELL_IIC=y
# CONFIG_PPC_MPC106 is not set
# CONFIG_PPC_970_NAP is not set
# CONFIG_CPU_FREQ is not set
# CONFIG_WANT_EARLY_SERIAL is not set

Expand Down Expand Up @@ -167,7 +166,6 @@ CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y
# CONFIG_PPC_64K_PAGES is not set
CONFIG_SCHED_SMT=y
CONFIG_PROC_DEVICETREE=y
Expand All @@ -184,7 +182,6 @@ CONFIG_GENERIC_ISA_DMA=y
# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_LEGACY_PROC=y
# CONFIG_PCI_DEBUG is not set

#
Expand Down Expand Up @@ -226,6 +223,7 @@ CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
CONFIG_INET_TUNNEL=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
Expand All @@ -242,6 +240,7 @@ CONFIG_IPV6=y
CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m
CONFIG_INET6_IPCOMP=m
CONFIG_INET6_XFRM_TUNNEL=m
CONFIG_INET6_TUNNEL=m
CONFIG_IPV6_TUNNEL=m
CONFIG_NETFILTER=y
Expand Down Expand Up @@ -632,6 +631,7 @@ CONFIG_SERIAL_NONSTANDARD=y
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
Expand Down Expand Up @@ -717,7 +717,6 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
Expand All @@ -736,9 +735,7 @@ CONFIG_I2C_ALGOBIT=y
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_RTC_X1205_I2C is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
Expand All @@ -765,10 +762,6 @@ CONFIG_I2C_ALGOBIT=y
# Misc devices
#

#
# Multimedia Capabilities Port drivers
#

#
# Multimedia devices
#
Expand Down Expand Up @@ -817,6 +810,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
#
# CONFIG_MMC is not set

#
# LED devices
#
# CONFIG_NEW_LEDS is not set

#
# LED drivers
#

#
# LED Triggers
#

#
# InfiniBand support
#
Expand All @@ -833,6 +839,11 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
#

#
# Real Time Clock
#
# CONFIG_RTC_CLASS is not set

#
# File systems
#
Expand Down Expand Up @@ -889,7 +900,6 @@ CONFIG_TMPFS=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y
# CONFIG_RELAYFS_FS is not set
# CONFIG_CONFIGFS_FS is not set

#
Expand Down
16 changes: 16 additions & 0 deletions trunk/arch/powerpc/kernel/cputable.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
PPC_FEATURE_BOOKE)

Expand Down Expand Up @@ -263,6 +265,20 @@ struct cpu_spec cpu_specs[] = {
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5+",
},
{ /* Power6 */
.pvr_mask = 0xffff0000,
.pvr_value = 0x003e0000,
.cpu_name = "POWER6",
.cpu_features = CPU_FTRS_POWER6,
.cpu_user_features = COMMON_USER_POWER6,
.icache_bsize = 128,
.dcache_bsize = 128,
.num_pmcs = 6,
.cpu_setup = __setup_cpu_power4,
.oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power6",
},
{ /* Cell Broadband Engine */
.pvr_mask = 0xffff0000,
.pvr_value = 0x00700000,
Expand Down
Loading

0 comments on commit 5102bf7

Please sign in to comment.