bebob: Prepare for device specific operations

This commit is for some devices which have its own operations or quirks.

Many functionality should be implemented in user land. Then this commit adds
functionality related to stream such as sampling frequency or clock source. For
help to debug, this commit adds the functionality to get metering information
if it's available.

To help these functionalities, this commit adds some AV/C commands defined in
'AV/C Audio Subunit Specification (1394TA).
bebob: Add support for Terratec PHASE, EWS series and Aureon

This commit allows this driver to support all of models which Terratec produced
with DM1000/BeBoB. They are:
 - PHASE 24 FW
 - PHASE X24 FW
 - PHASE 88 Rack FW
 - EWS MIC2
 - EWS MIC4
 - Aureon 7.1 Firewire

For Phase series, this commit adds a Terratec specific operation. To get source
of clock. AV/C Audio Subunit command is used.

For EWS series and Aureon, this module uses normal operations.
bebob: Add support for Yamaha GO series

This commit allows this driver to support all of models which Yamaha produced
with DM1000/BeBoB. They are:
 - GO44
 - GO46

This commit adds Yamaha specific operations. To get source of clock, AV/C Audio
Subunit command is used.

I note that their appearances are similar to some models of TerraTec; 'Go44' is
similar to 'PHASE 24 FW' and 'GO46' is similar to 'PHASE X24 FW'. But their
combination of Audio/Music subunit are a bit different.
bebob: Add support for Focusrite Saffire/SaffirePro series

This commit allows this driver to support all of models which Focusrite
produces with DM1000/BeBoB. They are:
 - Saffire
 - Saffire LE
 - SaffirePro 10 I/O
 - SaffirePro 26 I/O

This commit adds Focusrite specific operations:
1. Get source of clock
2. Get/Set sampling frequency
3. Get metering information

The driver uses these functionalities to read/write specific address by async
transaction.
bebob: Add support for M-Audio usual Firewire series

This commit allows this driver to support some models which M-Audio produces
with DM1000/DM1000E with usual firmware. They are:
 - Firewire 410
 - Firewire AudioPhile
 - Firewire Solo
 - Ozonic
 - NRV10
 - FirewireLightBridge

According to person of BridgeCo, Some models are produced with 'Pre-BeBoB'. This
means that these products were released before BeBoB was officially produced. So
these models have some quirks.

M-Audio usual firmware quirks:
 - Just after powering on, 'Firewire 410' waits to download firmware. This
   state is changed when receiving cue. Then bus reset is generated and the
   device is recognized as a different model with the uploaded firmware.
 - 'Firewire Audiophile' also waits to download firmware but its
   vendor id/model id is the same as the one after loading firmware.
 - The information of channel mapping for MIDI conformant data channel is
   invalid against BridgeCo specification.

This commit adds some codes for these quirks but don't support to upload
firmware.

This commit also adds specific operations to get metering information. The
metering information also includes status of clock synchronization if the model
supports to switch source of clock.

The specification of FirewireLightBridge is unknown. So in this time, normal
operations are applied for this model.
bebob: Send a cue to load firmware for M-Audio Firewire series

Just powering on, these devices below wait to download firmware.
 - Firewire Audiophile
 - Firewire 410

But firmware version 5058 or later, flash memory in the device stores the
firmware. So this driver can enable these devices by sending a certain cue to
load the firmware.
bebob: Add support for M-Audio special Firewire series

This commit allows this driver to support some models which M-Audio produces
with DM1000 but its firmware is special. They are:
 - Firewire 1814
 - ProjectMix I/O

They have heavily customized firmware. The usual operations can't be applied to
them. For this reason, this commit adds a model specific member in 'struct
snd_bebob' and some model specific functions. Some parameters are write-only so
this commit also adds control interface for applications.

M-Audio special firmware quirks:
 - Just after powering on, they wait to download firmware. This state is
   changed when receiving cue. Then bus reset is generated and the device is
   recognized as a different model with the uploaded firmware.
 - They don't respond against BridgeCo AV/C extension commands. So drivers
   can't get their stream formations and so on.
 - They do not start to transmit packets only by establishing connection but
   also by receiving SIGNAL FORMAT command.
 - They often handle requests without responding. In this reason, this driver
   often fail to handle them correctly.

This module don't support to upload firmware.
speakers: Rename to oxfw

This commit rename 'firewire-speakers' to 'oxfw' to enhance support for
devices based on OXFW970/971.

