aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
AgeCommit message (Collapse)AuthorFilesLines
9 daysALSA: pci: Use *-y instead of *-objs in MakefileTakashi Iwai1-3/+3
*-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20240507135513.14919-3-tiwai@suse.de
2023-07-21ALSA: ice1712: Use the standard snd_ctl_add_followers() helperTakashi Iwai2-28/+6
Instead of open-code, use the new standard helper to manage vmaster stuff for code simplification. Also, handle the errors from the helper more properly instead of silently ignoring. The code changes the call order of snd_ctl_add() of the vmaster object and its followers for avoiding the possible memory leaks at error path. But there should be no difference in the functionality. Link: https://lore.kernel.org/r/20230721071643.3631-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-21ALSA: ice1712: Simplify with snd_ctl_find_id_mixer()Takashi Iwai4-38/+13
Replace an open code with the new snd_ctl_find_id_mixer(). There is no functional change. Also, add the missing NULL checks in psc724_set_jack_state() to deal with error cases. Link: https://lore.kernel.org/r/20230720082108.31346-7-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06ALSA: ice1712,ice1724: fix the kcontrol->id initializationJaroslav Kysela3-14/+23
The new xarray lookup code requires to know complete kcontrol->id before snd_ctl_add() call. Reorder the code to make the initialization properly. Cc: stable@kernel.org # v5.19+ Reported-by: Martin Zidek <zidek@master.cz> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20230606073122.597491-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-03-03ALSA: ice1712: Delete unreachable code in aureon_add_controls()Dmitry Fomin1-4/+0
If the check (id != 0x41) fails, then id == 0x41 and the other check in 'else' branch also fails: id & 0x0F = 0b01000001 & 0b00001111 = 0b00000001. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dmitry Fomin <fomindmitriyfoma@mail.ru> Link: https://lore.kernel.org/r/20230225184322.6286-2-fomindmitriyfoma@mail.ru Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-03-03ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()Dmitry Fomin1-1/+1
If snd_ctl_add() fails in aureon_add_controls(), it immediately returns and leaves ice->gpio_mutex locked. ice->gpio_mutex locks in snd_ice1712_save_gpio_status and unlocks in snd_ice1712_restore_gpio_status(ice). It seems that the mutex is required only for aureon_cs8415_get(), so snd_ice1712_restore_gpio_status(ice) can be placed just after that. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dmitry Fomin <fomindmitriyfoma@mail.ru> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230225184322.6286-1-fomindmitriyfoma@mail.ru Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-08-05ALSA: ice1712: remove redundant assignment to newColin Ian King1-1/+1
The variable new is initialized with a value but it is never read. It is being re-assigned a new value in every case path in the following switch statement. The assignment is redundant and can be removed. Cleans up clang scan build warning: sound/pci/ice1712/quartet.c:569:8: warning: Although the value stored to 'new' is used in the enclosing expression, the value is never actually read from 'new' [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220805120439.2341600-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-12ALSA: ice1724: Fix the missing snd_card_free() call at probe errorTakashi Iwai1-2/+8
The previous cleanup with devres may lead to the incorrect release orders at the probe error handling due to the devres's nature. Until we register the card, snd_card_free() has to be called at first for releasing the stuff properly when the driver tries to manage and release the stuff via card->private_free(). This patch fixes it by calling snd_card_free() on the error from the probe callback using a new helper function. Fixes: 314f6dbb1f33 ("ALSA: ice1724: Allocate resources with device-managed APIs") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220412102636.16000-18-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-19ALSA: ice1724: Allocate resources with device-managed APIsTakashi Iwai1-1/+1
This patch converts the resource management in PCI ice1724 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. Along with it, the chip_exit callback chain is moved into the card's private_free instead of the PCI remove callback, too. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-39-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-19ALSA: ice1724: Allocate resources with device-managed APIsTakashi Iwai1-100/+27
This patch converts the resource management in PCI ice1724 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. Along with it, the chip_exit callback chain is moved into the card's private_free instead of the PCI remove callback, too. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-37-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-19ALSA: ice1712: Allocate resources with device-managed APIsTakashi Iwai1-103/+30
This patch converts the resource management in PCI ice1712 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. Along with it, the chip_exit callback chain is moved into the card's private_free instead of the PCI remove callback, too. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-36-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-12ALSA: ice1724: Remove superfluous loop over model tableTakashi Iwai1-28/+14
The ice1724 driver looks for the matching card_info entry twice, once at reading EEPROM and another for the rest tasks in the probe call. Reduce the second one by referring to the already assigned card_info entry. Link: https://lore.kernel.org/r/20210712091904.28022-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-09ALSA: ice1712: Fix assignment in if conditionTakashi Iwai2-10/+20
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>
2021-03-17module: remove never implemented MODULE_SUPPORTED_DEVICELeon Romanovsky2-25/+0
MODULE_SUPPORTED_DEVICE was added in pre-git era and never was implemented. We can safely remove it, because the kernel has grown to have many more reliable mechanisms to determine if device is supported or not. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-01-15ALSA: pci: Simplify with dma_set_mask_and_coherent()Takashi Iwai1-2/+1
Many PCI drivers still have two explicit calls of dma_set_mask() and dma_set_coherent_mask(). Let's simplify with dma_set_mask_and_coherent(). Link: https://lore.kernel.org/r/20210114125412.993-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-01-08ALSA: Convert strlcpy to strscpy when return value is unusedJoe Perches4-5/+5
strlcpy is deprecated. see: Documentation/process/deprecated.rst Change the calls that do not use the strlcpy return value to the preferred strscpy. Done with cocci script: @@ expression e1, e2, e3; @@ - strlcpy( + strscpy( e1, e2, e3); This cocci script leaves the instances where the return value is used unchanged. After this patch, sound/ has 3 uses of strlcpy() that need to be manually inspected for conversion and changed one day. $ git grep -w strlcpy sound/ sound/usb/card.c: len = strlcpy(card->longname, s, sizeof(card->longname)); sound/usb/mixer.c: return strlcpy(buf, p->name, buflen); sound/usb/mixer.c: return strlcpy(buf, p->names[index], buflen); Miscellenea: o Remove trailing whitespace in conversion of sound/core/hwdep.c Link: https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-06ALSA: pci: delete repeated words in commentsRandy Dunlap1-1/+1
Drop duplicated words in sound/pci/. {and, the, at} Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20200806021926.32418-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-20ALSA: Replace the word "slave" in vmaster APITakashi Iwai2-17/+17
Follow the recent inclusive terminology guidelines and replace the word "slave" in vmaster API. I chose the word "follower" at this time since it seems fitting for the purpose. Note that the word "master" is kept in API, since it refers rather to audio master volume control. Also, while we're at it, a typo in comments is corrected, too. Link: https://lore.kernel.org/r/20200717154517.27599-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: Use fallthrough pseudo-keywordGustavo A. R. Silva1-1/+1
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-05-18ALSA: iec1712: Initialize STDSP24 properly when using the model=staudio optionScott Bahling1-1/+2
The ST Audio ADCIII is an STDSP24 card plus extension box. With commit e8a91ae18bdc ("ALSA: ice1712: Add support for STAudio ADCIII") we enabled the ADCIII ports using the model=staudio option but forgot this part to ensure the STDSP24 card is initialized properly. Fixes: e8a91ae18bdc ("ALSA: ice1712: Add support for STAudio ADCIII") Signed-off-by: Scott Bahling <sbahling@suse.com> Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1048934 Link: https://lore.kernel.org/r/20200518175728.28766-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-07ALSA: ice1724: Fix invalid access for enumerated ctl itemsTakashi Iwai1-2/+2
The access to Analog Capture Source control value implemented in prodigy_hifi.c is wrong, as caught by the recently introduced sanity check; it should be accessing value.enumerated.item[] instead of value.integer.value[]. This patch corrects the wrong access pattern. Fixes: 6b8d6e5518e2 ("[ALSA] ICE1724: Added support for Audiotrak Prodigy 7.1 HiFi & HD2, Hercules Fortissimo IV") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207139 Reviewed-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200407084402.25589-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05ALSA: ice1712: More constificationsTakashi Iwai12-38/+38
Apply const prefix to each possible place: the EEPROM tables, the static string arrays, the init verb tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-17-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05Merge branch 'for-linus' into for-nextTakashi Iwai1-3/+6
Merge 5.5-rc devel branch back for applying the conflicting USB-audio fix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: ice1712: Constify wm-specific tablesTakashi Iwai2-2/+2
The tables defined in wm8766.c and wm8776.c are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-50-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: ice17xx: Constify snd_ice1712_card_infoTakashi Iwai3-10/+10
The snd_ice1712_card_info objects are referred only as read-only. Let's make them const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-49-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: pci: Constify snd_kcontrol_new itemsTakashi Iwai12-25/+25
Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: pci: Constify snd_ac97_bus_ops definitionsTakashi Iwai2-3/+3
Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-28-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: pci: Constify snd_device_ops definitionsTakashi Iwai2-2/+2
Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-29ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support codeTakashi Iwai1-3/+6
Jia-Ju Bai reported a possible sleep-in-atomic scenario in the ice1724 driver with Infrasonic Quartet support code: namely, ice->set_rate callback gets called inside ice->reg_lock spinlock, while the callback in quartet.c holds ice->gpio_mutex. This patch fixes the invalid call: it simply moves the calls of ice->set_rate and ice->set_mclk callbacks outside the spinlock. Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/5d43135e-73b9-a46a-2155-9e91d0dcdf83@gmail.com Link: https://lore.kernel.org/r/20191218192606.12866-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1724: Support PCM sync_stopTakashi Iwai1-1/+1
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-24-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1712: Support PCM sync_stopTakashi Iwai1-1/+1
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-23-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: pci: Drop superfluous ioctl PCM opsTakashi Iwai2-10/+0
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-16-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1724: Use managed buffer allocationTakashi Iwai1-16/+9
Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-43-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: ice1712: Use managed buffer allocationTakashi Iwai1-34/+8
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-42-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-06ALSA: pci: Avoid non-standard macro usageTakashi Iwai2-6/+9
Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-06-14Merge tag 'sound-5.2-rc5' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It might feel like deja vu to receive a bulk of changes at rc5, and it happens again; we've got a collection of fixes for ASoC. Most of fixes are targeted for the newly merged SOF (Sound Open Firmware) stuff and the relevant fixes for Intel platforms. Other than that, there are a few regression fixes for the recent ASoC core changes and HD-audio quirk, as well as a couple of FireWire fixes and for other ASoC codecs" * tag 'sound-5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (54 commits) Revert "ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops" ALSA: ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire) ALSA: oxfw: allow PCM capture for Stanton SCS.1m ALSA: firewire-motu: fix destruction of data for isochronous resources ASoC: Intel: sst: fix kmalloc call with wrong flags ASoC: core: Fix deadlock in snd_soc_instantiate_card() SoC: rt274: Fix internal jack assignment in set_jack callback ALSA: hdac: fix memory release for SST and SOF drivers ASoC: SOF: Intel: hda: use the defined ppcap functions ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override ASoC: Intel: bytcht_es8316: fix kernel oops with platform_name override ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override ASoC: sun4i-i2s: Add offset to RX channel select ASoC: sun4i-i2s: Fix sun8i tx channel offset mask ASoC: max98090: remove 24-bit format support if RJ is 0 ASoC: da7219: Fix build error without CONFIG_I2C ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error ASoC: SOF: fix DSP oops definitions in FW ABI ...
2019-06-11ALSA: ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire)Rui Nuno Capela1-1/+1
Check for exact and correct return value to snd_i2c_sendbytes call for EWS/DMX 6Fire (snd_ice1712). Fixes a systemic error on every boot starting from kernel 5.1 onwards to snd_ice1712 driver ("cannot send pca") on Terratec EWS/DMX 6Fire PCI soundcards. Check for exact and correct return value to snd_i2c_sendbytes call for EWS/DMX 6Fire (snd_ice1712). Fixes a systemic error on every boot to snd_ice1712 driver ("cannot send pca") on Terratec EWS/DMX 6Fire PCI soundcards. Fixes: c99776cc4018 ("ALSA: ice1712: fix a missing check of snd_i2c_sendbytes") Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner36-542/+36
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06ALSA: pci: Clean up with new procfs helpersTakashi Iwai6-29/+10
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functional changes. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-18Merge branch 'topic/pcm-device-suspend' into for-nextTakashi Iwai2-6/+0
Pull the PCM suspend improvement / cleanup. This moves the most of snd_pcm_suspend*() calls into PCM's own device PM ops. There should be no change from the functionality POV. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-15ALSA: pci: Remove superfluous snd_pcm_suspend*() callsTakashi Iwai2-6/+0
The call of snd_pcm_suspend_all() & co became superfluous since we call it in the PCM PM ops. Let's remove them. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-07ALSA: ice1712: fix a missing check of snd_i2c_sendbytesAditya Pakki1-1/+6
snd_i2c_sendbytes could fail. The fix checks its return value: if it fails, issues an error message and returns with its error code. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-03ALSA: pci: Remove empty init and exitTakashi Iwai1-12/+0
For a sake of code simplification, remove the init and the exit entries that do nothing. Notes for readers: actually it's OK to remove *both* init and exit, but not OK to remove the exit entry. By removing only the exit while keeping init, the module becomes permanently loaded; i.e. you cannot unload it any longer! Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-18ALSA: ice1724: remove unused arrayStefan Agner1-20/+1
This fixes a warning seen with clang: sound/pci/ice1712/prodigy_hifi.c:321:28: warning: variable 'wm_vol' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const unsigned char wm_vol[256] = { ^ Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-28sound: Use octal not symbolic permissionsJoe Perches2-2/+2
Convert the S_<FOO> symbolic permissions to their octal equivalents as using octal and not symbolic permissions is preferred by many as more readable. see: https://lkml.org/lkml/2016/8/2/1945 Done with automated conversion via: $ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...> Miscellanea: o Wrapped one multi-line call to a single line Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-01ALSA: ice1712: replace strcpy() with strlcpy()Joey Pabalinas2-8/+8
Replace unsafe usages of strcpy() to copy the name argument into the sid.name buffer with strlcpy() to guard against possible buffer overflows. Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-29ALSA: ice1724: Fix resume issues with Prodigy 7.1 HiFiYussuf Khalil1-29/+102
There are two issues after resuming from suspend on the Audiotrak Prodigy 7.1 HiFi: - the output volume is set to 100% - microphone input isn't working anymore This patch fixes these issues by reinitializing both codecs of the device and restoring the previous volumes during resume. Signed-off-by: Yussuf Khalil <dev@pp3345.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-13Merge tag 'asoc-v4.15' of ↵Takashi Iwai9-0/+9
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.15 The biggest thing this release has been the conversion of the AC98 bus to the driver model, that's been a long time coming so thanks to Robert Jarzmik for his dedication there. Due to there being some AC97 MFD there's a few fairly large changes in input and the MFD layer, mainly to the wm97xx driver. There's also some drivers/drm changes to support the new AMD Stoney platform, these are shared with the DRM subsystem and should be being merged via both. Within the subsystem the overwhelming bulk of the changes is in the Intel drivers which continue to need lots of cleanups and fixes, this release they've also gained support for their open source firmware. There's also some large changs in the core as Morimoto-san continues to mirror operations into the component level in preparation for conversion of drivers to that. - The AC97 bus has finally caught up with the driver model thanks to some dedicated and persistent work from Robert Jarzmik. - Continued work from Morimoto-san on moving us towards being able to use components for everything. - Lots of cleanups for the Intel platform code, including support for their open source audio firmware. - Support for scaling MCLK with sample rate in simple-card. - Support for AMD Stoney platform.
2017-11-06ALSA: ice1712: define i2c eeprom addr to header fileKonstantinos Tsimpoukas2-2/+3
Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman9-0/+9
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22ALSA: ice1712: Add support for STAudio ADCIIITakashi Iwai2-5/+35
STAudio ADCIII has the same SSID as Hoontech STDSP24, but requires a slightly different configuration. This patch allows user to choose this model via model=staudio option to set the proper configuration for the board. Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1048934 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-06ALSA: ice1712: add const to snd_akm4xxx structuresBhumika Goyal7-18/+18
Declare snd_akm4xxx structures as const as they are only passed to the function snd_ice1712_akm4xxx_init. This argument is of type const, so make the structures const. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_akm4xxx s@p={...}; @good1@ identifier match.s; position p; @@ snd_ice1712_akm4xxx_init(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_akm4xxx s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-06ALSA: ice1712: add const to snd_ak4xxx_private structuresBhumika Goyal5-16/+16
Declare snd_ak4xxx_private structures as const as they are only passed to the function snd_ice1712_akm4xxx_init. This argument is of type const, so make the structures const. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_ak4xxx_private s@p={...}; @good1@ identifier match.s; position p; @@ snd_ice1712_akm4xxx_init(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_ak4xxx_private s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-09ALSA: ice1724: Constify hw_constraintsTakashi Iwai4-12/+12
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-09ALSA: ice1712: Constify hw_constraintsTakashi Iwai2-3/+3
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-21ALSA: ice1712: constify snd_kcontrol_new structuresBhumika Goyal2-4/+4
Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-03-20Merge branch 'topic/for-4.12' into for-nextTakashi Iwai4-28/+28
2017-02-27scripts/spelling.txt: add "an union" pattern and fix typo instancesMasahiro Yamada2-2/+2
Fix typos and add the following to the scripts/spelling.txt: an union||a union Link: http://lkml.kernel.org/r/1481573103-11329-5-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-21ALSA: pci: constify snd_kcontrol_new structuresBhumika Goyal4-28/+28
Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having the same property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_kcontrol_new i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ snd_ctl_new1(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_kcontrol_new i; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-01-12ALSA: pci: Constify snd_rawmidi_opsTakashi Iwai1-2/+2
Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-07ALSA: squash lines for simple wrapper functionsMasahiro Yamada1-3/+1
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-02ALSA: constify snd_pcm_ops structuresJulia Lawall2-10/+10
Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-11-30ALSA: i2c: constify snd_i2c_ops structuresJulia Lawall1-1/+1
The snd_i2c_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-29ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FSTakashi Iwai1-6/+1
The compiler can optimize the unused code away, so we can drop ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: remove deprecated use of pci apiQuentin Lambert1-2/+2
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Add sampling rate control of the ADC/DACClément Guedez1-0/+107
Add sampling rate control for ADC/DAC for ESI W192M. Allow to switch between 48K/96K/192K sampling rate. All DAC need to be mute when changing samplerate. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Add text Line in/Mic for selecting input gain stateClément Guedez1-4/+10
Add text Line in/Mic for selecting input gain state in mixer for ESI W192M. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Add TLV support for control value in dB scaleClément Guedez1-2/+18
Add TLV support to control volume using dB scale for input and ouput on ESI W192M. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Enable midi i/o of port envy24 chip as availableClément Guedez1-1/+2
Enable midi i/o port of envy24 chip as their are available on ESI W192M soundcard. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Update eeprom structure to C99 standardClément Guedez1-13/+13
Update eeprom structure to C99 standard to be compliant with change in alsa. It's just a notation change, no configuration change. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18ALSA: ice1724: ESI W192M: Correct copy/paste from prodigy driverClément Guedez1-2/+2
Correct copy/paste name from prodigy driver, no behaviour change, only name. Signed-off-by: Clément Guedez <klem.dev@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28Merge branch 'topic/ak411x-fix' into for-nextTakashi Iwai1-1/+3
2015-01-28ALSA: ak411x: Add PM helper functionsTakashi Iwai1-1/+3
Define snd_ak4114_suspend() and snd_ak4114_resume() functions to handle PM properly, stopping and restarting the work at PM. Currently only ice1712/juli.c deals with the PM and ak4114, so fix the calls there appropriately. The same PM functions are defined in ak4113.c, too, although they aren't currently called yet (ice1712/quartet.c may be enhanced to support PM later). Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai1-1/+1
Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-11ALSA: ice1712: wm8766: Remove some unused functionsRickard Strandqvist2-18/+0
Removes some functions that are not used anywhere: snd_wm8766_set_power() snd_wm8766_set_master_mode() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-11Merge branch 'topic/pci-cleanup' into for-nextTakashi Iwai2-32/+0
2015-01-09ALSA: ice1724: Simplify PM callbacksTakashi Iwai1-16/+0
This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801: PCI core handles power state for us]. Since pci_set_power_state(), pci_save_state() and pci_restore_state() are already done in the PCI core side, so we don't need to it doubly. Also, pci_enable_device(), pci_disable_device() and pci_set_master() calls in PM callbacks are superfluous nowadays, too, so get rid of them as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-09ALSA: ice1712: Simplify PM callbacksTakashi Iwai1-16/+0
This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801: PCI core handles power state for us]. Since pci_set_power_state(), pci_save_state() and pci_restore_state() are already done in the PCI core side, so we don't need to it doubly. Also, pci_enable_device(), pci_disable_device() and pci_set_master() calls in PM callbacks are superfluous nowadays, too, so get rid of them as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ice1712: Remove always NULL parametersLars-Peter Clausen1-20/+6
The various PCM allocation functions in this driver take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: ice1712: wm8776.c: Remove some unused functionsRickard Strandqvist2-18/+0
Removes some functions that are not used anywhere: snd_wm8776_set_master_mode() snd_wm8776_set_adc_if() snd_wm8776_set_dac_if() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17ALSA: ice17xx: Deletion of unnecessary checks before the function call ↵Markus Elfring2-4/+2
"snd_ac97_resume" The snd_ac97_resume() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14ALSA: ice1712: consider error valueSudip Mukherjee1-1/+3
earlier we were ignoring the return value of snd_ak4114_create and always returning 0. now we are returning the actual status. revo_init is calling this function, and revo_init is checking the return value. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14ALSA: ice1712: remove unused variableSudip Mukherjee1-2/+1
buf_size was initialized with snd_pcm_lib_buffer_bytes, but never used. and so it is safe to be deleted. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14ALSA: ice1712: remove unneeded return statementSudip Mukherjee6-34/+12
the functions: snd_ice1712_akm4xxx_build_controls snd_ice1712_build_pro_mixer snd_ctl_add snd_ak4114_build prodigy192_ak4114_init snd_ak4113_build are all returning either 0 or a negetive error value. so we can easily remove the check for a negative value and return the value instead. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: ice1724: Use snd_ctl_enum_info()Takashi Iwai9-137/+22
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: ice1712: Use snd_ctl_enum_info()Takashi Iwai2-37/+6
... and reduce the open codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-27ALSA: ice1712: Replacing hex with #definesKonstantinos Tsimpoukas1-1/+1
Adds to the readability of the ice1712 driver. Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2-2/+2
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-07-04ALSA: ice1712: Correcting/completing #defines for REGSKonstantinos Tsimpoukas1-6/+9
This small patch completes #defines for Control/Status Register, adds comments for the missing ones there and on the Interrupt Mask Register and additionally corrects "#define ICE1712_SERR_LEVEL 0x04 -> 0x08", according to documentation. Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-08ALSA: ice1712: Fix boundary checks in PCM pointer opsTakashi Iwai1-5/+10
PCM pointer callbacks in ice1712 driver check the buffer size boundary wrongly between bytes and frames. This leads to PCM core warnings like: snd_pcm_update_hw_ptr0: 105 callbacks suppressed ALSA pcm_lib.c:352 BUG: pcmC3D0c:0, pos = 5461, buffer size = 5461, period size = 2730 This patch fixes these checks to be placed after the proper unit conversions. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-04ALSA: ice1712: Save/restore routing and rate registersOndrej Zary1-0/+32
Save/restore routing and rate registers during suspend/resume. This fixes S/PDIF input being disabled after resume. Tested with Audiophile 24/96. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-04ALSA: ice1712: restore AK4xxx volumes on resumeOndrej Zary1-3/+6
Also restore AK4xxx mixer volumes on resume for M-Audio ICE1712-based cards. This fixes incorrect (sound working) zero mixer volumes after resume. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-03ALSA: ice1712: Add S/PDIF suspend support for ICE1712-based M-Audio cardsOndrej Zary1-0/+22
Add S/PDIF suspend support for M-Audio cards based on ICE1712 chip. Tested (playback only) on Audiophile 24/96. Capture will probably not work. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-31ALSA: ice1712: Add suspend support for M-Audio ICE1712-based cardsOndrej Zary1-1/+29
Add suspend support for M-Audio cards based on ICE1712 chip. Tested with M-Audio Audiophile 24/96. S/PDIF will probably not work. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-31ALSA: ice1712: add suspend support for ICE1712 chipOndrej Zary1-8/+77
Add suspend/resume support for ICE1712 chip. Card-specific subdrivers need to enable it and provide callbacks that suspend/resume the codecs. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26ALSA: ice17xx: Use standard printk helpersTakashi Iwai8-59/+76
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12ALSA: pci: Convert to snd_card_new() with a device pointerTakashi Iwai2-6/+4
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07ALSA: ice1724: Fix compile warning with CONFIG_PROC_FS=nTakashi Iwai1-0/+2
Just added a missing ifdef: sound/pci/ice1712/quartet.c:210:14: warning: 'get_binary' defined but not used [-Wunused-function] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29ALSA: ice1724: Fix uninitialized variable accessTakashi Iwai2-2/+4
Spotted by coverity CIDs 751505 and 751506. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29ALSA: Use strlcpy() instead of strncpy()Takashi Iwai2-3/+3
We tend to make stupid mistakes with strncpy(). Let's take a safer one, strlcpy(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-29ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at removeTakashi Iwai2-2/+0
As drvdata is cleared to NULL at probe failure or at removal by the driver core, we don't have to call pci_set_drvdata(pci, NULL) any longer in each driver. The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in hda_intel.c. Since this function itself releases the card instance, we need to clear drvdata here as well, so that it won't be released doubly in the remove callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: ice1712: Initialize card->private_data properlySean Connor1-0/+2
Set card->private_data in snd_ice1712_create for fixing NULL dereference in snd_ice1712_remove(). Signed-off-by: Sean Connor <sconnor004@allyinics.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-25ALSA: ice1724: M-Audio Audiophile192: Fix SPDIF inputJonas Petersen1-13/+24
This patch fixes initialization of the AK4114 chip so spdif capture is working properly. Worked out together with Pavel Hofman. Signed-off-by: Jonas Petersen <jnsptrsn1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: ice1712: fix boundary check in snd_wm8766_write()Dan Carpenter1-1/+1
The wm->regs[] array has WM8766_REG_COUNT (16) elements not WM8766_REG_RESET (31). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-13Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial branch from Jiri Kosina: "Usual stuff -- comment/printk typo fixes, documentation updates, dead code elimination." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) HOWTO: fix double words typo x86 mtrr: fix comment typo in mtrr_bp_init propagate name change to comments in kernel source doc: Update the name of profiling based on sysfs treewide: Fix typos in various drivers treewide: Fix typos in various Kconfig wireless: mwifiex: Fix typo in wireless/mwifiex driver messages: i2o: Fix typo in messages/i2o scripts/kernel-doc: check that non-void fcts describe their return value Kernel-doc: Convention: Use a "Return" section to describe return values radeon: Fix typo and copy/paste error in comments doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c various: Fix spelling of "asynchronous" in comments. Fix misspellings of "whether" in comments. eisa: Fix spelling of "asynchronous". various: Fix spelling of "registered" in comments. doc: fix quite a few typos within Documentation target: iscsi: fix comment typos in target/iscsi drivers treewide: fix typo of "suport" in various comments and Kconfig treewide: fix typo of "suppport" in various comments ...
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton19-245/+245
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19treewide: fix typo of "suport" in various comments and KconfigMasanari Iida1-1/+1
Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-11-12ALSA: ice1724: Fix build error without CONFIG_PM_SLEEPTakashi Iwai1-0/+2
Bah, forgot this again... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-12ALSA: ice1724: enable suspend on unknown ICE1724 cardsOndrej Zary1-0/+2
Assume that unknown ICE1724-based cards are AC97-only that can suspend without any additional card-specific code. This fixes suspend on Gainward Hollywood@Home 7.1. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+6
2012-10-31ALSA: ice1724: Fix rate setup after resumeTakashi Iwai1-1/+6
The rate isn't restored properly after resume since it's only set up in hw_params, and not in prepare callback. For fixing it, put the corresponding call to resume callback as well. Reported-and-tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-23ALSA: ice1712: Fix build errorsRandy Dunlap1-2/+2
Fix build errors by using correct kconfig symbol name: sound/pci/ice1712/psc724.c:417:5: error: 'struct snd_ice1712' has no member named 'pm_resume' sound/pci/ice1712/psc724.c:418:5: error: 'struct snd_ice1712' has no member named 'pm_suspend_enabled' [Fixed another #ifdef CONFIG_PM in the same file, too, by tiwai] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-18ALSA: ice17xx: Fix inclusion of linux/io.hTakashi Iwai19-18/+1
Include linux/io.h in ice1712.h since inb() and outb() are used in inline functions there. Remove the redundant inclusion of that file in other places at the same time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: ice17xx: Constify strings and string arraysTakashi Iwai14-50/+54
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: ice1712: Add Philips PSC724 Ultimate EdgeOndrej Zary4-2/+481
Add psc724 subdriver to snd-ice1712 that provides full support for Philips PSC724 Ultimate Edge sound cards. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: ice1712: Add Wolfson Microelectronics WM8776 codec supportOndrej Zary2-0/+858
Needed by Philips PSC724 subdriver. The code does not contain any card-specific bits so other ice17xx cards using this codec could be converted to use this generic code. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: ice1712: Add Wolfson Microelectronics WM8766 codec supportOndrej Zary2-0/+524
Needed by Philips PSC724 subdriver. The code does not contain any card-specific bits so other ice17xx cards using this codec could be converted to use this generic code. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: ice1712: add chip_exit callbackOndrej Zary3-2/+17
Add chip_exit callback to allow card subdrivers to do cleanup work on module removal. Needed by Philips PSC724 subdriver to cancel delayed work. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-22Merge tag 'asoc-3.7' of ↵Takashi Iwai1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.7 Lots and lots of driver specific cleanups and enhancements but the only substantial framework feature this time round is the compressed API binding: - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for CODEC drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010.
2012-09-12ALSA: ice1724: Use linear scale for AK4396 volume control.Matteo Frigo1-1/+2
The AK4396 DAC has a linear-scale attentuator, but sound/pci/ice1712/prodigy_hifi.c used a log scale instead, which is not quite right. This patch restores the correct scale, borrowing from the ak4396 code in sound/pci/oxygen/oxygen.c. Signed-off-by: Matteo Frigo <athena@fftw.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEPTakashi Iwai5-9/+9
Otherwise we may get compile warnings due to unused functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03ALSA: Convert to new pm_ops for PCI driversTakashi Iwai1-10/+16
Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24ALSA: pci: clean up using module_pci_driver()Takashi Iwai2-26/+4
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-05ALSA: ice1724 - constrain runtime rates for locked internal ratePavel Hofman1-0/+23
The driver already defines control "Multi Track Rate Locking" which locks the card at current rate if switched to internal clock. This patch limits the runtime rates to this rate only, allowing proper reporting of the card capabilities, and e.g. automatic rate conversion by the plug plugin to the currently locked rate. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: ice1724 - Support for ooAoo SQ210aPavel Hofman1-0/+35
This card shares PCI ids with Chaintec AV710. Therefore, it will not be detected automatically, it can only be activated by the module parameter model=sq210a. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: ice1724 - Allow card info based on model onlyPavel Hofman1-3/+5
When two different cards share the same PCI vendor/subvendor identification, allow card info based on model only. Do not require subvendor ID. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: ice1724 - Create capture pcm only for ADC-enabled configurationsPavel Hofman2-3/+11
Add the capture pcm only if there is at least one ADC configured in the SYSCONF register. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: ice1724 - External clock item only for cards with SPDIF_INPavel Hofman1-1/+6
Append the external clock item to the clock list only if the SPDIF_IN capability is defined in the SPDIF register. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: ice1724 - Check for ac97 to avoid kernel oopsPavel Hofman1-2/+5
Cards with identical PCI ids but no AC97 config in EEPROM do not have the ac97 field initialized. We must check for this case to avoid kernel oops. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-19ALSA: module_param: make bool parameters really boolRusty Russell2-3/+3
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker2-2/+2
The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-14ALSA: mpu401: clean up interrupt specificationClemens Ladisch1-4/+6
The semantics of snd_mpu401_uart_new()'s interrupt parameters are somewhat counterintuitive: To prevent the function from allocating its own interrupt, either the irq number must be invalid, or the irq_flags parameter must be zero. At the same time, the irq parameter being invalid specifies that the mpu401 code has to work without an interrupt allocated by the caller. This implies that, if there is an interrupt and it is allocated by the caller, the irq parameter must be set to a valid-looking number which then isn't actually used. With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value, which forces us to handle the parameters differently. This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the device interrupt is handled by the caller, and makes the allocation of the interrupt to depend only on the irq parameter. As suggested by Takashi, the irq_flags parameter was dropped because, when used, it had the constant value IRQF_DISABLED. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-06-24treewide: transciever/transceiver spelling fixesJoe Perches1-1/+1
Just tyops. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-10ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*Takashi Iwai2-2/+2
The name argument of request_irq() appears in /proc/interrupts, and it's quite ugly when the name entry contains a space or special letters. In general, it's simpler and more readable when the module name appears there, so let's replace all entries with KBUILD_MODNAME. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: Use KBUILD_MODNAME for pci_driver.name entriesTakashi Iwai2-2/+2
The convention for pci_driver.name entry in kernel drivers seem to be the module name or equivalent ones. But, so far, almost all PCI sound drivers use more verbose name like "ABC Xyz (12)", and these are fairly confusing when appearing as a file name. This patch converts the all pci_driver.name entries in sound/pci/* to use KBUILD_MODNAME for more unified appearance. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi4-7/+7
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-01-18ALSA: ice1712 delta - initialize SPI clockBrian Bloniarz1-0/+7
The driver was using an initial value for the clock on the SPI bus which was read from ICE1712 EEPROM, ice->eeprom.data[ICE_EEP1_GPIO_STATE] & ICE1712_DELTA_AP_CCLK (0x02) It appears some cards have it default high, some cards have it default low. On my Delta 66 rev. E: $ cat /proc/asound/M66/ice1712 | grep 'GPIO state' GPIO state : 0x70 /* ICE1712_DELTA_AP_CCLK bit is zero */ On my Audiophile 2496: $ cat /proc/asound/M2496/ice1712 | grep 'GPIO state' GPIO state : 0xfe /* ICE1712_DELTA_AP_CCLK bit is one */ It must be raised before the first SPI write happens, or the write will fail, leading to: [ 23.248721] invalid CS8427 signature 0x0: let me try again... I theorize that 4eb4550ab37d351ab0973ccec921a5a2d8560ec7 is no longer needed, it was a different way to workaround the problem. [fixed variable decleration by tiwai] Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09ALSA: ice1712 - working M-Audio Delta 66E supportBrian Bloniarz2-1/+59
Rev. E of the M-Audio Delta 66 is partially supported (commit ef2cd2ccad66b4aba518eca7514eface267ee0f3), but the layout of the GPIO pins was still unclear. This patch adds the GPIO definitions so that communication to the CS8247 & 2x AK4524 works correctly. ALSA bug#3327 has more details; users cap & jhunt report there that the GPIO wiring is similar to the Digigram VX442 (chip select: pin 4 = CS8427, pin 5 = AK4524 #0, pin 6 = AK4524 #1). There has been a lot of conflicting information in the bug, but given these definitions, my Delta 66E works; I tested analog in&out at 44.1kHz & 96kHz, analog gain settings, S/PDIF clock sync, and S/PDIF in&out at 44.1kHz. Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07sound: Remove unnecessary casts of private_dataJoe Perches2-4/+4
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-23ALSA: ice1712: Add support for Edirol DA-2496Garnet MacPhee2-1/+13
This device is similar to the M-Audio Delta 1010LT in that it uses the AK4524VF ADC/DAC, but it does not use the CS8427 for SPDIF. The SPDIF appears to be set up correctly, but I am not able to test it as I do not have any devices that use it. This patch makes the ADC/DAC's and the hardware mixer visible to apps such as alsamixer and envy24control. Signed-off-by: Garnet MacPhee <dhubsith@comcast.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-20Merge branch 'topic/core-cleanup' into for-linusTakashi Iwai1-25/+64
2010-05-12ALSA: ice1724 - Fix ESI Maya44 capture source controlTakashi Iwai1-3/+3
The capture source control of maya44 was wrongly coded with the bit shift instead of the bit mask. Also, the slot for line-in was wrongly assigned (slot 5 instead of 4). Reported-by: Alex Chernyshoff <alexdsp@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-13Merge branch 'topic/bkl' into topic/core-cleanupTakashi Iwai1-25/+64
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo4-3/+1
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-23ALSA: aureon - Patch for suspend/resume for Terratec Aureon cards.Bernhard Urban1-25/+64
Add proper suspend/resume code for Terratec Aureon cards. Based on ice1724 suspend/resume work of Igor Chernyshev. Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4944 Tested on linux-2.6.32.9 Signed-off-by: Bernhard Urban <lewurm@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-16Merge branch 'topic/misc' of ↵Jaroslav Kysela2-2/+11
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
2010-02-09sound: use DEFINE_PCI_DEVICE_TABLEAlexey Dobriyan2-2/+2
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to .devinit.rodata section, so they can be discarded in some cases, and make them const. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05ALSA: ice1724 - aureon - fix wm8770 volume offsetJaroslav Kysela1-5/+7
The volume register is from 0..0x7f and 0..0x1a range is mute. Also, fix mute combining in wm_vol_put(). The wrong behaviour was noticed by Peter Christensen. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-05ALSA: ice1712: fix: lock samplerate when samplerate locking is enabledSebastien Alaiwan1-0/+9
I found that the sampling rate locking setting of the ice1712 sound driver was only half-respected : when the driver was locked to, let's say, 44100Hz, and a usermode app was requesting 48000Hz playback, the request was succesful although the soundcard would continue to run at 44100Hz. Here's a patch that will make those requests to fail. Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09Merge branch 'for-linus' of ↵Linus Torvalds1-24/+7
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: ice1724 - aureon - modify WM8770 Master & DAC volume ALSA: hda/realtek: quirk for D945GCLF2 mainboard ALSA: hda - Terradici HDA controllers does not support 64-bit mode ALSA: document: Add direct git link to grub hda-analyzer ALSA: radio/sound/miro: fix build, cleanup depends/selects ALSA: hda - Generalize EAPD inversion check in patch_analog.c ASoC: Wrong variable returned on error ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII ALSA: hda - Exclude unusable ADCs for ALC88x ALSA: hda - Add missing Line-Out and PCM switches as slave ALSA: hda - iMac 9,1 sound patch. ALSA: opti93x: set MC indirect registers base from PnP data
2009-12-09Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits) tree-wide: fix misspelling of "definition" in comments reiserfs: fix misspelling of "journaled" doc: Fix a typo in slub.txt. inotify: remove superfluous return code check hdlc: spelling fix in find_pvc() comment doc: fix regulator docs cut-and-pasteism mtd: Fix comment in Kconfig doc: Fix IRQ chip docs tree-wide: fix assorted typos all over the place drivers/ata/libata-sff.c: comment spelling fixes fix typos/grammos in Documentation/edac.txt sysctl: add missing comments fs/debugfs/inode.c: fix comment typos sgivwfb: Make use of ARRAY_SIZE. sky2: fix sky2_link_down copy/paste comment error tree-wide: fix typos "couter" -> "counter" tree-wide: fix typos "offest" -> "offset" fix kerneldoc for set_irq_msi() spidev: fix double "of of" in comment comment typo fix: sybsystem -> subsystem ...
2009-12-09ALSA: ice1724 - aureon - modify WM8770 Master & DAC volumeJaroslav Kysela1-24/+7
The volume levels in original implementation are incorrect and does not match the dB scale. The real range is linear (in the sense of the dB scale) from 0dB to -100dB. Remove logaritmic table and make all volumes from range 0dB..100dB. The tests are in RedHat's bugzilla #540817. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-07Merge branch 'for-next' into for-linusJiri Kosina1-1/+1
Conflicts: kernel/irq/chip.c
2009-12-04Merge branch 'topic/hda' into for-linusTakashi Iwai7-45/+1250
2009-12-01Merge branch 'topic/ice1724-quartet' into topic/hdaTakashi Iwai7-45/+1250
2009-12-01Merge branch 'fix/misc' into topic/miscTakashi Iwai1-2/+2
2009-11-16ALSA: ice1724 - make some bitfields unsignedDan Carpenter1-2/+2
This is a clean up and doesn't change the behavior. Bit fields should always be unsigned. Otherwise pm_suspend_enabled will be -1 when you want it to be 1. The other bad thing is that the sparse checker will complain 36 times if they aren't unsigned. The other bitfields in that struct are unsigned already. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14Merge branch 'fix/misc' into topic/miscTakashi Iwai1-1/+1
2009-11-14ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()Takashi Iwai1-1/+1
Remove invlid __devinit prefix from the suspend callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14ALSA: ice1724 - Patch for suspend/resume for ESI Juli@Aleksey Kunitskiy1-0/+32
Add proper suspend/resume code for Juli@ cards. Based on ice1724 suspend/resume work of Igor Chernyshev. Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413 Tested on linux-2.6.31.6 Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-09tree-wide: fix a very frequent spelling mistakeDirk Hohndel1-1/+1
something-bility is spelled as something-blity so a grep for 'blit' would find these lines this is so trivial that I didn't split it by subsystem / copy additional maintainers - all changes are to comments The only purpose is to get fewer false positives when grepping around the kernel sources. Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-10-11ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@David Henningsson1-1/+1
If two streams are started immediately after one another (such as a playback and a recording stream), the call to set hw params fails with EBUSY. This patch makes the call succeed, so playback and recording will work properly. Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-10ALSA: ice1724: Fix surround on Chaintech AV-710Robert Hancock1-3/+5
Fix the num_total_dacs setting for Chaintech AV710. The existing comment that only PSDOUT0 is connected is correct, but since the card is using packed AC97 mode to send 6 channels to the codec, num_total_dacs should be set to 6 and not 2. This allows 6-channel surround to work. Also clarify a comment regarding the additional WM8728 codec on this card (it's connected to the SPDIF output and always receives the same data). Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08ALSA: ice1724: increase SPDIF and independent stereo buffer sizesRobert Hancock1-2/+2
Increase the default and maximum PCM buffer prellocation size for ice1724's SPDIF and independent stereo pair outputs to 256K, which is the hardware's maximum supported size. This allows a reduction in interrupt rate and potentially power usage when an application is not latency-critical. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from ↵Pavel Hofman2-2/+2
MIXER to PCM type * PLEASE NOTE - this change requires the corresponding update of envy24control for ice1712 - kind of an ABI change. * The "Multi Track Peak" control is read-only level meters indicator. * The control is VERY confusing to most users since it is currently displayed in regular mixers. E.g. alsamixer ignores its read-only status and allows changing the levels with keys which makes no sense. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21ALSA: ice1724 - Infrasonic Quartet supportPavel Hofman4-1/+1144
* three external clock types * all controls supported Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21ALSA: ice1724 - Support for multiple external clock typesPavel Hofman3-16/+52
* Support for customization of the external clock names * Adding hooks to playback_pro_open and capture_pro_open, allowing e.g. limiting available stream rates to a single value when the external clock rate is detected Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21ALSA: ice1724 - pro-rate-locking makes sense only for internal clock modePavel Hofman1-7/+16
* pro-rate-locking applies to internal clock mode only * required rate and current rate are compared for internal clock mode only Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21ALSA: ice1724 - adding GPIO routines for mask and directionPavel Hofman3-0/+38
* get/set routines for GPIO mask and direction Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21ALSA: ak4620 support, codec regs listed in procPavel Hofman1-21/+0
* complete support for ak4620 * codec regs listed in proc for all codecs/chips * adding total regs for each codec * fixing nb. of steps in input attenuation controls Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-10Merge branch 'topic/ice1724-pm' into for-linusTakashi Iwai3-20/+147
* topic/ice1724-pm: ALSA: ice1724 - Fix section mismatch ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2
2009-07-02ALSA: ice1724 - Fix section mismatchTakashi Iwai1-1/+1
Now snd_vt1724_chip_reset() is used in the resume callback, thus it cannot be __devinit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2Igor Chernyshev3-19/+146
I've built a small HTPC and had to add suspend/resume support in ice1724 driver. There seem to be 3 existing bugs related to that: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3748 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2314 Due to hardware (un)availability, I only enabled the fix for Audiotrak Prodigy HD2 card, which is installed in my HTPC. However, most of my code should be reusable in the future on other ice1724-based cards as well (as long as people add card-specific peices of code). The fix is currently based on ALSA 1.0.20 and works on my MythBuntu 9.04 HTPC (using 2.6.28-11 kernel). Signed-off-by: Igor Chernyshev <igor.ch75+alsa at gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25sound: Use PCI_VDEVICEJoe Perches2-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06ALSA: ice1724 - Add ESI Maya44 supportTakashi Iwai4-1/+793
Added the support for ESI Maya44 board to ice1724 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06ALSA: ice1724 - Allow spec driver to create own routing controlsTakashi Iwai2-15/+30
Added a new flag, own_routing, to allow spec drivers to create own routing controls. Also, the basic get/put calls are changed to be external for later use by maya44 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06ALSA: ice1724 - Add PCI postint to reset sequenceTakashi Iwai1-0/+2
Add the PCI posting to ensure the reset sequence in snd_vt1724_chip_reset(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06ALSA: ice1724 - Clean up definitions of DMA recordsTakashi Iwai1-16/+21
Rename some vt1724_pcm_reg records to more generic and consistent ones. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06ALSA: ice1724 - Check error in set_rate functionTakashi Iwai1-7/+14
The set_rate might return error but the current code doesn't check it. This patch adds a proper error check. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)Yang Hongyang1-2/+2
Replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-24Merge branch 'topic/ice' into for-linusTakashi Iwai4-26/+54
2009-02-05ALSA: Add missing KERN_* prefix to printk in sound/pci/ice1712Takashi Iwai4-10/+27
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-02ALSA: ice1724 - Dynamic MIDI TX irq controlTakashi Iwai1-16/+27
MIDI_TX IRQ seems always pending when any bytes on FIFO is available. Thus, it's better to enable MPU_TX only when any bytres are really stored in the substream, and disables immediately when the queue becomes empty. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in sound/pci/*Takashi Iwai2-6/+6
Convert from snd_card_new() to the new snd_card_create() function in sound/pci/*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-05ALSA: ice1724 - Fix a typo in IEC958 PCM nameAlan Horstmann1-1/+1
Fix trivial name string typo as reported in bug 2552. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07Merge branch 'topic/fix/misc' into topic/miscTakashi Iwai1-2/+4
2008-11-05ALSA: ice1724 - Re-fix IRQ mask initializationTakashi Iwai1-4/+4
The previous IRQ mask initialization was wrong. It must set the bits to be masked. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-01ALSA: ice1724 - Fix IRQ register initializationTakashi Iwai1-6/+3
The IRQMASK register has to be set to zero expclitily at the initialization otherwise you'll get no interrupts properly at later operations. Also, removed the old commented out codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-30ALSA: sound/ice1712: indentation & braces disagree - add bracesIlpo Järvinen1-2/+4
Neither has any significance currently to the flow because err is checked for the same condition before the place of disagreement. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-20ALSA: ice1724 - Fix TX IRQ lockupTakashi Iwai1-8/+12
MPU TX causes IRQ floods on VT172x devices mysteriously. Disable TX IRQ if the IRQ flood is detected. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-09-09ALSA: ice1712.c: fix coding styleAlexander Beregalov2-138/+151
before: total: 113 errors, 169 warnings, 2786 lines checked total: 26 errors, 24 warnings, 504 lines checked after: total: 14 errors, 163 warnings, 2799 lines checked total: 0 errors, 24 warnings, 504 lines checked Compile tested only. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09ALSA: ice1724.c: fix coding styleAlexander Beregalov1-84/+96
before: total: 96 errors, 66 warnings, 2612 lines checked after: total: 11 errors, 64 warnings, 2624 lines checked Compile tested only. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09ALSA: ice1712/ice1724: Coding style fixes part 1 (more coming up)Vedran Miletic6-128/+183
Inspired by Alexander Beregalov's patches for wtm and aureon.c, I decided to run checkpatch on some more files. After some work checkpatch.pl-0.23 --no-tree --file --strict <file> reports 0 errors, 0 warnings, 0 checks, n lines checked for: phase.c phase.h juli.c (1 check about unused code, maybe we should comment it) juli.h (no changes necessary) In other files I have just fixed // comments and long lines along the way (but not all of them), more coming up. Signed-off-by: Vedran Miletic <rivanvx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09ALSA: ice1712/wtm: fix coding styleAlexander Beregalov2-54/+54
before: total: 2 errors, 0 warnings, 20 lines checked total: 49 errors, 2 warnings, 518 lines checked after: total: 0 errors, 0 warnings, 20 lines checked total: 0 errors, 0 warnings, 518 lines checked Compile tested, size and code are equal. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09ALSA: ice1712/aureon.c: fix coding styleAlexander Beregalov1-326/+351
before: total: 304 errors, 137 warnings, 2259 lines checked after: total: 0 errors, 121 warnings, 2284 lines checked Compile tested, size is different because of include was changed, but without that change md5sum is different because of cmp cx,dx/cmp dx,cx swap and __LINE__ was changed in printk function. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-04ALSA: ice1724 - limit channels for multi-channel playbackTakashi Iwai1-2/+3
Limit the available channels for multi-channel playback device to the real number of channels. Until now, always up to 8 channels are created, which are simply useless without the real outputs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-04ALSA: ice1724: Enable MIDI on TerraTec PHASE 22 and PHASE 28Vedran Miletic1-6/+17
Even though MIDI was fixed on ice1724 chips a while ago, it wasn't yet enabled for some cards as it didn't get enough testing. This was tested with MIDI keyboard on PHASE 22 and with looping back output to input and it works stable, so it's safe to enable it. Besides this, there are some more minor fixes, not exactly user visible: * added info about PHASE 28 (collected, as I don't have a card) * added info about TS22PCI and new revisions of PHASE 22 * disable 192k on PHASE 22 as AK4524 I2S doesn't support it * enable SPDIF reciever on PHASE 22 Signed-off-by: Vedran Miletic <rivanvx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-04ALSA: ice1724: enable MIDI on Terratec Aureon 7.1 UniverseMaximilian Rehkopf1-2/+20
This enables MIDI on Terratec Aureon 7.1 Universe cards specifically. Apparently the other envy24ht-based Aureon cards do not have MIDI ports, hence I added a Universe specific eeprom array. The newer cards (Aureon 7.1 PCI / 5.1 PCI/Fun) have MIDI but use a CMI DSP so this driver does not concern them at all. Signed-off-by: Maximilian Rehkopf <otakon@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>