Takashi Sakamoto [Mon, 14 Jun 2021 08:31:33 +0000 (17:31 +0900)]
ALSA: firewire-motu: fix stream format for MOTU 8pre FireWire
My previous refactoring for ALSA firewire-motu driver brought regression
to handle MOTU 8pre FireWire. The packet format is not operated correctly.
Cc: <stable@vger.kernel.org>
Fixes:
dfbaa4dc11eb ("ALSA: firewire-motu: add model-specific table of chunk count")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210614083133.39753-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daehwan Jung [Wed, 16 Jun 2021 09:34:55 +0000 (18:34 +0900)]
ALSA: usb-audio: fix rate on Ozone Z90 USB headset
It mislabels its 96 kHz altsetting and that's why it causes some noise
Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1623836097-61918-1-git-send-email-dh10.jung@samsung.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Wed, 16 Jun 2021 08:28:47 +0000 (17:28 +0900)]
ALSA: firewire-motu: add support for MOTU 896
MOTU 896 is a second model in MOTU FireWire series, produced in 2001. This
model consists of three chips:
* Texas Instruments TSB41AB2 (Physical layer for IEEE 1394 bus)
* Philips Semiconductors PDI 1394L21BE (Link layer for IEEE 1394 bus and
packet processing layer)
* QuickLogic QuickRAM QL4016 (Data block processing layer and digital
signal processing)
This commit adds a support for the model, with its unique protocol as
version 1. The features of this protocol are:
* no MIDI support.
* Rx packets have no data chunks for control and status messages.
* Tx packets have 2 bytes for control and status messages in the end of
each data block.
* The most of settings are represented in bit flag in one quadlet address
(0x'ffff'f000'0b14).
* It's selectable to use signal on optical interface, however the device
has no register specific to it. The state has effect just to whether
to exclude differed data chunks.
* The internal multiplexer is not configured by software.
Just after powering on, the device has a quirk to fail handling
transaction. I recommend users to connect the device enough after powering
on.
$ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400
04102814 bus_info_length 4, crc_length 16, crc 10260
404
31333934 bus_name "1394"
408
20001000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4)
40c
0001f200 company_id 0001f2 |
410
0000d645 device_id
000000d645 | EUI-64
0001f2000000d645
root directory
-----------------------------------------------------------------
414
0004c65c directory_length 4, crc 50780
418
030001f2 vendor
41c
0c0083c0 node capabilities per IEEE 1394
420
8d000006 --> eui-64 leaf at 438
424
d1000001 --> unit directory at 428
unit directory at 428
-----------------------------------------------------------------
428
0003ab34 directory_length 3, crc 43828
42c
120001f2 specifier id
430
13000002 version
434
17102801 model
eui-64 leaf at 438
-----------------------------------------------------------------
438
0002057d leaf_length 2, crc 1405
43c
0001f200 company_id 0001f2 |
440
0000d645 device_id
000000d645 | EUI-64
0001f2000000d645
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210616082847.124688-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Wed, 16 Jun 2021 08:28:46 +0000 (17:28 +0900)]
ALSA: firewire-motu: add support for MOTU 828
MOTU 828 is a first model in MOTU FireWire series, produced in 2001. This
model consists of three chips:
* Texas Instruments TSB41AB1 (Physical layer for IEEE 1394 bus)
* Philips Semiconductors 1394L21BE (Link layer for IEEE 1394 bus and
packet processing layer)
* QuickLogic QuickRAM QL4016 (Data block processing layer and digital
signal processing)
This commit adds a support for this model, with its unique protocol as
version 1. The features of this protocol are:
* no MIDI support.
* Rx packets have no data chunks for control and status messages.
* Tx packets have 2 data chunks for control and status messages in the
end of each data block. The chunks consist of data block counter
(4 byte) and message (2 byte).
* All of settings are represented in bit flag in one quadlet address
(0x'ffff'f000'0b00).
* When optical interface is configured as S/PDIF, signals of the interface
is multiplexed for packets, instead of signals of coaxial interface.
* The internal multiplexer is not configured by software.
I note that the device has a quirk to mute output voluntarily during
receiving batch of packets in the beginning of packet streaming. The
operation to unmute should be done by software enough after the device
shifts the state, however it's not deterministic. Furthermore, just
after switching rate of sampling clock, the device keeps the state longer.
This patch manages to sleep 100 msec before unmute operation, but it may
fail to release the mute in the case that the rate is changed. As a
workaround, users can restart packet streaming at the same rate, or write
to specific register from userspace.
$ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400
04105c54 bus_info_length 4, crc_length 16, crc 23636
404
31333934 bus_name "1394"
408
20001000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4)
40c
0001f200 company_id 0001f2 |
410
00005015 device_id
0000005015 | EUI-64
0001f20000005015
root directory
-----------------------------------------------------------------
414
0004c65c directory_length 4, crc 50780
418
030001f2 vendor
41c
0c0083c0 node capabilities per IEEE 1394
420
8d000006 --> eui-64 leaf at 438
424
d1000001 --> unit directory at 428
unit directory at 428
-----------------------------------------------------------------
428
00035052 directory_length 3, crc 20562
42c
120001f2 specifier id
430
13000001 version
434
17101800 model
eui-64 leaf at 438
-----------------------------------------------------------------
438
0002eeb6 leaf_length 2, crc 61110
43c
0001f200 company_id 0001f2 |
440
00005015 device_id
0000005015 | EUI-64
0001f20000005015
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210616082847.124688-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Colin Ian King [Tue, 15 Jun 2021 14:20:48 +0000 (15:20 +0100)]
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>
Yang Yingliang [Wed, 16 Jun 2021 02:11:21 +0000 (10:11 +0800)]
ALSA: ppc: fix error return code in snd_pmac_probe()
If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails,
snd_pmac_probe() need return error code.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210616021121.1991502-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Mon, 14 Jun 2021 07:17:10 +0000 (09:17 +0200)]
ALSA: control_led - fix initialization in the mode show callback
The str variable should be always initialized before use even if
the switch covers all cases. This is a minimalistic fix: Assign NULL,
the sprintf() may print '(null)' if something is corrupted.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210614071710.1786866-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Sun, 13 Jun 2021 08:26:21 +0000 (17:26 +0900)]
ALSA: firewire: fill Kconfig with entries for devices based on DICE ASICs
Nowadays a lot of devices are supported by ALSA dice driver. This commit
fills Kconfig with entries for them.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210613082621.10900-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:30 +0000 (18:37 +0900)]
ALSA: bebob: correct device entries for Phonic Helix Board and FireFly series
Phonic shipped Helix board and FireFly series with IEEE 1394
functionality. Regarding to the parameters in unit directory, these
series have two cases below:
1. the same parameters in unit directory
* Firefly 202
* Firefly 302
* Firefly 808 Universal
* HelixBoard 12 FireWire, 12 Universal
* HelixBoard 18 FireWire, 18 Universal
* HelixBoard 24 FireWire, 24 Universal
2. Unique parameters in unit directory
* FireFly 808
* HelixBoard 12 FireWire MkII
* HelixBoard 18 FireWire MkII
* HelixBoard 24 FireWire MkII
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:29 +0000 (18:37 +0900)]
ALSA: bebob: code refactoring for M-Audio models
For M-Audio FireWire 410, the value of immediate entry for vendor in unit
directory is the value for BridgeCo. AG OUI. It seems that M-Audio uses
initial settings as is for its product.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:28 +0000 (18:37 +0900)]
ALSA: bebob: correct device entry for Acoustic Reality eAR Master One, Eroica, Figaro, and Ciaccona
The value of vendor OUI is invalid. Furthermore it seems to be Terratec
OEM.
* http://subversion.ffado.org/wiki/AvcModels/AcousticRealityeARMasterOne
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:27 +0000 (18:37 +0900)]
ALSA: bebob: correct device entry for Mackie D.2 FireWire option card
For Mackie D.2 FireWire option card, 0x00000f is used for the value of
immediate entry for vendor in unit directory. The value comes from report
by FFADO user in below page:
* http://subversion.ffado.org/wiki/AvcModels/MackieD.2.
However, it seems to be wrong. There are two causes; vendor's mistake to
decide value for GUID field in configuration ROM against standard, as
Stefan Richter mentioned in below post:
* https://lore.kernel.org/alsa-devel/
1443917823-13516-1-git-send-email-o-takashi@sakamocchi.jp/#t
Another is implementation of libffado. The library doesn't print out the
value from immediate entry for vendor in unit directory. It just print out
the first 6 bytes of GUID as vendor ID.
This commit replaces with correct vendor OUI.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:26 +0000 (18:37 +0900)]
ALSA: fireworks: fulfil device entries
All of devices with Echo Audio Fireworks board module has the same
combination of specifier_id (0x00a02d) and version (0x010000) in
unit directory.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611093730.78254-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 09:37:25 +0000 (18:37 +0900)]
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>
Colin Ian King [Fri, 11 Jun 2021 16:52:23 +0000 (17:52 +0100)]
ALSA: i2c: tea6330t: Remove redundant initialization of variable err
The variable err is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210611165223.38983-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 08:34:25 +0000 (17:34 +0900)]
ALSA: firewire-lib: replace in_interrupt() with in_softirq()
Tasklet is used to handle isochronous context of 1394 OHCI. The explicit
usage of in_softirq() may be preferable than in_interrupt().
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611083425.61204-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Yang Yingliang [Thu, 10 Jun 2021 12:49:58 +0000 (20:49 +0800)]
ALSA: n64: check return value after calling platform_get_resource()
It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610124958.116142-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Yang Yingliang [Thu, 10 Jun 2021 13:19:22 +0000 (21:19 +0800)]
ALSA: hda/tegra: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610131922.134788-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
YueHaibing [Sat, 12 Jun 2021 03:34:58 +0000 (11:34 +0800)]
ALSA: trident: Fix build error
sound/pci/trident/trident_memory.c: In function ‘set_tlb_bus’:
sound/pci/trident/trident_memory.c:85:35: error: ‘pagetr’ undeclared (first use in this function); did you mean ‘page’?
for (i = 0; i < UNIT_PAGES; i++, pagetr++) {
^~~~~~
page
Fixes:
74fb98311c4e ("ALSA: trident: Drop shadow TLB pointer table")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20210612033458.42928-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Fri, 11 Jun 2021 03:50:03 +0000 (12:50 +0900)]
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>
Takashi Sakamoto [Fri, 11 Jun 2021 03:50:02 +0000 (12:50 +0900)]
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>
Takashi Sakamoto [Fri, 11 Jun 2021 03:50:01 +0000 (12:50 +0900)]
ALSA: bebob: dismiss sleep after breaking connections
In a commit
d3eabe939aee ("ALSA: bebob: expand sleep just after breaking
connections for protocol version 1"), a workaround was added for a quirk
of freeze in BeBoB protocol version 1. As long as seeing with sequence
replay for media clock recovery, the quirk disappears.
This commit removes the workaround.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210611035003.26852-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 10 Jun 2021 11:09:35 +0000 (13:09 +0200)]
ALSA: core: Fix build error due to missing PAGE_SIZE
The recent refactoring of memalloc stuff removed the inclusion of
asm/page.h for simplicity, but it turned out this caused a compile
error due the lack of PAGE_SIZE definition on some architectures.
Do a partial revert for recovering from that.
Fixes:
37af81c5998f ("ALSA: core: Abstract memory alloc helpers")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202106101858.PfXMMuAa-lkp@intel.com
Link: https://lore.kernel.org/r/20210610110935.10393-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Damien Zammit [Thu, 10 Jun 2021 08:35:28 +0000 (18:35 +1000)]
ALSA: usb-audio: Add support for Denon DN-X1600
This provides support for Denon DN-X1600 hardware mixer.
The device itself supports 44100, 48000 and 96000 (Hz)
sample rates, but switching rates via software is currently not working.
Therefore, this patch hardcodes the sample rate to 48000Hz which
enables all 8 channels to function correctly when the correct
sample rate is selected on the hardware itself.
MIDI also tested and works.
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Tested-by: xalmoxis@gmail.com
Link: https://lore.kernel.org/r/20210610083528.603942-2-damien@zamaudio.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 9 Jun 2021 16:25:51 +0000 (18:25 +0200)]
ALSA: core: Add continuous and vmalloc mmap ops
The mmap of continuous pages and vmalloc'ed pages are relatively
easily done in a shot with the existing helper functions.
Implement the mmap ops for those types, so that the mmap works without
relying on the page fault handling.
Link: https://lore.kernel.org/r/20210609162551.7842-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 9 Jun 2021 16:25:50 +0000 (18:25 +0200)]
ALSA: core: Move mmap handler into memalloc ops
This patch moves the mmap handling code into the common memalloc
handler. It allows us to reduce the memory-type specific code in PCM
code gracefully.
Link: https://lore.kernel.org/r/20210609162551.7842-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 9 Jun 2021 16:25:49 +0000 (18:25 +0200)]
ALSA: core: Abstract memory alloc helpers
This patch introduces the ops table to each memory allocation type
(SNDRV_DMA_TYPE_XXX) and abstract the handling for the better code
management. Then we get separate the page allocation, release and
other tasks for each type, especially for the SG buffer.
Each buffer type has now callbacks in the struct snd_malloc_ops, and
the common helper functions call those ops accordingly. The former
inline code that is specific to SG-buffer is moved into the local
sgbuf.c, and we can simplify the PCM code without details of memory
handling.
Link: https://lore.kernel.org/r/20210609162551.7842-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 9 Jun 2021 16:25:48 +0000 (18:25 +0200)]
ALSA: core: Drop snd_sgbuf_get_ptr()
snd_sgbuf_get_ptr() and its sibling snd_pcm_sgbuf_get_ptr() are no
longer used by any drivers. Let's drop them.
Link: https://lore.kernel.org/r/20210609162551.7842-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 9 Jun 2021 16:25:47 +0000 (18:25 +0200)]
ALSA: trident: Drop shadow TLB pointer table
The shadow TLB pointer table is allocated and set up, but never really
used any longer by the driver. Let's drop it.
Since this is the only user of snd_pcm_sgbuf_get_ptr(), we can clean
up the API after this change.
Link: https://lore.kernel.org/r/20210609162551.7842-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
huangjianghui [Thu, 10 Jun 2021 06:20:36 +0000 (14:20 +0800)]
ALSA: doc: Fix spelling mistakes
correct Reatek to Realtek
Signed-off-by: huangjianghui <huangjianghui@uniontech.com>
Link: https://lore.kernel.org/r/20210610062036.30300-1-huangjianghui@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
zuoqilin [Thu, 10 Jun 2021 02:40:53 +0000 (10:40 +0800)]
ALSA: arm: Remove unnecessary variables
There is no need to define the variable "ret" to receive.
Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Link: https://lore.kernel.org/r/20210610024053.1217-1-zuoqilin1@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Thu, 10 Jun 2021 03:17:33 +0000 (12:17 +0900)]
ALSA: firewire-lib: obsolete workqueue for period update
The workqueue to notify PCM period elapse is not used anymore.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210610031733.56297-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Thu, 10 Jun 2021 03:17:32 +0000 (12:17 +0900)]
ALSA: firewire-lib: operate for period elapse event in process context
All of drivers in ALSA firewire stack processes two chances to process
isochronous packets in any isochronous context; in software IRQ context
for 1394 OHCI, and in process context of ALSA PCM application.
In the process context, callbacks of .pointer and .ack are utilized. The
callbacks are done by ALSA PCM core under acquiring lock of PCM substream,
In design of ALSA PCM core, call of snd_pcm_period_elapsed() is used for
drivers to awaken user processes from waiting for available frames. The
function voluntarily acquires lock of PCM substream, therefore it is not
called in the process context since it causes dead lock.
As a workaround to avoid the dead lock, all of drivers in ALSA firewire
stack uses workqueue to delegate the call. A variant of
snd_pcm_period_elapsed() without lock acquisition can obsolete the
workqueue.
An extra care is needed for the callback of .pointer since it's called
from snd_pcm_period_elapsed(). The isochronous context in Linux FireWire
subsystem is safe mostly for nested call except in software IRQ context.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210610031733.56297-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Thu, 10 Jun 2021 03:17:31 +0000 (12:17 +0900)]
ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock of PCM substream
Current implementation of ALSA PCM core has a kernel API,
snd_pcm_period_elapsed(), for drivers to queue event to awaken processes
from waiting for available frames. The function voluntarily acquires lock
of PCM substream, therefore it is not called in process context for any
PCM operation since the lock is already acquired.
It is convenient for packet-oriented driver, at least for drivers to audio
and music unit in IEEE 1394 bus. The drivers are allowed by Linux
FireWire subsystem to process isochronous packets queued till recent
isochronous cycle in process context in any time.
This commit adds snd_pcm_period_elapsed() variant,
snd_pcm_period_elapsed_without_lock(), for drivers to queue the event in
the process context.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210610031733.56297-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:40 +0000 (16:05 +0200)]
ALSA: parisc: Fix assignment in if condition
PARISC harmony driver code contains an assignment in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-67-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:39 +0000 (16:05 +0200)]
ALSA: i2c: Fix assignment in if condition
ALSA I2C helper drivers contain a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-66-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:38 +0000 (16:05 +0200)]
ALSA: poewrmac: Fix assignment in if condition
PPC powermac driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-65-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:37 +0000 (16:05 +0200)]
ALSA: synth: Fix assignment in if condition
EMUx synth driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-64-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:36 +0000 (16:05 +0200)]
ALSA: serial: Fix assignment in if condition
A few ALSA serial drivers contain assignments in if condition, which
is a bad coding style that may confuse readers and occasionally lead
to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-63-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:35 +0000 (16:05 +0200)]
ALSA: opl3: Fix assignment in if condition
OPL3 helper code contains a few assignments in if condition, which is
a bad coding style that may confuse readers and occasionally lead to
bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-62-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:34 +0000 (16:05 +0200)]
ALSA: vx: Fix assignment in if condition
VX driver helper code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-61-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:33 +0000 (16:05 +0200)]
ALSA: mpu401: Fix assignment in if condition
MPU401 driver code contains a few assignments in if condition, which
is a bad coding style that may confuse readers and occasionally lead
to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-60-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:32 +0000 (16:05 +0200)]
ALSA: sparc: Fix assignment in if condition
SPARC drivers contain a few assignments in if condition, which is a
bad coding style that may confuse readers and occasionally lead to
bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-59-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:31 +0000 (16:05 +0200)]
ALSA: pcmcia: Fix assignment in if condition
PCMCIA VX222 and PDAudioCF drivers contain a few assignments in if
condition, which is a bad coding style that may confuse readers and
occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-58-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:30 +0000 (16:05 +0200)]
ALSA: seq: Fix assignment in if condition
There are lots of places doing assignments in if condition in ALSA
sequencer core, which is a bad coding style that may confuse readers
and occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-57-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:29 +0000 (16:05 +0200)]
ALSA: oss: Fix assignment in if condition
There are a few places doing assignments in if condition in ALSA PCM
and OSS emulation layers, which is a bad coding style that may confuse
readers and occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-56-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:28 +0000 (16:05 +0200)]
ALSA: pcm: Fix assignment in if condition
There are a few places doing assignments in if condition in ALSA PCM
core code, which is a bad coding style that may confuse readers and
occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-55-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:27 +0000 (16:05 +0200)]
ALSA: core: Fix assignment in if condition
There are a few places doing assignments in if condition in ALSA core
code, which is a bad coding style that may confuse readers and
occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-54-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:26 +0000 (16:05 +0200)]
ALSA: ymfpci: Fix assignment in if condition
PCI YMFPCI driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-53-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:25 +0000 (16:05 +0200)]
ALSA: vx222: Fix assignment in if condition
PCI VX222 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-52-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:24 +0000 (16:05 +0200)]
ALSA: trident: Fix assignment in if condition
PCI Trident driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-51-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:23 +0000 (16:05 +0200)]
ALSA: rme9652: Fix assignment in if condition
PCI RME9652 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-50-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:22 +0000 (16:05 +0200)]
ALSA: hdsp: Fix assignment in if condition
PCI HDSP driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-49-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:21 +0000 (16:05 +0200)]
ALSA: riptide: Fix assignment in if condition
PCI riptide driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-48-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:20 +0000 (16:05 +0200)]
ALSA: pcxhr: Fix assignment in if condition
PCI PCXHR driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-47-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:19 +0000 (16:05 +0200)]
ALSA: nm256: Fix assignment in if condition
PCI NM256 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-46-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:18 +0000 (16:05 +0200)]
ALSA: mixart: Fix assignment in if condition
PCI miXart driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-45-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:17 +0000 (16:05 +0200)]
ALSA: korg1212: Fix assignment in if condition
PCI Korg1212 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-44-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:16 +0000 (16:05 +0200)]
ALSA: ice1712: Fix assignment in if condition
PCI ICE1712 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-43-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:15 +0000 (16:05 +0200)]
ALSA: emu10k1x: Fix assignment in if condition
PCI EMU10k1X driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-42-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:14 +0000 (16:05 +0200)]
ALSA: emu10k1: Fix assignment in if condition
PCI EMU10k1 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-41-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:13 +0000 (16:05 +0200)]
ALSA: echoaudio: Fix assignment in if condition
PCI echoaudio drivers contain a few assignments in if condition, which
is a bad coding style that may confuse readers and occasionally lead
to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-40-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:12 +0000 (16:05 +0200)]
ALSA: cs5535audio: Fix assignment in if condition
PCI CS5535 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-39-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:11 +0000 (16:05 +0200)]
ALSA: cs46xx: Fix assignment in if condition
PCI CS46xx driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-38-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:10 +0000 (16:05 +0200)]
ALSA: ca0106: Fix assignment in if condition
PCI CA0106 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-37-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:09 +0000 (16:05 +0200)]
ALSA: au88x0: Fix assignment in if condition
PCI AU88x0 driver code contains a lot of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes. A potential real fix is
about the PCI AGP bridge management refcount in addition while spotted
out during conversions.
Link: https://lore.kernel.org/r/20210608140540.17885-36-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:08 +0000 (16:05 +0200)]
ALSA: ac97: Fix assignment in if condition
AC97 codec driver code contains a lot of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-35-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:07 +0000 (16:05 +0200)]
ALSA: via82xx: Fix assignment in if condition
PCI VIA82xx driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-34-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:06 +0000 (16:05 +0200)]
ALSA: sonicvibes: Fix assignment in if condition
PCI sonicvibes driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-33-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:05 +0000 (16:05 +0200)]
ALSA: rme96: Fix assignment in if condition
PCI RME96 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes (only systematic
conversions except for a few rate handling codes), no functional
changes.
Link: https://lore.kernel.org/r/20210608140540.17885-32-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:04 +0000 (16:05 +0200)]
ALSA: rme32: Fix assignment in if condition
PCI RME32 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes (except for a slight
refactoring about AutoSync rate check, only systematic conversions),
no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-31-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:03 +0000 (16:05 +0200)]
ALSA: maestro3: Fix assignment in if condition
PCI maestro3 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-30-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:02 +0000 (16:05 +0200)]
ALSA: intel8x0: Fix assignment in if condition
PCI intel8x0 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-29-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:01 +0000 (16:05 +0200)]
ALSA: fm801: Fix assignment in if condition
PCI FM801 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-28-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:05:00 +0000 (16:05 +0200)]
ALSA: es1968: Fix assignment in if condition
PCI ES1968 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-27-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:59 +0000 (16:04 +0200)]
ALSA: es1938: Fix assignment in if condition
PCI ES1938 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-26-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:58 +0000 (16:04 +0200)]
ALSA: ens137x: Fix assignment in if condition
PCI ENS137x driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-25-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:57 +0000 (16:04 +0200)]
ALSA: cs4281: Fix assignment in if condition
PCI CS4281 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:56 +0000 (16:04 +0200)]
ALSA: cmipci: Fix assignment in if condition
PCI CMIPCI driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-23-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:55 +0000 (16:04 +0200)]
ALSA: bt87x: Fix assignment in if condition
PCI BT87x driver code contains an assignments in if condition, which
is a bad coding style that may confuse readers and occasionally lead
to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:54 +0000 (16:04 +0200)]
ALSA: azt3328: Fix assignment in if condition
PCI AZT3328 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-21-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:53 +0000 (16:04 +0200)]
ALSA: atiixp: Fix assignment in if condition
PCI ATIIXP driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-20-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:52 +0000 (16:04 +0200)]
ALSA: als4000: Fix assignment in if condition
PCI ALS4000 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-19-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:51 +0000 (16:04 +0200)]
ALSA: als300: Fix assignment in if condition
PCI ALS300 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-18-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:50 +0000 (16:04 +0200)]
ALSA: ak4531: Fix assignment in if condition
AK4531 codec driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-17-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:49 +0000 (16:04 +0200)]
ALSA: ad1889: Fix assignment in if condition
PCI AD1889 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-16-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:48 +0000 (16:04 +0200)]
ALSA: isa: Fix assignment in if condition
ISA ES1688 and WSS driver code contains a few assignments in if
condition, which is a bad coding style that may confuse readers and
occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:47 +0000 (16:04 +0200)]
ALSA: azt2320: Fix assignment in if condition
ISA AZT2320 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:46 +0000 (16:04 +0200)]
ALSA: als100: Fix assignment in if condition
ISA ALS100 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:45 +0000 (16:04 +0200)]
ALSA: cmi8330: Fix assignment in if condition
ISA CMI8330 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:44 +0000 (16:04 +0200)]
ALSA: es18xx: Fix assignment in if condition
ISA ES18xx driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:43 +0000 (16:04 +0200)]
ALSA: opl3sa2: Fix assignment in if condition
ISA OPL3SA2 driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:42 +0000 (16:04 +0200)]
ALSA: opti9xx: Fix assignment in if condition
ISA Opti9xx driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:41 +0000 (16:04 +0200)]
ALSA: cs423x: Fix assignment in if condition
ISA CS423x driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:40 +0000 (16:04 +0200)]
ALSA: wavefront: Fix assignment in if condition
ISA WaveFront driver code contains lots of assignments in if
condition, which is a bad coding style that may confuse readers and
occasionally lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:39 +0000 (16:04 +0200)]
ALSA: ad1816a: Fix assignment in if condition
ISA AD1816A driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:38 +0000 (16:04 +0200)]
ALSA: gus: Fix assignment in if condition
ISA GUS driver code contains lots of assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.
This patch is merely for coding-style fixes, no functional changes.
Link: https://lore.kernel.org/r/20210608140540.17885-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:37 +0000 (16:04 +0200)]
ALSA: sb: Fix potential double-free of CSP mixer elements
snd_sb_qsound_destroy() contains the calls of removing the previously
created mixer controls, but it doesn't clear the pointers. As
snd_sb_qsound_destroy() itself may be repeatedly called via ioctl,
this could lead to double-free potentially.
Fix it by clearing the struct fields properly afterwards.
Link: https://lore.kernel.org/r/20210608140540.17885-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:36 +0000 (16:04 +0200)]
ALSA: sb: Minor coding style fixes
The handling of snd_ctl_new1() and snd_ctl_add() can be sometimes
tricky, as snd_ctl_add() automatically removes the passed object at
its error path. The recent fix addressed an overlooked issue that is
relevant with that in SB driver code, and it can be a bit more
simplified by assigning to a temporary variable, i.e. storing to the
struct field only after the creation succeeds.
Link: https://lore.kernel.org/r/20210608140540.17885-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 8 Jun 2021 14:04:35 +0000 (16:04 +0200)]
ALSA: sb: Fix assignment in if condition
A lot of code for SB drivers is in a legacy style with assignment in
if condition. This also made harder to catch some bugs (e.g. the
commit
1c98f574403d "ALSA: emu8000: Fix a use after free in
snd_emu8000_create_mixer").
This patch fixes the coding style. All are rather simple conversions
and there should be no functional changes.
(The changes in snd_emu8000_new() for hw->res_port1, 2 and 3 are
slightly different from the older ones, but this shouldn't matter
much in practice.)
Link: https://lore.kernel.org/r/20210608140540.17885-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>