summaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)Author
2011-10-17ALSA: hda - ALC888S-VC remark to ALC886Kailang Yang
Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-17ALSA: hda/realtek - Check the error from alc_codec_rename()Takashi Iwai
Should be a rare case, but... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-13ALSA: HDA: Fixup Realtek headphone pin initializationDavid Henningsson
This typo caused headphone pins not to be initialized correctly. BugLink: https://bugs.launchpad.net/bugs/871582 Reported-by: Effenberg Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-13ALSA: hda - Remove bad code for IDT 92HD83 family patchCharles Chin
The purpose of this patch is to remove a section of "bad" code that assigns the last DAC to ports E or F in order to support notebooks with docking in earlier days, around ALSA 1.0.19 - 21. This is not necessary now and actually breaks some configurations that use these ports as other devices. This have been tested on several different configurations to make sure that it is working for different combinations. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06ALSA: hda - Distinguish each substream for better sticky assignmentTakashi Iwai
The commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 introduced a mechanism to assign the previously used slot for the next reopen of a PCM stream. But the PCM device number isn't always unique (it may have multiple substreams), and also the code doesn't check the stream direction, thus both playback and capture streams share the same device number. For avoiding this conflict, make a unique key for each substream and store/check this value at reopening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-10-06ALSA: hda/realtek - Choose more cleverly the primary outputsTakashi Iwai
When the speaker outputs are more than the headphone outputs, it implies that the system has surround speakers while the headphones are only for monitoring the front. In such a case, it's better to put speakers as the primary outputs so that the driver can build up and keep the surround setup. Otherwise the system will pick up the headphone as primary, and offers less channels than the speakers do support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06ALSA: hda - Moved snd_print_pcm_rates() back into hda_proc.cTakashi Iwai
Since hda_proc.c is now the only user of snd_print_pcm_rates(), better to put it back locally to hda_proc.c and revert to the old style. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-06ALSA: hdmi: fix printout of SAD sampling ratesPierre-Louis Bossart
SAD sampling rate information reported in /proc/asound/cardX/eldX is incorrect due to a mismatch between HDA and HDMI frequencies. Add new routine to provide relevant values. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-05ALSA: jack - Add "Line In" input jack constantsDavid Henningsson
Similar to Line Out, these constants form the base for future patches enabling input jack reporting for Line in jacks. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-05ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDTDavid Henningsson
If we run out of DACs when trying to assign a DAC to a secondary headphone, prefer the DAC of the first headphone to the primary (usually line out) DAC. BugLink: http://bugs.launchpad.net/bugs/845275 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-03ALSA: HDA: Fix naming of input jacks for IDT parserDavid Henningsson
The Sigmatel/IDT parser should have the same naming convention for input jacks as the other codecs have. BugLink: http://bugs.launchpad.net/bugs/859704 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-03ALSA: hda/hdmi: expose ELD controlPierre-Louis Bossart
Applications may want to read ELD information to understand what codecs are supported on the HDMI receiver and handle the a-v delay for better lip-sync. ELD information is exposed in a device-specific IFACE_PCM kcontrol. Tested both with amixer and PulseAudio; with a corresponding patch passthrough modes are enabled automagically. ELD control size is set to zero in case of errors or wrong configurations. No notifications are implemented for now, it is expected that jack detection is used to reconfigure the audio outputs. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-30ALSA: hda - Fix a regression of the position-buffer checkTakashi Iwai
The commit a810364a0424c297242c6c66071a42f7675a5568 ALSA: hda - Handle -1 as invalid position, too caused a regression on some machines that require the position-buffer instead of LPIB, e.g. resulting in noises with mic recording with PulseAudio. This patch fixes the detection by delaying the test at the timing as same as 3.0, i.e. doing the position check only when requested in azx_position_ok(). Reported-and-tested-by: Rocko Requin <rockorequin@hotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-28ALSA: hda - Allow patching with any vendor/subsystem idsTakashi Iwai
In the ugly real world, there area really broken devices that don't set codec SSID correctly. In such a case, the ID can be random, thus the patching won't work reliably. For applying the patch forcibly to such a device, the driver will skip the vendor and/or subsystem ID checks when zero or a negative number is given in [codec] section. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-28ALSA: hda - Add snoop optionTakashi Iwai
Added a new option "snoop" for the traffic control of the HD-audio controller chip. When set to 0, the non-snooping mode is used with the traffic control bit is set in each stream control register. This may allow better operations in the low power mode, but the actual implementation is depending pretty much on the chipset. As already implemented, more or less each chipset has own snoop-control register bit. Now this setup refers to the snoop option, too. Also, a new VIA chipset may require the non-snooping mode when set so in BIOS. In such a case, the option value is overridden. As default, it's still set to snoop=1 for keeping the same behavior as before. In near future, it'll be set to 0 as default after checking it works in every system well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-28ALSA: hda:via - Skip creations of empty PCM streamsTakashi Iwai
If no analog I/O is defined, skip creating the corresponding PCM stream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-27ALSA: hda - Avoid unnecessary verbs to clear PCM formatsTakashi Iwai
Since really_cleanup_stream() is called from both purity_inactive_streams() and hda_cleanup_all_streams(), the verbs to clear the PCM channel and format may be called multiple times unnecessarily. This patch adds checks to skip these unneeded verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-26Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-09-26ALSA: hda/realtek - Don't detect LO jack when identical with HPTakashi Iwai
The spec->autocfg.line_out_pins[] may contain the same pins as hp_pins[] depending on the configuration. When they are identical, detecting the line_jack_present flag screws up the auto-mute because alc_line_automute() is called unconditionally at initialization while it won't be triggered by unsol events, thus the old line_jack_present flag is kept for the whole run. For fixing this buggy behavior, the driver needs to check whether the line-outs are really individual, and skip if same as headphone jacks. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-26ALSA: hda/realtek - Avoid bogus HP-pin assignmentTakashi Iwai
When the headphone pin is assigned as primary output to line_out_pins[], the automatic HP-pin assignment by ASSID must be suppressed. Otherwise a wrong pin might be assigned to the headphone and breaks the auto-mute. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2011-09-24ALSA: HDA: No power nids on 92HD93David Henningsson
This patch is necessary to make internal speakers work on this chip. Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Tested-by: Alex Wolfson <alex.wolfson@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: HDA - Add Independent Headphone for all models of ad1988/ad1989Raymond Yau
- Add "AD198x Headphone" playback device for independent headphone playback while playing 7.1 surround using rear panel audio jacks. - Remove "6stack-dig-fp" model since "Headphone Playback Volume" control using DAC0 instead of DAC1 (HDA_FRONT) was already added to all models. - Add "Independent HP" switch to enable/disable this playback device. When the switch is OFF, headphone use "copy front" mode to get the front channel as the green jack. When the switch is ON, you can play stereo sound through "AD198x Headphone" device to headphone while playing 7.1 surround sound through "AD198x Analog" device. The switch cannot be changed when either "AD198x Headphone" or "AD198X Analog" is open. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: hdspm - cleanup __user tags in ioctl()Dan Carpenter
This makes the code cleaner and silences a Sparse complaint: sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces)) sound/pci/rme9652/hdspm.c:6341:23: expected int ( *ioctl )( ... ) sound/pci/rme9652/hdspm.c:6341:23: got int ( static [toplevel] *<noident> )( ... ) sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: hdspm - potential info leak in snd_hdspm_hwdep_ioctl()Dan Carpenter
Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them. The status struct has a hole in it, and on some paths not all the members were initialized. struct hdspm_status { unsigned char card_type; /* 0 1 */ /* XXX 3 bytes hole, try to pack */ enum hdspm_syncsource autosync_source; /* 4 4 */ long long unsigned int card_clock; /* 8 8 */ The hdspm_version struct had holes in it as well. struct hdspm_version { unsigned char card_type; /* 0 1 */ char cardname[20]; /* 1 20 */ /* XXX 3 bytes hole, try to pack */ unsigned int serial; /* 24 4 */ short unsigned int firmware_rev; /* 28 2 */ /* XXX 2 bytes hole, try to pack */ int addons; /* 32 4 */ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: fm801 - Clean up redundant reference to snd_fm801_tea575x_gpios[]Takashi Iwai
Use macro to improve readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-22Merge branch 'fix/misc' into topic/miscTakashi Iwai
2011-09-22ALSA: fm801: Gracefully handle failure of tuner auto-detectBen Hutchings
Commit 9676001559fce06e37c7dc230ab275f605556176 ("ALSA: fm801: add error handling if auto-detect fails") seems to break systems that were previously working without a tuner. As a bonus, this should fix init and cleanup for the case where the tuner is explicitly disabled. Reported-and-tested-by: Hor Jiun Shyong <jiunshyong@gmail.com> References: http://bugs.debian.org/641946 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@kernel.org [v3.0+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-22ALSA: fm801: Fix double free in case of error in tuner detectionBen Hutchings
Commit 9676001559fce06e37c7dc230ab275f605556176 ("ALSA: fm801: add error handling if auto-detect fails") added incorrect error handling. Once we have successfully called snd_device_new(), the cleanup function fm801_free() will automatically be called by snd_card_free() and we must *not* also call fm801_free() directly. Reported-by: Hor Jiun Shyong <jiunshyong@gmail.com> References: http://bugs.debian.org/641946 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@kernel.org [v3.0+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-22sound: irq: Remove IRQF_DISABLEDYong Zhang
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-21ALSA: hda: hdmi: Hint matching between input devices and pcm devicesDavid Henningsson
Since modern HDMI cards often have more than one output pin and thus input device, we need to know which one has actually been plugged in. This patch adds a name hint that indicates which PCM device is connected to which pin. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: HDA: Refactor Realtek's automuteDavid Henningsson
Increase readability and understandability in the automute code. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2011-09-20ALSA: HDA: Add support for IDT 92HD93David Henningsson
Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: via82xx: allow to disable the SRCClemens Ladisch
Add the PCM rule to allow disabling the PCM playback SRC. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: emu10k1: allow to disable the SRCClemens Ladisch
Add the PCM rule to allow disabling the PCM playback SRC. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: ymfpci: allow to disable the SRCClemens Ladisch
Add the PCM rules to allow disabling the PCM playback and capture SRCs. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20ALSA: ymfpci: fix PCM open error handlingClemens Ladisch
The installation of the minimum period size constraint in the PCM open callbacks was not checked for errors. Add this check, and move the call to the beginning of the function to avoid having to do any cleanups in the error case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-19ALSA: hda/realtek - Fix auto-mute with HP+LO configurationTakashi Iwai
When the system has only the headphone and the line-out jacks without speakers, the current auto-mute code doesn't work. It's because the spec->automute_lines flag is wrongly referred in update_speakers(). This flag must be meaningless when spec->automute_hp_lo isn't set, thus they should be always coupled. The patch fixes the problem and add a comment to indicate the relationship briefly. BugLink: http://bugs.launchpad.net/bugs/851697 Reported-by: David Henningsson <david.henningsson@canonical.com> Tested-By: Jayne Han <jayne.han@canonical.com> Cc: stable@kernel.org (3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-16Merge branch 'fix/misc' into topic/miscTakashi Iwai
2011-09-14ALSA: HDA: Cirrus - fix "Surround Speaker" volume control nameDavid Henningsson
This patch fixes "Surround Speaker Playback Volume" being cut off. (Commit b4dabfc452a10 was probably meant to fix this, but it fixed only the "Switch" name, not the "Volume" name.) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14ALSA: mpu401: clean up interrupt specificationClemens Ladisch
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-09-13ALSA: hda - Terminate the recursive connection search properlyTakashi Iwai
The recursive search of widget connections in snd_hda_get_conn_index() must be terminated at the pin and the audio-out widgets. Otherwise you'll get "too deep connection" warnings unnecessarily. Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12ALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989Raymond Yau
- use DAC0 instead of DAC1 for Port-A Headphone - assign 0x03 to spec->multiout.hp_nid except model="6stack-dig-fp" Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12ALSA: ymfpci: add "Playback" to FM Legacy Volume controlRaymond Yau
YDSXGR_LEGACYOUTVOL is a Playback Volume control for OPL3 FM Synth. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-25ALSA: hda: Conexant: Allow different output types to share DACDavid Henningsson
Headphones has stopped working for the original reported (a regression compared to 2.6.38). This is because Speaker and Headphones share the same DAC, in which case no Headphones volume control was created. This patch fixes so that both Speaker and Headphones volume controls are created in such scenario. BugLink: http://bugs.launchpad.net/bugs/817943 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24ALSA: hda - Remove the rest of ALC662 quirksTakashi Iwai
The rest of ALC662 quirks are only for desktops, and they should work with the auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24ALSA: hda - Remove ALC662 ASUS eeepc-ep20 model quirkTakashi Iwai
Since the recent fixes, this device works with the auto-parser well. Let's kill it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24ALSA: hda - Prefer multi-io to speakers for realtek auto-parserTakashi Iwai
When the multi-io jacks are available, parse them first and assign DACs before parsing speakers and headphones. This allows a better chance of surround I/O in some desktops and laptops with limited DACs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24ALSA: hda - Fix Center/LFE mixer element creations for RealtekTakashi Iwai
The commit 23c09b00900c3fa6672148738cad29d6fc6ded7c ALSA: hda - Support multiple speakers by Realtek auto-parser changes the return value from alc_get_line_out_pfx(), and it breaks the center/LFE mixer split check. The caller must test with a string "CLFE" now. Signed-off-by: Takashi Iwai <tiwai@suse.de>