dice: Rename structure and its members

Currently, dice driver supports AMDTP out-stream. In followed commits, AMDTP
in-stream will be supported but current name of members in dice structure
are not propper. This commit renames these members to proper name.

Additionally, for easily distinguishing local symbols from structure tag,
rename dice tag into snd_dice.
dice: Move file to its own directory

In followed commits, dice driver is split into several files. For easily
managing these files, this commit adds subdirectory and move file into
the directory.
dice: Split transaction functionality into a file

This commit adds a file with some helper functions for transaction, and move
some codes into the file with some arrangements.

For Dice chipset, well-known FCP or AV/C commands are not used to control
devices. It's achieved by read/write transactions into specific addresses.

Dice's address area is split into 5 areas. Each area has its own role. The
offset for each area can be got by reading head of the address area. By
reading these areas, drivers can get to know device status. By writing these
areas, drivers can change device status.

It's not so rate to use read/write transaction to control devices, but Dice
has a specific mechanism called as 'notification'. When device status is
changed, Dice devices tells the event by sending transaction. This
notification is sent to an address which drivers register in advance. But
this causes an issue to drivers.

To handle the notification, drivers need to allocate its own callback function
to the address region in host controller. This region is exclusive. For the
other applications, drivers must give a mechanism to read the received
notification. For this purpose, Dice driver already implements hwdep interface.

Dice chipset doesn't allow drivers to register several addresses. In this
reason, when this driver is applied to a device, the other drivers should
_not_ try to register its own address to the device.
dice: Split stream functionality into a file

This commit adds a file with some helper functions for streaming, and move some
codes into the file with some arrangements.

Well-known CMP is not used to start/stop streams for Dice chipset. It's
achieved by writing to specific address. We call this way as 'enable'.
When devices are 'enabled', streaming starts in registered isochronous channel.
Some helper functions are already implemented in previous commit.

Basically, the stream is compliant to IEC 61883-6, so-called as AMDTP. But Dice
has a specific quirk, so called-as 'Dual Wire'. This quirk is applied at
176.4/192.0kHz. In this mode, each packet includes double number of events than
number in the specification, and stream runs at a half of sampling rate.

There is another quirk at bus reset. Dice chipset handles drivers' request but
don't re-enable streaming. So stream should be stopped.
dice: Split PCM functionality into a file

This commit adds a file and move some codes related to PCM functionality.

Currently PCM playback is supported. PCM capture will be supported in followed
commits.
dice: Split hwdep functionality into a file

This commit adds a file and move some codes related to hwdep functionality.

This interface is designed for mixer/control application. By using hwdep
interface, the application can get information about firewire node, can
lock/unlock kernel streaming and can get notification at starting/stopping
kernel streaming.

Additionally, this interface give a way to read Dice notification.
dice: Split proc functionality into a file

This commit adds a file and move some codes related to proc functionality.
dice: Add new functions for limitation of PCM parameters

This commit adds a new functions and some arrangement for PCM limitation.
This arrangement is due to the number of channels which each Dice device has.

I note that minimum number for period becomes 2, instead of 1 because its PCM
functionality has SNDRV_PCM_INFO_BATCH, this means that the driver uses double
(or more) buffering so the minimum number for period should be 2.
dice: Change the way to start stream

Streaming functionality can start streams when rate is given but currently
some codes are in PCM functionality.

This commit changes the way to start stream and add some arrangement
to make it easy to understand the way.
dice: Add support for duplex streams with synchronization

This commit adds support for AMDTP in-stream. As a result, Dice driver
supports full duplex streams with synchronization.

When Dice chipset is 'enabled', it starts stream with correct settings.
And 'enabling' is global setting. So, when a stream is running, an opposite
stream can't start unless turning off 'enabling'. So a pair of streams must
be running. This is a loss of CPU usage when single stream is required.

Currently, sampling clock source is restricted to SYT-Match mode. This is
improved in followed commit. I note that at SYT-Match mode, Dice can select
from 4 streams for synchronization but this driver just uses the 1st stream
for simplicity.
dice: Support for non SYT-Match sampling clock source mode

This commit allows another mode.

When sampling clock source is SYT-Match mode, devices handle
'presentation timestamp' in received packets and generates sampling clock
according to the information. In this case, driver is synchronization master
and must transfer correct value in SYT field of each packets in outgoing
stream, then the outgoing stream is a master stream.

On the other hand, non SYT-Match mode, devices do this. So drivers must pick
up the value in SYT field of incoming packets and use the value for outgoing
stream.
dice: Add support for PCM capture

This commit adds a support for PCM capture.

When source of clock is external or opposite PCM substream is already running,
available sampling rate is limited at current one.

This driver give no way to change source of clock because it can be implemented
in user-land.
dice: Add support for MIDI capture/playback

This commit adds a support for MIDI capture/playback

When MIDI substrams already start streaming and PCM substreams are going to
join at different sampling rate, streams are stopped once. Then sampling rate
is changed and streams are restarted.
firewire-lib: Add sorting in-packets for full duplex streams with sync

In full duplex streams with synchronization, consistency of SYT field in
in-packets is important for out-packets. This commit add sorting in-packets
according to the value of dbc.