Call cancel_work_sync() when turning off the beep switch so that the
mute call is executed in a proper order.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's no longer necessary since beep_mode=2 option was dropped.
It can be checked simply via codec->beep != NULL.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move snd_hda_mixer_amp_switch_put_beep() to hda_beep.c as a clean up
to remove one more ifdef.
Also add the corresponding get callback to return consistently the
digital beep state independently from the mixer amp value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The beep_mode=2 option was introduced to make the beep mixer
controlling the beep input allocation/deallocation dynamically, so
that a user can switch between HD-audio codec digital beep and the
system beep only via mixer API. This was necessary because the
keyboard driver took only the first input beep instance at that time.
However, the recent keyboard driver already processes the multiple
input instances, thus there is no point to keep this mode.
Let's remove it.
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Here you find quite a few changes for HD-audio and a copule of quirk
additions for USB-audio. All reasonably small and/or trivial.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAABAgAGBQJP6tBMAAoJEGwxgFQ9KSmkhUsQAJcwhnQb27EB9eBnhjcZvmPS
2K02VNVhoh7kVVjQQ92znpeu+5WFdpFyiBzRPkAzkRR29k7KAtYQRrKg0En7qOL7
RN6CuZAhIr0D7r8QhpeiJ1ZqpOTzPpycBscYUWZGJR07+iBOZIGIuly4hcWWy2WQ
ntwcaeDk/n6PWYCwaMxsGdarOZEBh+dcB/8m7QpRtLEOs72IbzpFGyvXpK/Cv+Fd
8rxVL4JYeDq3bRpHlDQhiPejOW1OnX9H5FkUz28Z38AMAECYGoQ6gIpCybBXNgl3
Ck+xlL7LeVw8S1ZwpZeNnCLG4qzbUDD6e879X0MtvskaDbE04RD68qWSZVgUD37k
A/zIJdP2hJNnNdXr5nXn9EqF+hIfndUNnBUjtAp8yJm6PJSOGac5fDk34DD8crM8
/1/bwyGrGjSfALxL78dZjSDK3LFa/q6llKqoCFf+oxpcNnevuf13ZWyYeM7ol6lC
q8j6lvNCpDdvCULmnNaTUF2wOpyGKwwFfsiFawhDZf86IqJ44FvDo0ybgbS7IkeO
UdAjInzFovVJ0jGmKAY5B2Saic8Aem21Z4PAerOfkMAvxGE6P0QvSHPnCMcfWbtI
dFVBSG6vSpM02Htwn1yU+a99qMRN2n13xedPq0SfZTGM0sCFecCaNU8jpQ9hqBwv
PEREXZGsaG8JIAESxuM3
=V/+z
-----END PGP SIGNATURE-----
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Here you find quite a few changes for HD-audio and a copule of quirk
additions for USB-audio. All reasonably small and/or trivial."
* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix power-map regression for HP dv6 & co
ALSA: hda - Initialize caches at codec reconfiguration
ALSA: hda - Fix memory leaks at module unload
ALSA: hda - Fix memory leaks in Realtek & Conexant codec parsers
ALSA: hda - Add Realtek ALC280 codec support
ALSA: hda - Remove obsoleted CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS
ASoC: wm8994: remove duplicate code
ALSA: usb-audio: add BOSS GT-100 support
ALSA: HDA: Add inverted internal mic quirk for Lenovo S205
ALSA: hda - Fix ALC272X codec detection
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam Pro for Notebooks
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam E3500
The recent fix for power-map controls (commit b0791dda81) caused
regressions on some other HP laptops. They have fixed pins but these
pins are exposed as jack-detectable. Thus the driver tries to control
the power-map dynamically per jack detection where it never gets on.
This patch adds the check of connection and it assumes the no jack
detection is available for fixed pins no matter what pin capability
says.
BugLink: http://bugs.launchpad.net/bugs/1013183
Reported-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull media fixes from Mauro Carvalho Chehab.
Trivial conflict due to new USB HID ID's being added next to each other
(Baanto vs Axentia).
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (44 commits)
[media] smia: Fix compile failures
[media] Fix VIDIOC_DQEVENT docbook entry
[media] s5p-fimc: Fix control creation function
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
[media] s5p-mfc: Fix setting controls
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
[media] v4l/s5p-mfc: corrected encoder v4l control definitions
[media] v4l: mem2mem_testdev: Fix race conditions in driver
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
[media] cxd2820r: Fix an incorrect modulation type bitmask
[media] em28xx: Show a warning if the board does not support remote controls
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
[media] USB: Staging: media: lirc: initialize spinlocks before usage
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
[media] bw-qcam: driver and pixfmt documentation fixes
[media] cx88: fix firmware load on big-endian systems
[media] cx18: support big-endian systems
[media] ivtv: fix support for big-endian systems
[media] tuner-core: return the frequency range of the correct tuner
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
...
This chip looks very similar to ALC269 and ALC27* variants. The bug reporter
has verified that sound was working after this patch had been applied.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1017017
Tested-by: Richard Crossley <richardcrossley@o2.co.uk>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that the code duplication was added at a merge operation.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Lenovo Ideapad S205 has an internal mic where the right channel
is phase inverted.
BugLink: https://bugs.launchpad.net/bugs/884652
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The codec ALC272X is a special codec for some Dell machines, and its
detection got broken in the recent kernel because SSID check (required
by ALC272X check) was moved to the later point. Now we need to move
this codec check to the right place, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This webcam works mostly ok, exept with skype.
Skype sends lots of ctrl messages to dynamically ajust
record level. If for some reasons it pokes some error
every thing goes broken:
- first pulseaudio blocks sound for all apps
- then video is reseted
- then skype freez
dmesg has lots of messages like:
cannot set freq 16000 to ep 0x86"
Setting ignore_ctl_error=1 fixes this problem.
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
if this cam is pluged in, pulse audio can't initiate capture
device.
dmesg has lots of messages like:
"cannot set freq 16000 to ep 0x86"
Setting ignore_ctl_error=1 fixes this problem.
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This addresses an issue encountered when a pcm is opened while
transitioning to low power state (codec->power_on == 1 &&
codec->power_transition == -1). Add snd_pcm_power_up_d3wait to
hda_codec. This function is used to power up from azx_open as opposed
to snd_hda_power_up used from codec_exec_verb. When powering up from
azx_open, wait for pending power downs to complete, avoiding the power
up continuing in parallel with the power down on the work queue.
The specific issue seen was with the CS4210 codec, it powers off the ADC
and DAC nid in its suspend handler. If it is re-opened before the
~100ms power down process completes, the ADC and DAC nid are initialized
while powered down and audio is lost until another suspend/resume cycle.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix a bogus sanity check for sync pipe in pcm.c. This flaw was
introduced during the streaming logic refactorization.
While at it, improve the error messages that are generated in such cases.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: <ben@b1c1l1.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
All driver specific and fairly small. The pxa-ssp changes are larger
than I'd like but they're build failures and are pretty clear to
inspection.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP3kOeAAoJEBus8iNuMP3dpf0QAJLZjq1Ttzcm2ZrtYkr6edgm
axHhApj6ptOlLqb16zCJ+zjgmjUy/GteJg766KZqAkvMJxWSPRaPr/aTQnWlxUAE
CU/WjdywbVPKIkn5/r+jpEOifsHNTzj14/gF1Cn9V+58pN6YgflmfElV2vFe3rdX
IrNxGfRBHDgHwqDbHTi2OL8xUTE4oJnnhQZxk7FcsYKiwpwB2hVkbrTTKGNBPL4d
DoV8Xcy+Zb12iDQwh9BvzYAznQTQwCjGsF11UVAb0ChTV14XExQTABNZnAL3hgfj
AhBtm/coDmym61AvQMddsbg8Hrlp/d9Qzmr+0Fxj9HBb+SGVt9XlHY3ETePBM4hQ
wIjhedCed4Pv/Jb9IYDzQ1wJD/9iDG+Xuyj1iQC1QQKaoKg6eI9QgTLoVwRHCssg
DVTzFPOFEFiIfI+eH2cLyZZZlWL1LDbeVmH+KvWthb6+mbfOXo/VPlely2Odl+b7
NErfdjbggoc4Oy8o4Lo0XMb/6HxE7tHd/AzbKHdeHjNk8BCn5NCrdOLSuJb3xrr5
8fLP/0T9Z955R6YsHNg88rhQ74QhWSLGvs9TjUw7sRHN9xkC4gQIwcJ5i0dZcXjC
zIdP0Lj8XB0FdDGYNALdy2B48jU1uKs0cGW+xV/Z0uA0QllB0pfFy+O49z+jRKzJ
d/cIeM8hsxyOHWS4y+BJ
=67R8
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for 3.5
All driver specific and fairly small. The pxa-ssp changes are larger
than I'd like but they're build failures and are pretty clear to
inspection.
During the split to the auto-parser helper functions, the actual call
of init verbs was lost.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43366
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pin 0x1b was connected to the front panel connector, which according to
the HDA standard should contain a mic and a headphone. In this case,
the headphone was listed as "line out" by BIOS.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/993162
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
as the start can be called after stop again, we need to reset state
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
during pause the core should maintain the status-quo on the device and pointers
and not wake up. If app needs it should call DROP explcitly.
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If mic detect is left enabled and the WM8903 detects a status change,
the WM8903 driver will make a callback against the free()d jack, which
will cause a crash.
This problem can be triggered by fully initializing an audio card, then
removing and re-inserting the machine driver module.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Before this patch the owner field of the /dev/radio# device fops was set to
the snd-tea575x-tuner module itself. Meaning that the module which was using
it could be rmmod-ed while the device is open, and then BAD things happen.
I know, as I found out the hard way :)
Note that there is no need to also somehow increase the refcount of the
snd-tea575x-tuner module itself, since any drivers using it will have
symbolic references to it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
My EU/US 5757 cannot tune below approx 86 Mhz, that is below that it
does not even generate the standard not tuned to anything radio noise anymore,
so clearly the 5757 cannot tune to the Japanese frequencies. This patch
assumes that likewise the 5759 cannot tune to the EU/US frequencies.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The PCI ID entries of Creative SoundCore3D HD-audio controllers should
be before the wildcard for vendor = Creative.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If we don't have control over the LDO but do have control over the other
regulators then we may end up trying to write to a powered off device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We're using demv_regulator_bulk_get() so don't need to manually free and
this is in the CODEC driver not the I2C driver anyway.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We should be using the regmap API consistently for all the cache only
configuration and we should be going cache only before we power down
the supplies.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We no longer have a flat ASoC cache so can't peer directly into the array
any more but should instead use the register I/O functions to update the
cache.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org (v3.4)
pxa-ssp.c uses API like cpu_is_pxa3xx(), cpu_is_pxa2xx(), which is
defined under arch-pxa architecture, and drivers under mach-mmp
can't find it. so just use ssp->type to replace that API.
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When VGA_SWITCHEROO support is enabled hda_intel initialises the HDMI
audio device on the current VGA device. When it's not enabled it only
initialises the HDMI device on the default VGA adaptor, this means
secondary cards get no audio support which is very unhelpful for
multi-seat!
With this patch, when SUPPORT_VGA_SWITCHEROO is disabled hda_intel
initialises all HDMI audio devices, not just the default VGA.
[minor optimizations by tiwai]
Signed-off-by: Steven Newbury <steve@snewbury.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When VGA-switcheroo is built in but unused on systems with multiple
graphics cards, the initializations of non-default graphics cards are
skipped and never enabled (because the switcheroo is activated only
when the controller supports). The current behavior is for avoiding
the system lockup by accessing the disabled GPU, but due to the recent
change in VGA-switcheroo, it determines the state simply by checking
with the default VGA device. This is the culprit.
Now with the new vga_switcheroo_get_client_state(), we can know the
initial state of the bound GPU, thus can determine the initial audio
client state more correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In 3.5 kernel, the endpoint is assigned dynamically for the
substreams, but the PCM assignment still checks the presence of the
endpoint pointer. This ended up in duplicated PCM substream creations
at probing time, resulting in kernel warnings like:
WARNING: at fs/proc/generic.c:586 proc_register+0x169/0x1a6()
Pid: 1152, comm: modprobe Not tainted 3.5.0-rc1-00110-g71fae7e #2
Call Trace:
[<ffffffff8102a400>] warn_slowpath_common+0x83/0x9c
[<ffffffff8102a4bc>] warn_slowpath_fmt+0x46/0x48
[<ffffffff813829ad>] ? add_preempt_count+0x39/0x3b
[<ffffffff811292f0>] proc_register+0x169/0x1a6
[<ffffffff8112962e>] create_proc_entry+0x74/0x8c
[<ffffffffa018eb63>] snd_info_register+0x3e/0xc3 [snd]
[<ffffffffa01fde2e>] snd_pcm_new_stream+0xb1/0x404 [snd_pcm]
[<ffffffffa024861f>] snd_usb_add_audio_stream+0xd2/0x230 [snd_usb_audio]
[<ffffffffa0241d33>] ? snd_usb_parse_audio_format+0x252/0x34f [snd_usb_audio]
[<ffffffff810d6b17>] ? kmem_cache_alloc_trace+0xab/0xbb
[<ffffffffa0248c29>] snd_usb_parse_audio_interface+0x4ac/0x567 [snd_usb_audio]
[<ffffffffa023f0ff>] snd_usb_create_stream+0xe9/0x125 [snd_usb_audio]
[<ffffffffa023f9b1>] usb_audio_probe+0x62a/0x72c [snd_usb_audio]
.....
This patch fixes the regression by checking the fixed endpoint number
for each substream instead of the endpoint pointer.
Reported-and-tested-by: Jamie Heilman <jamie@audible.transient.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This allows the module to automatically load when instantiated from
device tree.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rather than having varying timeouts depending on the transition always
use a 4s timeout. This provides better diagnostics for clocking errors
and ensures compatibility with current calibration firmwares.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We should only add source widgets to the input list.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Make sure that the dpcm_get_be() only returns BE DAI links.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Volume updates may not be acted upon if there is no clock applied when
the volume update is written. Ensure this doesn't happen by writing out
registers with volume updates after we enable each of the clocks.
There are more registers updated than before as previously we were
relying on wm_hubs to set those for controls it manages.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Ensure that all the actions get taken at appropriate times by calling the
_PRE and _POST events for the aifNclk_ev functions explicitly.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Make sure we check the correct path for capture.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>