Commit graph

1013536 commits

Author SHA1 Message Date
YueHaibing
e1dc219af7 ALSA: pcm: use DEVICE_ATTR_RO macro
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20210524120007.39728-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 09:00:04 +02:00
Yufen Yu
a38e93302e ALSA: ac97: fix PM reference leak in ac97_bus_remove()
pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Link: https://lore.kernel.org/r/20210524093811.612302-1-yuyufen@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:59:08 +02:00
zuoqilin
877013bc9c sound/oss/dmasound: Remove superfluous "break"
Remove superfluous "break", as there is a "return" before them.

Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Link: https://lore.kernel.org/r/20210524070028.45-1-zuoqilin1@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:57:11 +02:00
Takashi Sakamoto
5ec85c198e 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>
2021-05-25 08:54:38 +02:00
Takashi Sakamoto
266807f94e ALSA: bebob: cancel switching connection order
The order to establish connection seems to be meaningless.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:54:24 +02:00
Takashi Sakamoto
b7c7699b4f ALSA: firewire-lib: obsolete callbacked member
The member of callbacked in AMDTP stream structure is not used anymore.
Instead, ready_processing member is used to wake up yielding task of user
process.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:54:05 +02:00
Takashi Sakamoto
fb25dcc885 ALSA: firewire-lib: drop initial NODATA or empty packet
The devices based on BeBoB ASICs or the devices in Tascam FireWire
series transfer a batch of NODATA packet or empty packet in the beginning
of packet streaming. To avoid processing them, current implementation uses
an option to skip processing content of tx packet during some initial
cycles. However, the hard-coded number is not enough useful.

This commit drops content of packets till the packet includes any event
firstly. The function of option is to skip processing content of tx packet
with any event after dropping.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210524031346.50539-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:53:43 +02:00
Takashi Iwai
f20fdd4362 Merge branch 'topic/pci-rescan-prep-v2' into for-next
Pull PCI rescan prep work.

Link: https://lore.kernel.org/r/20210523090920.15345-1-tiwai@suse.de
2021-05-25 08:50:03 +02:00
Takashi Iwai
534a427bfa ALSA: pcm: Block the release until the system resume finishes
The normal PCM operations are already blocked during the card power
off state in the PCM common ioctl handler, but the release isn't
covered.  As the PCM stream release may also access the hardware,
let's block the release until the card power turns on.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:49:55 +02:00
Takashi Iwai
b6cc78da36 ALSA: Drop superfluous argument from snd_power_wait()
The power_state argument of snd_power_wait() is superfluous, receiving
only SNDRV_POWER_STATE_D0.  Let's drop it in all callers for
simplicity.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210523090920.15345-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:49:39 +02:00
Takashi Iwai
968bb2baec ALSA: control: Minor optimization for SNDRV_CTL_IOCTL_POWER_STATE
Long long time ago, before the proper PM framework was introduced, it
was still possible to reach SNDRV_CTL_IOCTL_POWER ioctl during the
power off state.  This ioctl existed as a main control for the suspend
resume state in the past, but the feature was already dropped along
with the standard PM framework.  Now the read part,
SNDRV_IOCTL_POWER_STATE ioctl, returns practically always D0, and we
can do some minor optimization there.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:49:06 +02:00
Takashi Iwai
73063cd323 ALSA: control: Drop superfluous snd_power_wait() calls
Now we have more fine-grained power controls in each kcontrol ops, the
coarse checks of snd_power_wait() in a few control ioctls became
superfluous.  Let's drop them.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:48:49 +02:00
Takashi Iwai
e94fdbd7b2 ALSA: control: Track in-flight control read/write/tlv accesses
Although the power state check is performed in various places (e.g. at
the entrance of quite a few ioctls), there can be still some pending
tasks that already went into the ioctl handler or other ops, and those
may access the hardware even after the power state check.  For
example, kcontrol access ioctl paths that call info/get/put callbacks
may update the hardware registers.  If a system wants to assure the
free from such hw access (like the case of PCI rescan feature we're
going to implement in future), this situation must be avoided, and we
have to sync such in-flight tasks finishing beforehand.

For that purpose, this patch introduces a few new things in core code:
- A refcount, power_ref, and a wait queue, power_ref_sleep, to the
  card object
- A few new helpers, snd_power_ref(), snd_power_unref(),
  snd_power_ref_and_wait(), and snd_power_sync_ref()

