17 Aug, 2015
1 commit
-
commit 18f5ed365d3f188a91149d528c853000330a4a58 upstream.
Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
This chip includes ARM7 core, and loads and runs program. The firmware
is stored in on-board memory and loaded every powering-on from it.Echo Audio ships several versions of firmwares for each model. These
firmwares have each quirk and the quirk changes a sequence of packets.As long as I investigated, AudioFire2/AudioFire4/AudioFirePre8 have a
quirk to transfer a first packet with 0x02 in its dbc field. This causes
ALSA Fireworks driver to detect discontinuity. In this case, firmware
version 5.7.0, 5.7.3 and 5.8.0 are used.Payload CIP CIP
quadlets header1 header2
02 00050002 90ffffff
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
Signed-off-by: Greg Kroah-Hartman
13 Apr, 2015
1 commit
09 Apr, 2015
1 commit
-
Some M-Audio devices require to receive bootup command just after
powering on, while codes in BeBoB driver doesn't work properly in
big-endian machine because the command should be aligned by
little-endian.This commit fixes this bug. This fix should go to stable kernel.
Cc: Takayuki Shiroma
Signed-off-by: Takashi Sakamoto
Cc:
Signed-off-by: Takashi Iwai
12 Mar, 2015
1 commit
10 Mar, 2015
3 commits
-
With previous commit, this module managed to leave the counting to each
drivers, but the isochronous resources functionality still increment/decrement
the count.This commit purge such codes to leave the responsibility to each drivers.
Fix: c6f224dc20ad ('ALSA: firewire-lib: remove reference counting')
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This reverts commit 8cdebf71098c07168ef6335e2f1f35d85dbe3049.
The reverted commit breaks out-stream functionality of Dice driver.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
Change 'propper' to 'proper'
Change 'paramters' to 'parameters'
Change 'SYT_INTEVAL' to 'SYT_INTERVAL'
Change 'aligh'/'alighed' to 'align'/'aligned'Signed-off-by: Yannick Guerrini
Signed-off-by: Takashi Iwai
01 Mar, 2015
1 commit
-
For received packet stream, the offset of 'RX_SEQ_START' locates after
the offset of 'RX_NUMBER_MIDI', although current macro and proc output
includes wrong offsets.Fortunately, this bug doesn't affect streaming functionality because
these macro is not used.This commit fixes these wrong macro and outputs.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
27 Feb, 2015
1 commit
-
The amdtp_stream_wait_callback() doesn't return minus value and
the return code is not for error code.This commit fixes with a propper condition and an error code.
Fixes: f3699e2c7745 ('ALSA: oxfw: Change the way to start stream')
Reported-by: Dan Carpenter
Signed-off-by: Takashi Sakamoto
Cc: # 3.19+
Signed-off-by: Takashi Iwai
23 Feb, 2015
5 commits
-
A part of these drivers, especially BeBoB driver, are programmed to wait
some events. Thus the drivers should not destroy any data in .remove()
context.This commit moves some destructors from 'struct fw_driver.remove()' to
'struct snd_card.private_free()' to shutdown safely.Signed-off-by: Takashi Sakamoto
Cc: # 3.19+
Signed-off-by: Takashi Iwai -
Currently stream destructor in each driver has a problem to be called in
a context in which sound card object is released, because the destructors
call amdtp_stream_pcm_abort() and touch PCM runtime data.The PCM runtime data is destroyed in application's context with
snd_pcm_close(), on the other hand PCM substream data is destroyed after
sound card object is released, in most case after all of ALSA character
devices are released. When PCM runtime is destroyed and PCM substream is
remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes
Null-pointer-dereference.This commit changes stream destructors and allows each driver to call
it after releasing runtime.Signed-off-by: Takashi Sakamoto
Cc: # 3.19+
Signed-off-by: Takashi Iwai -
AMDTP helper functions increment/decrement reference counter for an
instance of FireWire unit, while it's complicated for each driver to
process error state.In previous commit, each driver has the role of reference counting. This
commit removes this role from the helper function.Signed-off-by: Takashi Sakamoto
Cc: # 3.19+
Signed-off-by: Takashi Iwai -
Fireworks and Dice drivers try to touch instances of FireWire unit after
sound card object is released, while references to the unit is decremented
in .remove(). When unplugging during streaming, sound card object is
released after .remove(), thus Fireworks and Dice drivers causes GPF or
Null-pointer-dereferencing to application processes because an instance of
FireWire unit was already released.This commit adds reference-counting for FireWire unit in drivers to allow
them to touch an instance of FireWire unit after .remove(). In most case,
any operations after .remove() may be failed safely.Signed-off-by: Takashi Sakamoto
Cc: # 3.19+
Signed-off-by: Takashi Iwai -
The sign for microsecond (U+0085, MICRO SIGN) was encoded to '0x c2 b5'
by UTF-8 character encoding scheme. But the byte sequence was converted
to '0x c3 82 c2 b5' in a previous commit. As a result, the byte
sequence cannot represent microsecond sign in UTF-8 or ASCII. This
may confuse developers.This commit replaces the sign to string expression with 'microseconds'
to purge superfluous troubles.Fixes: 5c697e5b46ef("ALSA: firewire-lib: remove rx_blocks_for_midi quirk")
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
17 Jan, 2015
2 commits
-
Do no send MIDI bytes at the full rate at which FireWire packets happen
to be sent, but restrict them to the actual rate of a real MIDI port.
This is required by the specification, and prevents data loss when the
device's buffer overruns.Signed-off-by: Clemens Ladisch
Reviewed-by: Takashi Sakamoto
Tested-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
There are several devices that expect to receive MIDI data only in the
first eight data blocks of a packet. If the driver restricts the data
rate to the allowed rate (as mandated by the specification, but not yet
implemented by this driver), this happens naturally. Therefore, there
is no reason to ever try to use more data packets with any device.Signed-off-by: Clemens Ladisch
Reviewed-by: Takashi Sakamoto
Tested-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
07 Jan, 2015
1 commit
-
Although the 't->length' is a big-endian value, it's used without any
conversion. This means that the driver always uses 'length' parameter.Fixes: 555e8a8f7f14("ALSA: fireworks: Add command/response functionality into hwdep interface")
Reported-by: Clemens Ladisch
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
15 Dec, 2014
1 commit
-
This code tends to use unsigned variables by default and it causes
signedness bugs when we use negative variables for error handling.
The "i" and "j" variables are used to iterated over small positive
values and so they should be type "int". The "len" variable doesn't
*need* to be signed but it should be signed to make the code easier to
read and audit.Signed-off-by: Dan Carpenter
Reviewed-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
14 Dec, 2014
1 commit
-
This code causes a static checker warning:
sound/firewire/oxfw/oxfw.c:46 detect_loud_models()
warn: signedness bug returning '(-2)'The detect_loud_models() function should return false on falure, so that
we don't try to set up the loud code for hardware that doesn't support
it.Signed-off-by: Dan Carpenter
Reviewed-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
10 Dec, 2014
15 commits
-
This interface is designed for mixer/control application. By using this
interface, an 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
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This commit adds MIDI functionality with an assumption of 'if the device
has MIDI comformant data channels in its stream formation, the device has
one MIDI port'.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 for both PCM/MIDI substreams.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
In previous commit, a support for transmitted packets is added. This commit
add a support for capturing PCM samples.When any streams are already started, this driver should not change sampling
rate of the device, thus this commit also adds a restriction of sampling rate
in this situation.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
Previous commit adds support for some devices which can capture PCM samples.
These devices transmit AMDTP stream in non-blocking mode. This commit adds
functionality to handle AMDTP incoming stream.OXFW seems to have two quirks:
- Transmits packets with non-zero dbc in its beginning
- Transmits packets with wrong values in syt fieldFor the first quirk, this commit adds CIP_SKIP_INIT_DBC_CHECK flag for
incoming stream to skip first check of dbc.For the second quirk, this commit doesn't add duplex stream which
Fireworks/BeBoB drivers use. So OXFW driver generates syt value for outgoing
stream.Here are examples of a sequence of packets transmitted by Behringer F-Control
Audio 202. There are differences between sequences of syt value when OXFW
driver transfers outgoing stream or not.When driver gives no outgoing stream:
Index Payload CIP_Header_0 CIP_Header_1
38 14 00020092 900103D1
39 12 00020098 900102FF
40 12 0002009D 9001027F
41 14 000200A2 90010396
42 14 000200A8 900102E8
43 12 000200AE 90010219
44 14 000200B3 90010331
45 12 000200B9 9001025F
46 14 000200BE 90010376
47 12 000200C4 900102A1
00 12 000200C9 9001023E
01 14 000200CE 90010358
02 12 000200D4 90010289
03 16 000200D9 900103A3
04 12 000200E0 900102DD
05 14 000200E5 900103F1
06 12 000200EB 90010335
07 12 000200F0 90010263
08 14 000200F5 9001037C
09 12 000200FB 900102AEWhen driver gives outgoing stream:
Index Payload CIP_Header_0 CIP_Header_1
38 12 000200BD 900104A8
39 14 000200C2 900104A8
40 12 000200C8 900104AC
41 14 000200CD 900104A9
42 12 000200D3 900104B1
43 14 000200D8 900104A8
44 12 000200DE 900104AA
45 14 000200E3 900104A9
46 14 000200E9 900104AE
47 12 000200EF 900104A8
00 14 000200F4 900104AD
01 12 000200FA 900104A7
02 14 000200FF 900104A9
03 12 00020005 900104A9
04 14 0002000A 900104B1
05 12 00020010 900104AA
06 14 00020015 900104AD
07 12 0002001B 900104A7
08 14 00020020 900104AC
09 12 00020026 900104A7Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
Some devices produced by Behringer/Mackie are based on OXFW970/971. This
commit adds support for them. Additionally, this commit changes the way to
name card with some information in config rom.Ids of some Mackie(Loud) models are not identified, therefore this commit
applies name detection for these models.The devices support capture/playback of PCM-samples and some of them
supports capture/playback of MIDI messages. These functionalities are
implemented by followed commits.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
In past commit, this driver can keep stream formations for each sampling
rate. So its stream functionality can decide stream formations with given
some parameters.This commit moves related codes from PCM functionality to stream
functionality. Furthermore, to set stream format correctly, this commit
uses AV/C Stream Format Information command instead of AV/C Input/Output
Plug Signal Format command.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This commit adds proc interface to get information about stream
formation. This commit also adds snd_oxfw_stream_get_current_formation()
to get current stream formation.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
In previous commit, this driver can get to know stream formations at
each supported sampling rates. This commit uses it to make PCM
rules/constraints and obsoletes hard-coded rules/constraints.For this purpose, this commit adds 'struct snd_oxfw_stream_formation' and
snd_oxfw_stream_parse_format() to parse data channel formation of data
block.According to datasheet of OXFW970/971, they support 32.0kHz to 196.0kHz.
As long as developers investigate, some devices are confirmed to have
several formats for the same sampling rate.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
OXFW970/971 may supports AV/C Stream Format Information Specification 1.1
Working Draft (Apr 2005, 1394TA). By using this command, drivers can get to know
stream formations which device supports.This commit adds 'EXTENDED STREAM FORMAT INFORMATION' command. This command
has two subfunctions, 'SINGLE' and 'LIST'. Drivers can use 'SINGLE' subfunction
to know/set current formation of AMDTP stream, Drivers can use 'LIST'
subfunction to know an available formation of AMDTP stream in a certain sampling
rate.But some devices don't implement the 'LIST' subfunction. So this commit uses
an assumption that 'if they don't implement it, they don't change stream
formation depending on current each sampling rate'. With this assumption, this
driver generates formations for such devices by:
1.getting current formation by SINGLE subfunction
2.getting supported sampling rates
3.applying current formation for all of supported sampling ratesFollowed commit implements a parser of this format information.
Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This is a preparation for more models. In following commit, members
of 'struct snd_card' related to name becomes to consists of vendor and
model strings in device's config-rom.Current supported devices also has strings in their config rom, but the
strings are too long to name sound card, thus this driver still keep
hard-coded vendor and model names for them.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
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.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This commit adds a support for capturing PCM samples.
When opposite PCM substream is already running, available sampling rate is
limited at current one.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This commit allows this driver to handle devices with non SYT-Match
sampling clock source.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. Currently firewire-lib module achieve this work.Furthermore, without SYT-Match and internal clock source, the sampling rate
should be fixed for the other devices connected to the handled device. This
commit add a restriction of sampling rate at this situation.With these implementations, this driver has no need to set clock source.
This commit remove set function.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
This commit adds support for AMDTP in-stream. As a result, Dice driver
supports full duplex streams with synchronization.AMDTP can transfer timestamps in its packets. By handling the timestamp,
devices can synchronize to the other devices or drivers on the same bus.When Dice chipset is 'enabled', it starts streams with correct settings.
This 'enable' register is global, thus, when a stream is started to run,
an opposite stream can't start unless turning off 'enable'. Therefore
a pair of streams must be running. This causes a loss of CPU usage when
single stream is needed for neither playbacking or capturing.This commit assumes that playback-only models also have a functionality
to transmit stream for delivering timestamps.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 uses the 1st stream only
for simplicity.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
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.Signed-off-by: Takashi Sakamoto
Acked-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
02 Dec, 2014
1 commit
-
sound/firewire/dice/dice-transaction.c:34:2-3: Unneeded semicolon
Removes unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Takashi Sakamoto
Signed-off-by: Fengguang Wu
Signed-off-by: Takashi Iwai
30 Nov, 2014
5 commits
-
This is a help for works in followed patches.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This is a help for works in followed patches.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This is a help for works in followed patches.
And this commit remove 'fw_unit_get()/fw_unit_put()' because these
are called by helper functions in 'snd-firewire-lib'.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
Followed commits add much codes. To make the work easy, this commit creates
own directory and move current file to it.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit renames 'firewire-speakers' to 'oxfw' to enhance support for
devices which based on OXFW970/971. A line for MODULE_ALIAS is added.Additionally, to help for works in followed paches, some members
in private structure are renamed.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai