aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* ALSA: hda - Mute the right widget in auto_mute_via_amp modeTakashi Iwai2013-08-13
| | | | | | | | | | The current generic parser code assumes that always a pin widget controls the mute for an output blindly although it might be a different widget in the middle. Instead of the fixed assumption, check each parsed path and just pick up the right widget that has been already defined as a mute control. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Allow auto_mute_via_amp on bind mute controlsTakashi Iwai2013-08-13
| | | | | | | The auto-mute using the amp currently works only for a single amp on a pin. Make it working also with HDA_CTL_BIND_MUTE type, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: compress: update the MAINTAINER entryVinod Koul2013-08-12
| | | | | | | add missing uapi/ headers and Documentation files Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Add MAINTAINERS entry for compressed audio APIMark Brown2013-08-10
| | | | | | | | Help ensure that Vinod gets included in review of compressed audio patches by adding a MAINTAINERS entry for it. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: oss/dmabuf: remove an unneeded temporary variableDan Carpenter2013-08-09
| | | | | | | We don't actually use the "go" variable so it can be removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: don't push static constants on stack for %*phAndy Shevchenko2013-08-08
| | | | | | | | There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: WARN_ON when alts is passed as NULLEldad Zack2013-08-06
| | | | | | | | | | Prevent NULL dereference in snd_usb_add_endpoints(), when alts is passed as NULL. In this case, WARN (since this is a non-fatal bug) and return NULL ep. Call sites treat a NULL return value as an error. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: remove implicit_fb from quirkEldad Zack2013-08-06
| | | | | | | | | Since the quirks all apply to implicit feedback (the source endpoint is always a data endpoint), there's no need to set and check a flag for it. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: remove is_playback from implicit feedback quirksEldad Zack2013-08-06
| | | | | | | | | | | An implicit feedback endpoint can only be a capture source. The consumer (sink) of the implicit feedback endpoint is therefore limited to playback EPs. Check if the target endpoint is a playback first and remove redundant checks. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: do not initialize and check implicit_fbEldad Zack2013-08-06
| | | | | | | | | | | Since implicit_fb is not changed, !implicit_fb will always be true - it is set only after these checks. Similarly, there's also no need to set it at the top of the function. Change the type of implicit_fb to bool (more appropriate). Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: reverse condition logic in set_sync_endpointEldad Zack2013-08-06
| | | | | | | | Reverse logic on the conditions required to qualify for a sync endpoint and remove one level of indendation. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: move implicit fb quirks to separate functionEldad Zack2013-08-06
| | | | | | | | Separate setting implicit feedback quirks from setting a sync endpoint (which may also be explicit feedback or async). Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: separate sync endpoint setting from set_formatEldad Zack2013-08-06
| | | | | | | | | Setting the sync endpoint currently takes up about half of set_format(). Move it to a dedicated function. No functional change. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: remove assignment from if conditionEldad Zack2013-08-06
| | | | | | | Following general kernel style. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: remove disabled debug code in set_formatEldad Zack2013-08-06
| | | | | | | Code block does not compile when enabled. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix jack gating when auto_{mute,mic} is suppressed.Chih-Chung Chang2013-08-05
| | | | | | | | | | | | | | The snd_hda_jack_set_gating_jack() call didn't work when auto_{mute,mic} is suppressed because (1) am_entry is not filled with nid of the mic pin. (2) The jacks are not created (by snd_hda_jack_detect_enable_callback) before the snd_hda_jack_set_gating_jack call. Now we use the first input pin nid directly, and create the jack if it doesn't exist yet. Signed-off-by: Chih-Chung Chang <chihchung@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix invalid multi-io creation on VAIO-Z laptopsTakashi Iwai2013-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | VAIO-Z laptops need to use the specific DAC for the speaker output by some unknown reason although the codec itself supports the flexible connection. So we implemented a workaround by a new flag, no_primary_hp, for assigning the speaker pin first. This worked until 3.8 kernel, but it got broken because the driver learned for a better multi-io pin mapping, and not it can assign two mic pins for multi-io. Since the multi-io requires to be the primary output, the hp and two mic pins are assigned in prior to the speaker in the end. Although the machine has two mic pins, one of them is used as a noise- canceling headphone, thus it's no real retaskable mic jack. Thus, at best, we can disable the multi-io assignment and make the parser behavior back to the state before the multi-io. This patch adds again a new flag, no_multi_io, to indicate that the device has no multi-io capability, and set it in the fixup for VAIO-Z. The no_multi_io flag itself can be used generically, added via a helper line, too. Reported-by: Tormen <my.nl.abos@gmail.com> Reported-by: Adam Williamson <awilliam@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove analog mic pin override from STAC9228 dell-bios quirkTakashi Iwai2013-07-29
| | | | | | | | | | | | | | | The current fixup for dell-bios model with STAC9228 codec contains the override of pin 0x0c for analog mic. But this is actually just adding a bogus pin and confuses the parser. Better to remove it for the auto-mic switching. Meanwhile, for a possible regression, keep the old configuration as model=dell-bios-amic, so that people can test it again quickly. Tested on Dell 1420n laptop. Reported-and-tested-by: Eric Shattow <lucent@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - WAKEEN feature enabling for runtime pmWang Xingchao2013-07-29
| | | | | | | | | | | | | | | | | | | | | | With runtime power save feature enabled, Headphone hotplug event will not be detected while controller/codec in D3. HDA has feature WAKEEN to let codec wake up system if controller is in D3 or system in S3.(HDA Spec 4.5.9.2/3). Codec can send out INT or wake up controller depending on whether CIE or GIE enabled.(Figure 4, Interupt structure). The controller must be in RESET mode after enter runtime-suspend, otherwise it will not be waken up even if codec send out wake-up event. And STATESTS will be cleared after controller brought out of RESET mode. This patch only enable WAKEEN for runtime-suspend(Controller D3) mode, not for system S3 mode. with tool "evtest", Headphone hotplug events could be cought and reported successfully. [fixed an unused variable warning by tiwai] Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - jack poll once if jackpoll_interval==0Wang Xingchao2013-07-29
| | | | | | | | | | | | | | With jackpoll_interval != 0, it's used to poll jack event periodically in a delayed work. if it's 0, give the caller chance to probe jack status but will not restart the delayed work. In the next patch which enable WAKEEN feature, HDA controller was able to wake up system when it's in D3, it's useful to detect Jack hotplug event and notify userspace. By default the jackpoll_interval=0, this patch let jack poll once without starting the delayed work. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Clearing jackpoll_interval avoid pending workWang Xingchao2013-07-29
| | | | | | | | | | Clearing jackpoll_interval before calling cancel_delayed_work_sync(), otherwise the work will be triggered again and cause impact in hda_jackpoll_work(). The next patch will poll jack once even with jackpoll_interval=0. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usx2y: remove an unneeded checkDan Carpenter2013-07-29
| | | | | | | | | | | | | | The test here is always true because S[i].urb is an array not a pointer. Also it's bogus because the intent was to test: if (S->urb[i]) { instead of: if (S[i].urb) { Anyway, usb_kill_urb() and usb_free_urb() accept NULL pointers so we can just remove this. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - use azx_writew() for 16-bit length registerWang Xingchao2013-07-24
| | | | | | | Register STATESTS is 16-bit length, use correct API for read/write. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix the noise after suspend on ALC283 codecKailang Yang2013-07-24
| | | | | | | | | | | | | | When the power state of ALC283 codec goes to D3, it gives a noise via headphone output. This is because the driver tries to clear all pins via snd_hda_shutup_pins(). Setting the mic pin to zero triggers such a noise. Define a new shutup call specific to this codec and control the pins there more precisely. Also, add the power-save enable/disable sequences in the resume and the new shutup calls. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Selectively call snd_hda_shutup_pins()Takashi Iwai2013-07-24
| | | | | | | | | Instead of calling snd_hda_shutup_pins() unconditionally, allow it be called in spec->shutup callback. In this way, we can avoid calling this function if it causes a problem like we see in the next patch following this. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: replace strict_strto*() with kstrto*()Jingoo Han2013-07-21
| | | | | | | | | The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_jack_detect_state() helper functionTakashi Iwai2013-07-21
| | | | | | | | | | | | | | | | | | | | | | | | snd_hda_jack_detect() function returns a boolean value for a jack plugged in or not, but it also returns always true when the corresponding pin is phantom (i.e. fixed). This is OK in most cases, but it makes the generic parser misbehaving about the auto-mute or auto-mic switching, e.g. when one of headphone pins is a fixed. Namely, the driver decides whether to mute the speaker or not, just depending on the headphone plug state: if one of the headphone jacks is seen as active, then the speaker is muted. Thus this will result always in the muted speaker output. So, the problem is the function returns a boolean, after all, although we need to think of "phantom" jack. Now a new function, snd_hda_jack_detect_state() is introduced to return these tristates. The generic parser uses this function for checking the headphone or mic jack states. Meanwhile, the behavior of snd_hda_jack_detect() is kept as is, for keeping compatibility in other driver codes. Acked-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Headphone mic support for an Asus/Conexant deviceDavid Henningsson2013-07-16
| | | | | | | | | | | | | | This Conexant codec has a single jack that can be used as either headphone or mic (but not headset). The existing hp_mic functionality does not apply here, because the mic and the HP are on separate pins. Hence make a lighter version of what has been earlier done for Realtek codecs. BugLink: https://bugs.launchpad.net/bugs/1198030 Tested-by: Franz Hsieh <franz.hsieh@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - remove unneeded semicolonFengguang Wu2013-07-15
| | | | | | | | | sound/pci/rme9652/hdspm.c:1110:2-3: Unneeded semicolon Generated by: coccinelle/misc/semicolon.cocci Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-3.12' into for-nextTakashi Iwai2013-07-15
|\
| * Merge branch 'topic/hda-ad-remove-static' into for-3.12Takashi Iwai2013-07-10
| |\
| | * ALSA: hda - Remove static quirks for AD1986A codecTakashi Iwai2013-07-05
| | | | | | | | | | | | | | | | | | | | | | | | Finally all the static quirks in patch_analog.c are reduced by this patch. As machines with AD1986A codec are all old and often their BIOS are buggy, we need to keep at least a few static pin conifgs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Drop a few other static quirks for AD1986ATakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | Most of ASUS laptops and Lenovo N100 provide proper BIOS pin-configs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Drop static quirk for Toshiba Satellite L40-10QTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | The BIOS provides good pin-configurations, so we can drop the static quirk now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Drop static quirks for other AD1986A Samsung machinesTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | BIOS on Samsung R55, M55 and M50 provide the proper pin-configs, so we can remove the corresponding static quirk entries gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Convert static quirks for AD1986A Samsung laptopsTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | Just need to override some pin-configurations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Convert the static quirk for Samsung Q1 UltraTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | ... to a fixup entry. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Remove static quirks for AD1988 codecsTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | | | | For removing static quirks for AD1988 variants, a new fixup defining the 6stack pinconfig has been added for the buggy BIOS. Other than that, we can cut off straightforwardly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Remove static quirks for AD1981 and AD1983 codecsTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | These are relatively easy ones, as we already converted all static quirks to the generic parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Remove static quirks for AD1884/1984 & variantsTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | | | | Since the necessary device-specific fixups for Thinkpad and HP devices have been already ported, we can remove all static quirks for AD1884, AD1984, AD1884A and AD1984A codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Remove static quirks for AD1882Takashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | Now the generic parser can work stably enough, we can get rid of the static quirks. Let's start from AD1882. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add fixup for HP TouchSmart with AD1984A codecTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | Ported from the static quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add fixup for Lenovo Thinkpad with AD1984 codecTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | Ported from the static quirk (model=thinkpad). Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add GPIO control to AD1884 HP fixupTakashi Iwai2013-07-04
| | | | | | | | | | | | | | | | | | | | | | | | The AD1884 HP laptop/mobile quirks control GPIO1 bit as the primary mute as well. Add the similar control to ad1884 fixup for auto parser, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: firewire-speakers: remove not-reused member from structureTakashi Sakamoto2013-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "pcm" member in struct fwspk is used to set pcm operations but is not used again. This commit remove this member and set pcm operations with snd_pcm_set_ops(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hdspm - Added some comments and control register documentationMartin Dausel2013-07-05
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Dausel <martin.dausel@iosono-sound.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hdspm - Use snd_ctl_enum_info() in snd_hdspm_info_autosync_refAdrian Knoth2013-07-05
| | | | | | | | | | | | | | | | | | | | | | | | Also use snd_ctl_enum_info() to fill the autosync text fields on AES32 and MADI cards (only users of snd_hdspm_info_autosync_ref). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hdspm - Use snd_ctl_enum_info() for texts_autosyncAdrian Knoth2013-07-05
| | | | | | | | | | | | | | | | | | | | | Also use snd_ctl_enum_info() to fill the autosync enumerated controls. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hdspm - Use snd_ctl_enum_info for most text arraysAdrian Knoth2013-07-05
| | | | | | | | | | | | | | | | | | | | | | | | Use snd_ctl_enum_info() to fill most of the enumerated controls. More non-trivial occurrences will follow in separate commits. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hdspm - AES32: Enable TCO supportAdrian Knoth2013-07-05
| | | | | | | | | | | | | | | | | | | | | This patch finally enables TCO support on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>