In the code paths that call kctl info/read/write/tlv ops, we check the
power state with the newly introduced snd_power_ref_and_wait().  This
function also takes the card.power_ref refcount for tracking this
in-flight task.  Once after the access finishes, snd_power_unref() is
called to released the refcount in return.  So the driver can sync via
snd_power_sync_ref() assuring that all in-flight tasks have been
finished.

As of this patch, snd_power_sync_ref() is called only at
snd_card_disconnect(), but it'll be used in other places in future.

Note that atomic_t is used for power_ref intentionally instead of
refcount_t.  It's because of the design of refcount_t type; refcount_t
cannot be zero-based, and it cannot do dec_and_test() call for
multiple times, hence it's not suitable for our purpose.

Also, this patch changes snd_power_wait() to accept only
SNDRV_CTL_POWER_D0, which is the only value that makes sense.
In later patch, the snd_power_wait() calls will be cleaned up.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:48:28 +02:00
Takashi Iwai
533a7ed9d5 ALSA: core: Use READ_ONCE() / WRITE_ONCE() for power state change
We need proper barriers to handle the power state change of the card
from different CPUs.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210523090920.15345-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-25 08:48:03 +02:00
Takashi Sakamoto
13d11f14ae ALSA: firewire-lib: code refactoring for transfer delay
In later commit, transfer delay is used in both IR and IT contexts. This
commit refactors regardless of transfer delay.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:48:06 +02:00
Takashi Sakamoto
c9f3ac2aae ALSA: firewire-lib: code refactoring for generation of data block sequence
This commit dissolves sequence generator in terms of the number of data
blocks per packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:47:54 +02:00
Takashi Sakamoto
c79b7158b0 ALSA: firewire-lib: code refactoring for generation of syt sequence
This commit dissolves sequence generator in terms of syt offsets for
packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:47:42 +02:00
Takashi Sakamoto
7ca7cddab2 ALSA: firewire-lib: code refactoring for generation of packet descriptors
This commit refactors the arguments of helper function to generate the
descriptors of packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:47:26 +02:00
Takashi Sakamoto
6f24bb8a15 ALSA: firewire-lib: pool sequence of packet in IT context independently
Current implementation pools the sequence in AMDTP domain. This is convenient
regarding to memory usage and computation time, however inconvenient for the
devices such that several rx streams are expected to transfer timing
information independently.

This commit refactors to pool the sequence per rx packet stream.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:47:09 +02:00
Takashi Sakamoto
8070d2652e ALSA: firewire-lib: add flag to unaware of syt in CIP header
Many devices are unaware of syt field in rx CIP for playback timing.

This commit adds a flag to cancel processing syt field. Actually,
syt calculation is required to decide the number of events per rx packet.
The flag put 0xffff to CIP header of rx packet. On the other hand,
The value of syt field in CIP header of tx packet is unavailable. The
sequence of packet descriptor for tx packet includes 0 for the offset
of syt field to avoid computation.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:46:41 +02:00
Takashi Sakamoto
344f0f821a ALSA: firewire-lib: Fix uninitialized variable err issue
The check of error is just done for the case that CIP header is available.

