aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-24ALSA: echoaudio: Drop superfluous macroTakashi Iwai2-7/+1
Drop pci_device() macro that just leads to chip->pci->dev, and pass it directly to request_firmware(). It was introduced for allowing the external alsa-driver kernel module builds. Since it was discontinued years ago, we should clean it up now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-24ALSA: usb-audio: Drop superfluous ifndefTakashi Iwai1-4/+0
Drop the superfluous #ifndef checks that had been put just for allowing building the alsa-driver kernel modules externally. Since the external build was discontinued years ago, let's clean up the old kludges. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add ASRock H81M-HDS to the power_save blacklistHans de Goede1-0/+2
Power-saving is causing plops on audio start/stop on ASRock H81M-HDS machines, add these to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Gigabyte P55A-UD3 and Z87-D3HP to the power_save blacklistHans de Goede1-0/+3
Power-saving is causing plops on audio start/stop on Gigabyte P55A-UD3 and Gigabyte Z87-D3HP machines, add these to the power_save blacklist. Note these 2 boards both use 1458:a002 as subsystem ids, so they share a single entry. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklistHans de Goede1-0/+2
Power-saving is causing a plop and silences the first 2 seconds (give or take) of audio, silencing notifications sounds on Medion / Clevo W35xSS_370SS laptops. Add the Clevo W35xSS_370SS to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1581607 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Intel NUC7i3BNB to the power_save blacklistHans de Goede1-0/+2
Power-saving is causing a humming sound when active on the Intel NUC7i3BNB, add it to the blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520902 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-22ALSA: hda/conexant - Add hp-mic-fix model stringTakashi Iwai1-0/+1
Add "hp-mic-fix" model string for Conexant codecs so that user can test the quirk without recompiling. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-22ALSA: hda/conexant - Add fixup for HP Z2 G4 workstationTakashi Iwai1-0/+1
HP Z2 G4 requires the same workaround as other HP machines that have no mic-pin detection. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-22ALSA: oxfw: use match_string() helperYisheng Xie1-7/+1
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-21Merge branch 'topic/xen' into for-nextTakashi Iwai14-1/+2701
Merge Xen para-virtualized frontend driver from Oleksandr Andrushchenko. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-21ALSA: dice: add stream format parameters for TC Electronic Digital Konnekt x32Takashi Sakamoto2-0/+15
TC Electronic Digital Konnekt x32 is an application of WaveFront DiceII STD and doesn't support TCAT extended application protocol. For such devices, ALSA dice driver needs to have hard-coded parameters for stream formats. This commit adds stream format parameters for this model. Unfortunately, at sampling transmission frequencies of 88.2/96.0kHz, I confirmed that current ALSA dice driver doesn't drive the device appropriately due to detecting packet discontinuities. $ journalctl kernel: snd_dice fw1.0: Detect discontinuity of CIP: 90 80 At the frequencies, the device transfers 16 data blocks per packet and 16 data channels per data block, as a result one packet includes 1032 bytes if it's not NODATA. However, as long as I checked, the device often postpone packet transmission and continue with truncated payload than metadata in isochronous packet header. Below is a sample of sequence I got. sec cycle bytes CIP1 CIP2 37 3314 1032 0x01100090 0x900449E2 37 3315 8 0x011000A0 0x9004FFFF 37 3316 1032 0x011000A0 0x900461E2 37 3317 1032 0x011000B0 0x900475E2 37 3318 1032 0x011000C0 0x900489E2 37 3319 8 0x011000D0 0x9004FFFF 37 3320 1032 0x011000D0 0x9004A1E2 37 3321 1032 0x011000E0 0x9004B5E2 37 3322 1032 0x011000F0 0x9004C9E2 37 3323 8 0x01100000 0x9004FFFF 37 3324 1032 0x01100000 0x9004E1E2 37 3325 1032 0x01100010 0x9004F5E2 37 3326 1032 0x01100020 0x900409E2 37 3327 8 0x01100030 0x9004FFFF 37 3328 1032 0x01100030 0x900421E2 37 3329 1032 0x01100040 0x900435E2 37 3330 (skip) 37 3331 (skip) 37 3332 (skip) 37 3333 (skip) 37 3334 (skip) 37 3335 (skip) 37 3336 (skip) 37 3337 (skip) 37 3338 (skip) 37 3339 (skip) 37 3340 (skip) 37 3341 (skip) 37 3342 (skip) 37 3343 (skip) 37 3344 (skip) 37 3345 (skip) 37 3346 (skip) 37 3347 (skip) 37 3348 (skip) 37 3349 (skip) 37 3350 (skip) 37 3351 (skip) 37 3352 (skip) 37 3353 (skip) 37 3354 (skip) 37 3355 (skip) 37 3356 (skip) 37 3357 (skip) 37 3358 (skip) 37 3359 (skip) 37 3360 (skip) 37 3361 (skip) 37 3362 (skip) 37 3363 (skip) 37 3364 (skip) 37 3365 (skip) 37 3366 (skip) 37 3367 1032 0x01100050 0x900461E1 37 3368 1032 0x01100060 0x900475E1 37 3369 1032 0x01100070 0x9004A1E1 37 3370 1032 0x01100080 0x9004A1E1 but content of payload is truncated. 37 3371 (skip) 37 3371 1032 0x01100080 0x9004B5E0 detect discontinuity 37 3372 1032 0x01100090 0x9004C9E0 37 3373 1032 0x011000A0 0x9004E1E0 37 3374 1032 0x011000B0 0x9004F5E0 37 3375 1032 0x011000C0 0x900409E0 37 3376 1032 0x011000D0 0x900421E0 37 3377 1032 0x011000E0 0x900435E0 37 3378 1032 0x011000F0 0x900449DF 37 3379 8 0x01100000 0x9004FFFF 37 3380 1032 0x01100000 0x900461DF 37 3381 1032 0x01100010 0x900475DF 37 3382 1032 0x01100020 0x900489DF 37 3383 8 0x01100030 0x9004FFFF 37 3384 1032 0x01100030 0x9004A1DF 37 3385 1032 0x01100040 0x9004B5DF 37 3386 1032 0x01100050 0x9004C9DF 37 3387 8 0x01100060 0x9004FFFF I cannot confirm this quirks with Windows driver. ALSA dice driver has a cause if assumed differences between these two drivers are ways of timestampling to RX packets from the drivers to the device. I've already reported timestamping quirk of Dice-based devices and this might bring this issue. [alsa-devel] Dice packet sequence quirk and ALSA firewire stack in Linux 4.6 http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107715.html Well, nevertheless, I enable ALSA dice driver to work at the frequencies. This may brings inconvenience to users but I expect developers and users to fix it. $ cd linux-firewire-utils/src $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 040423bb bus_info_length 4, crc_length 4, crc 9147 404 31333934 bus_name "1394" 408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255, max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400) 40c 00016604 company_id 000166 | 410 0c232c28 device_id 040c232c28 | EUI-64 000166040c232c28 root directory ----------------------------------------------------------------- 414 0006b6cb directory_length 6, crc 46795 418 03000166 vendor 41c 8100000a --> descriptor leaf at 444 420 17000030 model 424 8100000f --> descriptor leaf at 460 428 0c0087c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430 unit directory at 430 ----------------------------------------------------------------- 430 000476c2 directory_length 4, crc 30402 434 12000166 specifier id 438 13000001 version 43c 17000030 model 440 81000010 --> descriptor leaf at 480 descriptor leaf at 444 ----------------------------------------------------------------- 444 0006c490 leaf_length 6, crc 50320 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 54432045 "TC E" 454 6c656374 "lect" 458 726f6e69 "roni" 45c 63000000 "c" descriptor leaf at 460 ----------------------------------------------------------------- 460 000772b4 leaf_length 7, crc 29364 464 00000000 textual descriptor 468 00000000 minimal ASCII 46c 44696769 "Digi" 470 74616c4b "talK" 474 6f6e6e65 "onne" 478 6b747833 "ktx3" 47c 32000000 "2" descriptor leaf at 480 ----------------------------------------------------------------- 480 000772b4 leaf_length 7, crc 29364 484 00000000 textual descriptor 488 00000000 minimal ASCII 48c 44696769 "Digi" 490 74616c4b "talK" 494 6f6e6e65 "onne" 498 6b747833 "ktx3" 49c 32000000 "2" Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: dice: fix a bounds check in snd_dice_detect_tcelectronic_formats()Dan Carpenter1-2/+1
The "entry" pointer is always non-NULL so this test for out of bounds won't work. Fixes: f1f0f330b1d0 ("ALSA: dice: add parameters of stream formats for models produced by TC Electronic") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18Merge branch 'topic/timer-fixes' into for-nextTakashi Iwai2-28/+28
Pull the fixes for possible races in the resolution callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: dice: add stream format parameters for Mytek devicesMelvin Vermeeren4-1/+57
--nextPart3916812.EicPReet6m Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Mytek manufactures some equipment with DICE-based firewire ports. These devices contain old versions of DICE firmware which lacks detailed stream format reporting for all sampling clock modes. Building upon the recent work by Takashi Sakamoto, hard-coded parameters are added for the Stereo 192 DSD-DAC. When the device vendor and model match the coded parameters are copied into the stream format cache. Signed-off-by: Melvin Vermeeren <mail@mel.vin> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: timer: Assure timer resolution access always lockedTakashi Iwai1-8/+15
There are still many places calling the timer's hw.c_resolution callback without lock, and this may lead to some races, as we faced in the commit a820ccbe21e8 ("ALSA: pcm: Fix UAF at PCM release via PCM timer access"). This patch changes snd_timer_resolution() to take the timer->lock for avoiding the races. A place calling this function already inside the lock (from the notifier) is replaced with the snd_timer_hw_resolution() accordingly, as well as wrapping with the lock around another place calling snd_timer_hw_resolution(), too. Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: seq: Avoid open-code for getting timer resolutionTakashi Iwai1-3/+1
Instead of open-coding for getting the timer resolution, use the standard snd_timer_resolution() helper. The original code falls back to the callback function when the resolution is zero, but it must be always so when the callback function is defined. So this should be no functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: timer: Simplify timer hw resolution callsTakashi Iwai1-19/+14
There multiple open-codes to get the hardware timer resolution. Make a local helper function snd_timer_hw_resolution() and call it from all relevant places. There is no functional change by this, just a preliminary work for the following timer resolution hardening patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: timer: Fix pause event notificationBen Hutchings1-2/+2
Commit f65e0d299807 ("ALSA: timer: Call notifier in the same spinlock") combined the start/continue and stop/pause functions, and in doing so changed the event code for the pause case to SNDRV_TIMER_EVENT_CONTINUE. Change it back to SNDRV_TIMER_EVENT_PAUSE. Fixes: f65e0d299807 ("ALSA: timer: Call notifier in the same spinlock") Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-18ALSA: usb: stream: fix potential memory leak during uac3 interface parsingRuslan Bilovol1-1/+5
UAC3 channel map is created during interface parsing, and in some cases was not freed in failure paths. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-17ALSA: emu10k1: Rate-limit error messages about page errorsTakashi Iwai1-3/+3
The error messages at sanity checks of memory pages tend to repeat too many times once when it hits, and without the rate limit, it may flood and become unreadable. Replace such messages with the *_ratelimited() variant. Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1093027 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-17ALSA: emu10k1: fix spelling mistake: "Caputre" -> "Capture"Colin Ian King2-2/+2
Trivial fix to spelling mistakes in audigy_outs arrays. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-17ALSA: core: Assure control device to be registered at lastTakashi Iwai1-0/+9
The commit 289ca025ee1d ("ALSA: Use priority list for managing device list") changed the way to register/disconnect/free devices via a single priority list. This helped to make behavior consistent, but it also changed a slight behavior change: namely, the control device is registered earlier than others, while it was supposed to be the very last one. I've put SNDRV_DEV_CONTROL in the current position as the release of ctl elements often conflict with the private ctl elements some PCM or other components may create, which often leads to a double-free. But, the order of register and disconnect should be indeed fixed as expected in the early days: the control device gets registered at last, and disconnected at first. This patch changes the priority list order to move SNDRV_DEV_CONTROL as the last guy to assure the register / disconnect order. Meanwhile, for keeping the messy resource release order, manually treat the control and lowlevel devices as last freed one. Additional note: The lowlevel device is the device where a card driver creates at probe. And, we still keep the release order control -> lowlevel, as there might be link from a control element back to a lowlevel object. Fixes: 289ca025ee1d ("ALSA: Use priority list for managing device list") Reported-by: Tzung-Bi Shih <tzungbi@google.com> Tested-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: usb-audio: Apply rate limit to warning messages in URB complete callbackTakashi Iwai1-1/+1
retire_capture_urb() may print warning messages when the given URB doesn't align, and this may flood the system log easily. Put the rate limit to the message for avoiding it. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1093485 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: xen-front: Implement ALSA virtual sound driverOleksandr Andrushchenko6-3/+1056
Implement essential initialization of the sound driver: - introduce required data structures - handle driver registration - handle sound card registration - register sound driver on backend connection - remove sound driver on backend disconnect Initialize virtual sound card with streams according to the Xen store configuration. Implement ALSA driver operations including: - manage frontend/backend shared buffers - manage Xen bus event channel states Implement requests from front to back for ALSA PCM operations. - report ALSA period elapsed event: handle XENSND_EVT_CUR_POS notifications from the backend when stream position advances during playback/capture. The event carries a value of how many octets were played/captured at the time of the event. - implement explicit stream parameter negotiation between backend and frontend: handle XENSND_OP_HW_PARAM_QUERY request to read/update configuration space for the parameter given: request passes desired parameter interval and the response to this request returns min/max interval for the parameter to be used. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: xen-front: Implement handling of shared buffersOleksandr Andrushchenko4-1/+240
Implement shared buffer handling according to the para-virtualized sound device protocol at xen/interface/io/sndif.h: - manage buffer memory - handle granted references - handle page directories [ Fixed missing linux/kernel.h inclusion -- tiwai ] Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: xen-front: Implement Xen event channel handlingOleksandr Andrushchenko5-2/+604
Handle Xen event channels: - create for all configured streams and publish corresponding ring references and event channels in Xen store, so backend can connect - implement event channels interrupt handlers - create and destroy event channels with respect to Xen bus state Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: xen-front: Read sound driver configuration from Xen storeOleksandr Andrushchenko5-1/+576
Read configuration values from Xen store according to xen/interface/io/sndif.h protocol: - introduce configuration structures for different components, e.g. sound card, device, stream - read PCM HW parameters, e.g rate, format etc. - detect stream type (capture/playback) - read device and card parameters Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-16ALSA: xen-front: Introduce Xen para-virtualized sound frontend driverOleksandr Andrushchenko6-1/+232
Introduce skeleton of the para-virtualized Xen sound frontend driver. Initial handling for Xen bus states: implement Xen bus state machine for the frontend driver according to the state diagram and recovery flow from sound para-virtualized protocol: xen/interface/io/sndif.h. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify parameter table for effectsTakashi Sakamoto1-7/+7
This module has a table for parameters of each effects. This table is read-only and can have 'const' qualifier. This commit adds this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: merge strings just for printkTakashi Sakamoto1-4/+2
This module has some function-local strings just for printk therefore it can be merged into format string. This commit applies this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify read-only members of string arrayTakashi Sakamoto1-3/+3
This module has some strings just for printk therefore they can be read-only. This commit applies this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify templates for control element setTakashi Sakamoto1-4/+4
An array of templates for control element set is passed as an argument for snd_hda_add_new_ctls(). This argument has 'const' qualifier therefore the passed array can have the qualifier. This commit adds this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: usb-audio: UAC3: Parse Input Terminal number of channels.Jorge Sanjuan1-2/+6
Obtain the number of channels for the Input Terminal from the Logical Cluster Descriptor. This achieves a useful minimal parsing of this unit so it can be used in other units in the topology. Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Tested-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: usb-audio: UAC3 Add support for connector insertion.Jorge Sanjuan1-14/+94
This adds support for the UAC3 insertion controls. The status is reported as a boolean value in the same way it used to do for UAC2. Hence, the presence of any connector in the response will make the control saying the jack is connected. The UAC2 support for this control has been moved to a dedicated control for connectors as both UAC2 and UAC3 follow a specific Control Request Parameter Block for this control. This parameter block for UAC3 could not be read in the same simplistic manner as in UAC2. This implementation is not requesting additional information from the HIGH CAPABILITY Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Tested-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: usb-audio: UAC3. Add support for mixer unit.Jorge Sanjuan1-7/+81
This adds support for the MIXER UNIT in UAC3. All the information is obtained from the (HIGH CAPABILITY) Cluster's header. We don't read the rest of the logical cluster to obtain the channel config as that wont make any difference in the current mixer behaviour. The name of the mixer unit is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Tested-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15Merge branch 'for-linus' into for-nextTakashi Iwai10-11/+44
Back-merge of UAC3 fixes for applying further enhancements. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: usb-audio: Use Class Specific EP for UAC3 devices.Jorge Sanjuan1-1/+8
bmAtributes offset doesn't exist in the UAC3 CS_EP descriptor. Hence, checking for pitch control as if it was UAC2 doesn't make any sense. Use the defined UAC3 offsets instead. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: hda/ca0132: fix array_size.cocci warningsFengguang Wu1-4/+2
sound/pci/hda/patch_ca0132.c:5062:50-51: WARNING: Use ARRAY_SIZE sound/pci/hda/patch_ca0132.c:5092:50-51: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci Fixes: 47cdf76e44e8 ("ALSA: hda/ca0132: Add new control changes for SBZ + R3Di") CC: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: isight: use position offset macro of TLV dataTakashi Sakamoto1-4/+6
A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: hda: use position offset macro of TLV dataTakashi Sakamoto2-12/+12
A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: vmaster: use position offset macro of TLV dataTakashi Sakamoto1-7/+9
A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/realtek - Clevo P950ER ALC1220 FixupJeremy Soller1-0/+1
This adds support for the P950ER, which has the same required fixup as the P950HR, but has a different PCI ID. Signed-off-by: Jeremy Soller <jeremy@system76.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: usb: mixer: volume quirk for CM102-A+/102S+Federico Cuello1-0/+8
Currently it's not possible to set volume lower than 26% (it just mutes). Also fixes this warning: Warning! Unlikely big volume range (=9472), cval->res is probably wrong. [13] FU [PCM Playback Volume] ch = 2, val = -9473/-1/1 , and volume works fine for full range. Signed-off-by: Federico Cuello <fedux@fedux.com.ar> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda: Add Lenovo C50 All in one to the power_save blacklistHans de Goede1-0/+2
Power-saving is causing loud plops on the Lenovo C50 All in one, add it to the blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1572975 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: usb-audio: add boot quirk for Axe-Fx IIIAlberto Aguirre1-0/+32
Wait for Axe-Fx III to fully bootup before initializing card. Signed-off-by: Alberto Aguirre <albaguirre@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add new control changes for SBZ + R3DiConnor McAdams1-10/+748
This patch adds new controls to set the effect levels on the R3Di and SBZ. It also adds vmaster controls to control all surround sound channels. So that Surround effect switch doesn't conflict with Surround volume, FX: prefix added to all effect related switches. Tested-by: Mariusz Ceier <mceier+kernel@gmail.com> Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add ca0132_alt_set_vipsourceConnor McAdams1-1/+73
Add function to set vipsource on cards that use_alt_controls. Different sequence. Also, add cvoice_switch_set at end of ca0132_select_in so that when switching between inputs cvoice state is maintained. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add DSP Volume set and New mixers for SBZ + R3DiConnor McAdams1-1/+202
Adds lookup table for floating point decibel volume, and new functions to allow for setting the decibel level on the DSP. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZConnor McAdams1-18/+607
Add functions ca0132_alt_select_out and ca0132_alt_select_in for switching outputs and inputs for r3di and sbz. Also, add enumerated controls for selecting output and input source. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add the ability to set src_id on scp commandsConnor McAdams1-12/+74
This patch adds the ability to change the src_id on scp commands, which is used in the dsp setup of the Recon3Di and the Sound Blaster Z. It also makes sure to maintain backwards compatibility with the older dspio_set_uint_param function, and sets it's src to the default 0x20. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>