And a line is added for MODULE_ALIAS.
oxfw: Move to its own directory

Followed commits add much codes. I'll split them to some files.
In this reason, this commit make own directory and move current
source to it.
oxfw: Split stream functionality to a new file and add a header file

To make it easy to work in followed commit.

And this commit remove 'fw_unit_get()/fw_unit_put()' because these
are called by helper functions in 'snd-firewire-lib'.
oxfw: Split PCM functionality to a new file

To make it easy to work in followed commit.
oxfw: Split control functionality to a new file

To make it easy to work in followed commit.
oxfw: Change the way to name card

'struct snd_card' has 4 members for name. They're 'driver', 'shortname',
'longname' and 'mixername'. The 'driver' is used to detect card
Configuration file but the others are not used for important
functionality. So it's OK to name them with the information from config
ROM.

This commit adds 'name_card()' function and change the way to name card.
The 'driver' is still given by 'struct device_info'. The 'shortname' and
'mixername' is given by 'model' and the 'longname' is given by 'vendor'
and 'model'.
oxfw: Change the way to make PCM rules/constraints

For PCM rules/constrains, drivers need to know stream formation at each
supported sampling rates in advance. This commit adds
'struct snd_oxfw_stream_formation' to save formation information.

According to datasheet of OXFW970/971, they support 32.0kHz to 196.0kHz.
So this commit adds 'rx_stream_formations' member to 'struct snd_oxfw'. It's
an array with 7 elements. Each element corresponds to each sampling rate.

With these data structure, this commit changes the way to make PCM
rules/constraints.

I don't know whether Griffin/LaCie devices supports SINGLE/LIST subfunction
'AV/C Stream Format Information' command. So this commit adds codes to
generate formations for them.
oxfw: Add proc interface for debugging purpose

The previous commit adds stream formation. This commit adds proc interface
to get information about:
 - stream formation
 - current sampling rate
oxfw: Change the way to start stream

In past commit, driver can keep formations for each sampling rate. So its
stream functionality can set its formation when given sampling rate.

But PCM functionality still set it. This commit move some codes to set
stream formation from PCM functionality to stream functionality.
oxfw: Add some AV/C commands to get stream formation and supported sample rate

OXFW970/971 may supports AV/C Stream Format Information Specification 1.1
Working Draft (Apr 2005, 1394TA). So this driver uses 'EXTENDED STREAM FORMAT
INFORMATION' command.

This command has two subfunctions, 'SINGLE' and 'LIST'. Drivers can use
'SINGLE' subfunction to know current formation of AMDTP stream, Drivers can
use 'LIST' subfunction to know an available formation of AMDTP stream in a
certain sampling rate. Followed commit adds parser for returned information.

This commit adds 'inquiry' version of 'PLUG SIGNAL FORMAT' command. When
device doesn't support 'LIST' subfunction of 'AV/C Stream Format Information
command, this driver uses 'inquiry' command to get supported sampling rates.
oxfw: Add support for Behringer/Mackie devices

FFADO project have already identified that some devices produced by
Behringer/Mackie are based on OXFW970/971.

Behringer/Mackie devices support capture/playback of PCM-samples and some
of them supports capture/playback of MIDI-messages. Followed commits will
add these functionalities.

They support 'AV/C Stream Format Information' command. But some of them
don't implement 'LIST' subfunction. So this commit uses an assumption
that 'if they don't implement it, they don't change formation of stream
for each sampling rate'.

With this assumption, this driver generate formations for the devices by:
 1.getting current formation by SINGLE subfunction
 2.getting supported sampling rates
 3.applying current formation for all of supported sampling rates
oxfw: Add support AMDTP in-stream and PCM capture

Previous commit adds support for some devices which can capture PCM samples.
These devices transmit AMDTP stream in non-blocking mode. The stream from
these devices has a quirk for 'presentation timestamp'.

The sequence of 'presentation timestamp' is invalid even if header of packet
shows 'CIP header with SYT field'. So this driver can't reuse the timestamp
for out stream.

In this reason, this driver handles both streams separately.
oxfw: Add support for capture/playback MIDI messages

I assume that 'if the device has MIDI comformant data channels in its
stream formation, the device has one MIDI port'. With this assumption,
this driver create MIDI devices.

When no streams have already started, MIDI functionality starts stream
with current sampling rate.

When MIDI functionality has already starts some streams and PCM
functionality is going to start streams at different sampling rate,
this driver stops streams once and changes sampling rate, then restarts
streams.