History log of /linux-master/sound/firewire/bebob/bebob.h
Revision Date Author Comments
# 36d1a672 15-Jun-2021 Colin Ian King <colin.king@canonical.com>

ALSA: bebob: Fix bit flag quirk constants

The quirking bit-flags are currently set as contiguous integer enum values
and so currently SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC is zero and so
he quirking never getting set or tested correctly for this quirk. Fix this
by setting the quirking constants as shifted bit values.

Addresses-Coverity: ("Bitwise-and with zero")
Fixes: 93cd12d6e88a ("ALSA: bebob: code refactoring for model-dependent quirks")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210615142048.59900-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 270e6012 11-Jun-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: fulfil device entries

Although unit directory in root directory of configuration ROM has the
same value (0x00a02d) for its specifier_id entry to express AV/C device,
it has two cases for the value (0x010001/0x014001) to version entry.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 93cd12d6 10-Jun-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: code refactoring for model-dependent quirks

This commit adds enumeration and structure member as code refactoring
regarding to model-dependent quirks.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611035003.26852-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82fb3bf9 10-Jun-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: delete workaround for protocol version 3

In a commit c4d860a0d256 ("ALSA: bebob: loosen up severity of checking
continuity for BeBoB v3 quirk"), a workaround was added for the quirk in
BeBoB protocol version 3 against the discontinuity of data block counter.
As long as seeing with sequence replay for media clock recovery, such
quirk disappears.

This commit deletes the workaround.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611035003.26852-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 81bfb89e 07-Jun-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: cease from delayed card registration

The delayed registration of sound card instance brings less benefit than
complication of kobject management. This commit ceases from it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210607081250.13397-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5ec85c19 23-May-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: distinguish M-Audio ProFire Lightbridge quirk

In former commit, ALSA IEC 61883-1/6 packet streaming engine drops
initial tx packets till the packet includes any event. This allows ALSA
bebob driver not to give option to skip initial packet since the engine
does drop the initial packet.

However, M-Audio ProFire Lightbridge has a quirk to stop packet
transmission after start multiplexing event to the packet. After several
thousands cycles, it restart packet transmission again.

This commit specializes the usage of initial skip option for the model.
Additionally, this commit expands timeout enough to wait processing
content of tx packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5c6ea94f 20-Mar-2021 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: detect the number of available MIDI ports

Current implementation counts the number of input/output plugs for MIDI
type and uses the count as the number of physical MIDI ports. However,
the number of channels of the port represents the count.

This commit fixes the bug by additional vendor-specific AVC command
extension.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210321032831.340278-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1fde7a44 17-Oct-2019 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: share PCM buffer size for both direction

This commit allows ALSA bebob driver to share PCM buffer size for both
capture and playback PCM substream. When AMDTP domain starts for one
of the PCM substream, buffer size of the PCM substream is stores to
AMDTP domain structure. Some AMDTP streams have already run with the
buffer size when another PCM substream starts, therefore the PCM
substream has a constraint to its buffer size.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191017155424.885-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8737209f 07-Oct-2019 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: register the size of PCM period to AMDTP domain

This commit is a preparation to share the size of PCM period between
PCM substreams on AMDTP streams in the same domain. At this time,
the size of PCM period in PCM substream which starts AMDTP streams in the
same domain is recorded.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191007110532.30270-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b0db4d51 04-Aug-2019 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: support AMDTP domain

This commit adds AMDTP domain support for ALSA bebob driver.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 87a23092 12-Jun-2019 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: obsolete useless member of private structure

The private structure of this driver has 'connected' member but nowadays
it's useless. This commit removes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ac2888b9 12-Jun-2019 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback

This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.

At present, several operations are done in pcm.prepare callback. To
reduce load of the callback, This commit splits out an operation to
set sampling transfer frequency in pcm.hw_params callback.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da607e19 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 345

Based on 1 normalized pattern(s):

licensed under the terms of the gnu general public license version 2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 88 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000437.521539229@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 782fbec7 22-Aug-2017 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: firewire: add const qualifier to identifiers for read-only symbols

Drivers in ALSA firewire stack still includes some symbols which can be
moved to a section for read-only symbols.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 174cd4b1 02-Feb-2017 Ingo Molnar <mingo@kernel.org>

sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>

Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>


# e15c282e 24-Aug-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: unify configurations for some models produced by Yamaha/Terratec

The below models were developed with a cooperation by Yamaha and Terratec.
- Yamaha GO 44/Terratec PHASE 24 FW
- Yamaha GO 46/Terratec PHASE X24 FW

They have the same configurations, thus it's better to unify corresponding
codes.

This commit merges them to reduce the amount of maintained codes.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c71283cb 09-May-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: drop reuse of incoming packet parameter for outgoing packet parameter

Windows driver for BeBoB-based models mostly wait for transmitted packets,
then transfer packets to the models. This looks for the relationship
between incoming packets and outgoing packets to synchronize the sequence
of presentation timestamp.

However, the sequence between packets of both direction has no
relationship. Even if receiving NO-DATA packets, the drivers transfer
packets with meaningful value in SYT field. Additionally, the order of
starting packets is always the same, independently of the source of clock.
The corresponding driver is expected as a generator of presentation
timestamp and these models can select it as a source of sampling clock.

This commit drops reusing SYT sequence from ALSA bebob driver. The driver
always transfer packets with presentation timestamp generated by ALSA
firewire stack, without re-using the sequence of value in SYT field in
incoming packets to outgoing packets.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 04a2c73c 30-Mar-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: delayed registration of sound card

Some bebob based units tends to fail asynchronous communication when
IEEE 1394 bus is under bus-reset state. When registering sound card
instance at unit probe callback, userspace applications can be involved
to the state.

This commit postpones the registration till the bus is calm.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3800e6f9 20-Feb-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: give up updating streams at bus reset handler

DM1000/DM1100/DM1500 chipsets transfer packets with discontinue value in
'dbc' field of CIP header. For ALSA bebob driver, this makes its bus-reset
handler meaningless, because the discontinuity is detected quite earlier
than executing the handler.

This commit gives up updating streams at the bus reset handler.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4fd6c6c7 20-Feb-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: change type of substream counter from atomic_t to unsigned int

The counter is incremented/decremented in critical section protected with
mutex. Therefore, no need to use atomic_t.

This commit changes the type to unsigned int.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 14a37ac1 20-Feb-2016 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: simplify bus-reset handling

At bus-reset, DM1000/DM1100/DM1500 chipsets transfer packets with
discontinuous value in 'dbc' field of CIP header. In this case, packet
streaming layer in firewire-lib module stops streaming and set XRUN to PCM
substream.

In ALSA, PCM applications are notified the XRUN status by the return value
of ALSA PCM interface. They can recover this state by executing
snd_pcm_prepare(), then PCM drivers' prepare handler is called, and start
new PCM substream. For ALSA BeBoB driver, the handler establishes new
connections and start new AMDTP streaming.

Unfortunately, neither the PCM applications nor the driver know the reason
of XRUN. The driver gets to know the reason when update handler is called
by IEEE 1394 bus driver. As long as I tested, the order of below events are
not fixed:
* Detecting packet discontinuity in tasklet context of OHCI 1394 driver
* Calling prepare handler in process context of ALSA PCM application
* Calling update handler in kthread context of IEEE 1394 bus driver

The unpredictable order is disadvantage for the driver to be compliant to
CMP. In IEC 61883-1, new CMP establish operations should be done 1 sec
(isoc_resource_delay) after bus-reset. Within 1 sec, CMP restore
operations are allowed. For this reason, in former commit ('b6bc812327aa:
ALSA: bebob/firewire-lib: Add a quirk for discontinuity at bus reset'),
the process context is forced to wait for executing update handler. The
process context wait for bus-reset up to 1 sec. This commit solves the
issue, while causes more disadvantages. For PCM applications, calling
snd_pcm_prepare() for recovering XRUN state takes more time and the driver
got a bit complicated code, while the recovery is not always successful.

As long as I tested, DM1000/DM1100/DM1500 and BeBoB firmware can allow
drivers to establish new connections just after bus reset. Furthermore,
any FCP transactions are handled correctly. Therefore, the driver don't
need to wait for bus reset handler for starting new streaming.

This commit removes the codes to reduce maintenance cost.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6b9866c8 11-Oct-2015 Julia Lawall <julia.lawall@lip6.fr>

ALSA: bebob: constify various snd_bebob structures

The structures of type snd_bebob_clock_spec, snd_bebob_rate_spec,
snd_bebob_meter_spec, and snd_bebob_spec are never modified after they are
initialized. Make them all const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5955815e 18-Sep-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: firewire-lib: add data block processing layer for AM824 format

This commit adds data block processing layer for AM824 format. The new
layer initializes streaming layer with its value for fmt field.

Currently, most implementation of data block processing still remains
streaming layer. In later commits, these codes will be moved to the layer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d67c46b9 18-Sep-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: firewire-lib: rename 'amdtp' to 'amdtp-stream' to prepare for functional separation

In later commit, data block processing layer will be newly added. This
layer will be named as 'amdtp-am824'.

This commit renames current amdtp file to amdtp-stream, to distinguish it
from the new layer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8d1c2694 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: keep duplex streams always to keep internal multiplexer properly

Behringer FCA610 transmits packets with periodic noisy PCM samples
when receiving no streams, and generates a bit noisy sound.

ALSA BeBoB driver is programmed to establish both in/out connections
when starting streaming, then transfers packets as userspace applications
requested. This means that there's a case that one of incoming/outgoing
streams is running, to save CPU and bandwidth usage. Although, it's natural
to start transferring packets in both direction.

This commit makes this driver to keeps duplex streams always.

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7b4d7dcf 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: add 'version' member for BeBoB protocol version

BeBoB installed devices have BeBoB register area. This area stores
basic information about its firmware. A register has its protocol
version.

This commit adds 'version' member and store the device's protocol
version to handle v3 quirks in following commits.

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 554d8983 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: obsolete string literal expression for clock source

The old string literals were completely replaced by new normalized
representation.

This commit obsoletes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e254b16 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: use normalized representation for the type of clock source

This commit changes function prototype and its processing. As a result,
function caller can execute additional processing according to detected
clock source.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13a4f420 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: apply new enumerator to normalize the type of clock source

Previous commit allows this driver to detect several types of clock
source, while there's no normalized expression for it.

This commit adds a new enumerator for this purpose.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5a668812 13-Jun-2015 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: improve signal mode detection for clock source

With BeBoB version 3, current ALSA BeBoB driver detects the type of
current clock signal source wrongly. This is due to a lack of proper
implementation to parse the information.

This commit renews the parser. As a result, this driver detects
SYT-Match clock signal, thus it can start streams with two modes;
SYT-Match mode and the others. SYT-Match mode will be supported in future
commits.

There's a constrain about detected internal/external clock source.
When detecting external clock source, this driver allows userspace
applications to use current sampling rate only. This is due to consider
abour synchronization to external clock sources such as S/PDIF, ADAT or
word-clock.

According to several information from some devices, I guesss that the
internal clock of most devices synchronize to IEEE 1394 cycle start
packet. In this case, by a usual way, it's detect as 'Sync type
of output Music Sub-Unit' connected to 'Sync type of PCR output Unit
(oPCR)', and this driver judges it as internal clock. Therefore,
userspace applications is allowed to request arbitrary supported sampling
rates.

On the other hand, several devices based on BeBoB version 3 have
additional internal clock. In this case, by a usual way, it's detect as
'Sync/Additional type of External input Unit'. Unfortunately, there's no
way to distinguish this sync type from the other external clock sources
such as word-clock. In this case, this driver handles it as external and
userspace applications is forced to use current sampling rate.

I note that when the source of clock is detected as 'Isochronous stream
type of input PCR[0]', it's under 'SYT-Match' mode. In this mode, the
synchronization clock is generated according to SYT-series in received
packets. In this case, this driver generates the series by myself. I
experienced this mode often make the device silent suddenly during
playbacking. This means that the mode is easy to lost synchronization.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7ced413 21-Oct-2014 Takashi Iwai <tiwai@suse.de>

ALSA: bebob: More constify text arrays

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c9b8f51 04-Jun-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Remove unused function prototype

snd_bebob_stream_map() is not defined.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b5f0edf 27-May-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: fireworks/bebob: Add suffix for long long integer literal

This commit adds suffix to register values of each device, to supress 'sparse'
warnings. Additionally, this commit changes offset values with integer literal.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a286d55 27-May-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: fireworks/bebob: Change type of argument for sampling rate

Originally, I intent to this argument given with 'struct snd_pcm_runtime.rate'
or params_rate(). They return value of 'unsigned int'. So 'unsigned int' is
better for the type of this argument.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b1ee0b2 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: firewire/bebob: Add a workaround for M-Audio special Firewire series

In post commit, a quirk of this firmware about transactions is reported.
This commit apply a workaround for this quirk.

They often fail transactions due to gap_count mismatch. This state is changed
by generating bus reset.

The fw_schedule_bus_reset() is an exported symbol in firewire-core. But there
are no header for public. This commit moves its prototype from
drivers/firewire/core.h to include/linux/firewire.h.

This mismatch still affects bus management before generating this bus reset.
It still takes a time to call driver's probe() because transactions are still
often failed.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a2b2a779 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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
- Firewire 1814
- ProjectMix I/O

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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3149ac48 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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 to 'struct
snd_bebob' and some model specific functions. Some parameters are write-only so
this commit also adds control interface for applications to set them.

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.
- After booting up, they often fail to send response against driver's request
due to mismatch of gap_count.

This module don't support to upload firmware.

Tested-by: Darren Anderson <darrena092@gmail.com> (ProjectMix I/O)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9076c22d 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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 a person who worked in BridgeCo, some models are produced with
'Pre-BeBoB'. This means that these products were released before BeBoB was
officially produced, and later BeBoB specification was formed. 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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 25784ec2 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ac98a35 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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 subunits is a bit different.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 326b9cac 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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.

Tested-by: Maximilian Engelhardt <maxi@daemonizer.de> (PHASE 24 FW)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1fc9522a 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: 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).

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 618eabea 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add hwdep interface

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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fbbebd2c 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add PCM interface

This commit adds a functionality to capture/playback PCM samples.

When AMDTP stream is already running for PCM or the source of clock is not
internal, available sampling rate is limited at current one.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 248b7802 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add MIDI interface

This commit adds a functionality to capture/playback MIDI messages.

When no AMDTP streams are running, this module starts AMDTP stream at current
sampling rate for MIDI substream.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad9697ba 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add proc interface for debugging purpose

This commit adds proc interface to get these information for debugging:
- firmware information
- stream formation
- current clock source and sampling rate

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b6bc8123 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob/firewire-lib: Add a quirk for discontinuity at bus reset

Normal BeBoB firmware has a quirk. When receiving bus reset, it transmits
packets with discontinuous value in dbc field.

This causes two situation, one is to abort streaming by firewire-lib as a
result of detecting the discontinuity. Another is to call driver's .update()
because of bus reset. These two is generated independently. (The former
depends on isochronous stream and the latter depends on IEEE1394 bus driver.)

When BeBoB driver works with XRUN-recoverable applications, this situation
looks like stream_start_duplex() call followed by stream_update_duplex() call
because applications will call snd_pcm_prepare() immediately at XRUN.

To update connections and streams at first, this commit use completion. When
queueing error occurs, stream_start_duplex() is forced to wait maximum
1000msec. During this, when .update() is called, the completion is waken and
stream_start_duplex() is processed without breaking connections.

At bus reset, stream_start_duplex() shouldn't break/establish connections and
stream_update_duplex() should update connections because a caller of
fw_iso_resources_allocate() is responsible for calling
fw_iso_resources_update() on bus reset.

This commit also adds a flag, which has an effect to skip checking continuity
for first packet. This flag is useful for BeBoB quirk to start handling packets
during streaming.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb7b3a05 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add commands and connections/streams management

This commit adds management functionality for connections and streams.
BeBoB uses CMP to manage connections and uses AMDTP for streams.

This commit also adds some BridgeCo's AV/C extension commands. There are some
BridgeCo's AV/C extension commands but this commit just uses below commands
to get device's capability and status:

1.Extended Plug Info commands
- Plug Channel Position Specific Data
- Plug Type Specific Data
- Cluster(Section) Info Specific Data
- Plug Input Specific Data
2.Extended Stream Format Information commands
- Extended Stream Format Information Command - List Request

For Extended Plug Info commands for Cluster Info Specific Data, I pick up
'section' instead of 'cluster' from document to prevent from misunderstanding
because 'cluster' is also used in IEC 61883-6.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fd6f4b0d 25-Apr-2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>

ALSA: bebob: Add skelton for BeBoB based devices

This commit adds a new driver for BeBoB based devices with no specific
operations. Currently this driver just create/remove card instance according
to callbacks.

BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire
devices with DM1000/DM1100/DM1500 chipset. It gives common way for host
system to handle BeBoB based devices.

Current supported devices:
- Edirol FA-66/FA-101
- PreSonus FIREBOX/FIREPOD/FP10/Inspire1394
- BridgeCo RDAudio1/Audio5
- Mackie Onyx 1220/1620/1640 (Firewire I/O Card)
- Mackie d.2 (Firewire Option)
- Stanton FinalScratch 2 (ScratchAmp)
- Tascam IF-FW DM
- Behringer XENIX UFX 1204/1604
- Behringer Digital Mixer X32 series (X-UF Card)
- Apogee Rosetta 200/Rosetta 400 (X-FireWire card)
- Apogee DA-16X/AD-16X/DD-16X (X-FireWire card)
- Apogee Ensemble
- ESI Quotafire610
- AcousticReality eARMasterOne
- CME MatrixKFW
- Phonix Helix Board 12 MkII/18 MkII/24 MkII
- Phonic Helix Board 12 Universal/18 Universal/24 Universal
- Lynx Aurora 8/16 (LT-FW)
- ICON FireXon
- PrismSound Orpheus/ADA-8XR

Devices possible to be supported if identifying IDs:
- Apogee Mini-Me Firewire/Mini-DAC Firewire
- Behringer F-Control Audio 610/1616
- Cakewalk Sonar Power Studio 66
- CME UF400e
- ESI Quotafire XL
- Infrasonic DewX/Windy6
- Mackie Digital X Bus x.200/400
- Phonic Helix Board 12/18/24
- Phonic FireFly 202/302
- Rolf Spuler Firewire Guitar

Tested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>