aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/xonar_wm87x6.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-07ALSA: pci/oxygen/xonar_wm87x6: remove always true conditionPierre-Louis Bossart1-2/+4
Fix W=1 warnings: sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8776_write’: sound/pci/oxygen/xonar_wm87x6.c:119:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 119 | if (reg >= WM8776_HPLVOL && reg <= WM8776_DACMASTER) | ^~ sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8766_write’: sound/pci/oxygen/xonar_wm87x6.c:147:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 147 | if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) || | ^~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 264Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this driver is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 this driver 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 driver if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141333.769845457@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-27ALSA: jack: extend snd_jack_new to support phantom jackJie Yang1-1/+1
Dont create input devices for phantom jacks. Here, we extend snd_jack_new() to support phantom jack creating: pass in a bool param for [non-]phantom flag, and a bool param initial_jack to indicate whether we need to create a kctl at this stage. We can also add a kctl to the jack after its created meaning we can now integrate the HDA and ASoC jacks. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: oxygen: remove __dev* attributesBill Pemberton1-2/+2
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> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: virtuoso: Xonar DSX supportSergiu Giurgiu1-1/+5
This patch adds support for ASUS - Xonar DSX sound cards. Tested on openSUSE 12.2 with kernel: Linux 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012 (641c197) x86_64 x86_64 x86_64 GNU/Linux Works: - play sounds - adjust volume on master channel. - mute . Since Xonar DS uses the same chip, everything that works for DS should work for DSX as well. Signed-off-by: Sergiu Giurgiu <sgiurgiu11@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-16ALSA: virtuoso: Xonar DS: fix polarity of front outputClemens Ladisch1-0/+1
The two DACs for the front output and the surround/center/LFE/back outputs are wired up out of phase, so when channels are duplicated, their sound can cancel out each other and result in a weaker bass response. To fix this, reverse the polarity of the neutron flow to the front output. Reported-any-tested-by: Daniel Hill <daniel@enemyplanet.geek.nz> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: 2.6.34+ <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: virtuoso: add S/PDIF input support for all XonarsClemens Ladisch1-2/+4
All Xonar cards support S/PDIF input, but the cards without optical or coaxial plugs have only undocumented pin connectors. Support for the ST/STX was already added in a previous patch; this adds support for the D1/DX (JP2), DG (J5), DS (J5), and HDAV Slim (J12). Many thanks to Zoltan Miklos for testing the DS and DX. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: core, oxygen, virtuoso: add an enum control info helperClemens Ladisch1-21/+4
Introduce the helper function snd_ctl_enum_info() to fill out the elem_info fields for an enumerated control. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: virtuoso: add Xonar HDAV1.3 Slim supportClemens Ladisch1-10/+203
Add experimental support for the Asus Xonar HDAV1.3 Slim sound card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: oxygen: simplify model-specific MCLK handlingClemens Ladisch1-1/+2
Replace the get_i2s_mclk callback with tables of MCLK values. This simplifies the MCLK-handling code in both the framework and the model- specific drivers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10ALSA: oxygen: allow different number of PCM and mixer channelsClemens Ladisch1-1/+2
For cards like the Xonar HDAV1.3, differentiate between the number of PCM channels that can be played and the number of channels whose volume can be adjusted. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06ALSA: oxygen: update hardware commentsClemens Ladisch1-11/+32
Reformat and update the comments that describe the hardware connections on the various models. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06ALSA: oxygen: allow to dump codec registersClemens Ladisch1-0/+30
To help with debugging, add the registers of the model-specific codecs to the controller and AC97 register dump in the proc file. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05ALSA: oxygen: handle CD input configuration with a flagClemens Ladisch1-8/+0
There are more models without a CD input than with one, so handle this explicitly with a device_config flag to avoid having to define a control filter callback to filter it out. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05ALSA: virtuoso: fix Xonar DS chip nameClemens Ladisch1-1/+1
The controller on the Xonar DS is labeled "AV66", not "AV200". Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: virtuoso: Xonar DS: add stereo upmixing to center/LFE channelsClemens Ladisch1-0/+19
Add the possibility to route a mix of the two channels of stereo data to the center and LFE outputs. Due to a WM8766 restriction, all surround and back channels also get the mixed L/R signal in this case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: virtuoso: automatically handle Xonar DS headphone routingClemens Ladisch1-13/+44
Automatically mute the speaker outputs as long as a headphone is plugged. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: virtuoso: add Xonar DS headphone jack detectionClemens Ladisch1-6/+19
Now that the polarity of the headphone detection pin is known, replace the debugging message with a proper jack plug input device. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: virtuoso: fix Xonar DS input switchesClemens Ladisch1-1/+11
Use the correct number, register bits, and names for the input switches. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09ALSA: virtuoso: fix WM8766 register writes with MSBClemens Ladisch1-6/+6
The check for the volume update latch bit was accidentally in the wrong function, where it would prevent the MSB from being written, instead of correctly ignoring it for cached values. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08ALSA: virtuoso: fix setting of Xonar DS line-in/mic-in controlsClemens Ladisch1-1/+20
The Line and Mic inputs cannot be used at the same time, so the driver has to automatically disable one of them if both are set. However, it forgot to notify userspace about this change, so the mixer state would be inconsistent. To fix this, check if the other control gets muted, and send a notification event in this case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-and-tested-by: Nathan Schagen Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08ALSA: virtuoso: work around missing reset in the Xonar DS Windows driverClemens Ladisch1-0/+1
For the WM8776 chip, this driver uses a different sample format and more features than the Windows driver. When rebooting from Linux into Windows, the latter driver does not reset the chip but assumes all its registers have their default settings, so we get garbled sound or, if the output happened to be muted before rebooting, no sound. To make that driver happy, hook our driver's cleanup function into the shutdown notifier and ensure that the chip gets reset. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-and-tested-by: Nathan Schagen Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-03ALSA: oxygen: change || to &&Clemens Ladisch1-1/+1
In the original code the condition was always true (hopefully) because WM8776_HPLVOL is zero. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-18sound: virtuoso: add Xonar DS supportClemens Ladisch1-0/+1021
Add experimental support for the Asus Xonar DS. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>