This commit moves auto variable into the branch to process CIP header.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: c09010eeb3 ("ALSA: firewire-lib: handle the case that empty isochronous packet payload for CIP")
Suggested-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520130409.GA170303@workstation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-22 08:44:05 +02:00
Takashi Iwai
be22db77dc ALSA: usb-audio: Fix uninitialized variable at __uac_clock_find_source()
The cur variable indicating the currently selected clock source can be
theoretically used as uninitialized after the recent commit
481f17c418 ("ALSA: usb-audio: Handle error for the current selector
gracefully").  For addressing it, initialize it before use.

Also, one place seems setting 0 to a wrong variable ret, instead of
cur; otherwise it makes little sense.  Since the initialization is
done beforehand, we can get rid of this line, too.

Fixes: 481f17c418 ("ALSA: usb-audio: Handle error for the current selector gracefully")
Reported-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/4b261d68-f53f-240d-2d8a-2f88b337849d@canonical.com
Link: https://lore.kernel.org/r/s5hfsyhh97t.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-21 16:16:21 +02:00
Takashi Sakamoto
bdaedca74d ALSA: firewire-lib: change waking up timing to process packets
When starting AMDTP domain, tasks in process context yields running CPU
till all of isochronous context get callback, with an assumption that
it's OK to process content of packet.

However several isochronous cycles are skipped to transfer rx packets, or
the content of rx packets are dropped, to manage the timing to start
processing the packets.

This commit changes the timing for tasks in process context to wake up
when processing content of packet is actually ready.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 14:01:17 +02:00
Takashi Sakamoto
9b1fcd9bf8 ALSA: firewire-lib: start processing content of packet at the same cycle in several IT contexts
DICE ASICs support several pairs of isochronous packet streaming and
expect software to queue packets with the same timing information into
the same isochronous cycle.

This commit adds structure member to manage the cycle to start
processing packet in several IT contexts. The cycle is decided when
batch of isochronous cycle is skipped in callback to isochronous context
for IRQ target.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 14:01:06 +02:00
Takashi Sakamoto
bd165079de ALSA: firewire-lib: code refactoring to start several IT/IR contexts
It's several hundred cycles from starting isochronous contexts and the
actual cycle to start processing content of packet. It's useless to
start the context for IRQ target apart from the other contexts.

This commit refactors helper function to start AMDTP domain in the point.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 14:00:51 +02:00
Takashi Sakamoto
26541cb15a ALSA: firewire-lib: skip initial packets instead of scheduling IR context
Current implementation of ALSA IEC 61883-1/6 packet streaming engine
allows drivers to decide isochronous cycle to start IR context. This
option is mainly used to avoid processing the sequence of packet with
some quirks; e.g. discontinuity of counter. However, it's inconvenient
to fail to continue packet processing when the target device doesn't
start transmission of packet till the decided cycle.

This commit changes the behaviour. As an alternative to the start cycle
for IR context, the cycle count to drop content of packet in the beginning
of IR context.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 14:00:38 +02:00
Takashi Sakamoto
da3623abfb ALSA: firewire-lib: start processing content of packet at the same cycle in several IR contexts
DICE ASICs support several pairs of isochronous packet streaming. It's
convenient for drivers to process content of the packet in the same cycle
timing.

This commit adds structure member to manage the cycle to start
processing packet in several IR contexts. The cycle is decided in the
first callback of the IR contexts. The content of packet is dropped
till the cycle.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 14:00:25 +02:00
Takashi Sakamoto
233dbbc7af ALSA: firewire-lib: code refactoring for selection of IT context header length
This commit refactors regarding to the size of CIP header.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 13:59:56 +02:00
Takashi Sakamoto
c75f36789d ALSA: firewire-lib: code refactoring for calculation of context payload
It's convenient to calculate the size of context payload apart from
the size of isochronous packet payload.

This commit adds a helper function for it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 13:59:43 +02:00
Takashi Sakamoto
67d92ee7a5 ALSA: firewire-lib: code refactoring for size of CIP header
Some macros are added to refactor codes related to CIP header.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210520040154.80450-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-20 13:59:29 +02:00
Takashi Iwai
e878e8c53e Merge branch 'topic/firewire' into for-next 2021-05-19 16:24:37 +02:00
Takashi Iwai
481f17c418 ALSA: usb-audio: Handle error for the current selector gracefully
Currently we bail out when the device returns an error or an invalid
value for the current clock selector value via
uac_clock_selector_get_val().  But it's possible that the device is
really uninitialized and waits for the setup of the proper route at
first.

For handling such a case, this patch lets the driver dealing with the
error or the invalid error more gracefully, choosing the clock source
automatically instead.

Link: https://lore.kernel.org/r/20210518152112.8016-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-19 16:23:05 +02:00
Takashi Iwai
9ec730052f ALSA: usb-audio: Refactoring UAC2/3 clock setup code
This patch just does refactoring of the UAC2/3 clock setup code.
There should be no functional changes.  The major changes are:

* Provide union objects for pointing both UAC2 and UAC3 objects
* Unify clock source, selector and multiplier helper functions
* Unify __uac_clock_find_source() to deal with both UAC2 and UAC3
  equally

Link: https://lore.kernel.org/r/20210518152112.8016-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-19 16:22:10 +02:00
Colin Ian King
a6de7b32b6 ALSA: rawmidi: fix incorrect array bounds check on clock_names
The array bounds check on clock_names is currently checking the size
of the entire array rather than the number of elements in the array
leading to a potential array bounds read error. Fix this by using
the ARRAY_SIZE macro instead of sizeof.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: 08fdced60c ("ALSA: rawmidi: Add framing mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210519105424.55221-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-19 16:20:25 +02:00
Takashi Sakamoto
73246fc4c9 ALSA: firewire-lib: insert descriptor for skipped cycle
This commit fulfils sequence descriptors for skipped cycle when
it's one cycle. This is preparation for future integration.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:13:28 +02:00
Takashi Sakamoto
705794c53b ALSA: firewire-lib: check cycle continuity
Within devices supported by drivers in ALSA firewire stack, OXFW-based
devices and Fireface devices are known to skip isochronous cycle for
packet transmission. The former is due to the jumbo payload quirk. The
latter is due to vendor protocol in which empty packet is not
transferred in blocking mode.

Although nothing to do just for handling events of the packet, packet
continuity is necessarily for media clock recovery. This commit checks
whether any cycle is continue or not.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:12:42 +02:00
Takashi Sakamoto
4fd1878766 ALSA: firewire-lib: code refactoring for check of CIP header about payload size
The size of CIP payload is now passed to helper function to parse CIP
header.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:12:31 +02:00
Takashi Sakamoto
ebd2a647e2 ALSA: firewire-lib: code refactoring for parser of IR context header
This commit refactors regarding to function argument for the length of
isochronous packet payload.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:12:15 +02:00
Takashi Sakamoto
3e106f4f69 ALSA: firewire-lib: code refactoring for helper function to compute OHCI 1394 cycle
Some macros and functions are renamed so that they compute isochronous
cycle within maximum count of second in isochronous context of 1394
OHCI.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:11:57 +02:00
Takashi Sakamoto
d32872f306 ALSA: firewire-lib: code refactoring for sequence descriptor'
A internal structure is used to gather parameters relevant to sequence
descriptor.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:11:01 +02:00
Takashi Sakamoto
c09010eeb3 ALSA: firewire-lib: handle the case that empty isochronous packet payload for CIP
Two quadlets are at least included in isochronous packet payload for
Common Isochronous Packet (CIP) format in IEC 61883-1. However, it's
better to equip ALSA IEC 61883-1/6 packet streaming engine for contrary
packet.

This commit handles isochronous cycle to process such packet so that the
cycle is skipped.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:10:47 +02:00
Takashi Sakamoto
6d60b7a3d3 ALSA: firewire-lib: code refactoring to refer the same frame count per period in domain structure
The number of PCM frame per period is common between PCM substreams
handled in AMDTP stream in AMDTP domain.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518130048.146596-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 18:10:28 +02:00
Takashi Iwai
3fda230b3e Merge branch 'topic/firewire' into for-next 2021-05-18 12:25:24 +02:00
Takashi Sakamoto
07a35edc59 ALSA: oxfw: add quirk flag for blocking transmission method
Stanton SCS.1m and Apogee Duet FireWire use blocking transmission method
unlike the other models.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-12-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:24:24 +02:00
Takashi Sakamoto
a6f9169323 ALSA: oxfw: code refactoring for wrong_dbs quirk
A new entry is added to the quirk enumeration for wrong_dbs quirk to
obsolete structure member.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-11-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:24:08 +02:00
Takashi Sakamoto
6a3ce97da2 ALSA: firewire-lib: code refactoring for jumbo payload quirk
A new macro is added to describe the maximum number of cycles to accept
cycle skip by jumbo payload quirk.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:23:55 +02:00
Takashi Sakamoto
a092f000b9 ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970
This commit adds enumeration to describe quirks of OXFW ASICs.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:23:39 +02:00
Takashi Sakamoto
95d0c24d39 ALSA: oxfw: add comment for the type of ASICs
ALSA OXFW supports two types of ASICS; OXFW970 and OXFW971. The former
is known to have a quirk we call 'jumbo payload' that some isochronous
cycles are skipped to transfer isochronous packets during handling
asynchronous transaction. The quirk seems to correspond to firmware
initially delivered by Oxford Semiconductor since the quirk is not
confirmed for Mackie Onyx Satellite in which the revised firmware is
available. The quirk is not confirmed in the latter.

This commit adds code comment to describe the quirk.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:23:09 +02:00
Takashi Sakamoto
c59bc10e7f ALSA: oxfw: add explicit device entry for Loud Technologies Mackie Onyx Sattelite
Loud Technologies Mackie Onyx Satellite is identified as the model with
OXFW970 ASIC.

This commit adds explicit entry for the model.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:23:00 +02:00
Takashi Sakamoto
2239924be4 ALSA: oxfw: add explicit device entry for Loud Technologies Tapco Link.FireWire 4x6
Loud Technologies Tapco Link.FireWire 4x6 is identified as the model
with OXFW970 ASIC.

This commit adds explicit entry for the model.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210518084557.102681-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-18 12:22:52 +02:00