Extend the existing auto-parser for CX2064x for cxt5051 codec.
Now the auto-parser supports ADC-switching for this codec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of keeping always EAPD on, turn on/off appropriately at jack
plugging in Conexant auto-parser mode.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Autodetect TEA575x tuner connection type during init. This allows tuner to
work out-of-the box.
tea575x_tuner module parameter remains functional to force tuner type.
Tested with SF256-PCP and SF64-PCR.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.
Also convert the original triple implementation to a simple GPIO pin map.
Tested with SF256-PCP and SF64-PCR (added the GPIO pin for MO/ST signal
for them).
SF256-PCS untested (pin for MO/ST signal is a guess).
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.
Tested with SF64-PCE2 card.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AMD chipsets often behave pretty badly regarding the DMA position
reporting. It results in the bad quality audio recording.
Using position_fix=3 works well in general for them, so let's enable
it as default for AMD.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Renamed to Digial SRC Capture Switch for more correct representation.
Also fixed analog volume control on Lola161611 and lola881.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For assuring the synchronized state with the pause operation,
loop over the all linked streams and waits until all get ready
in a loop.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the refcounting for the exclusive SRC control.
Also, fixed the possible stall after PCM pause operations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added granularity and sample_rate_min module options.
The former controls the h/w access granularity. As default, it's set
to the max value 32.
The latter controls the minimum sample rate in Hz, as default 16000.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use a single BDL for both buffers instead of allocating for each.
Also a few tune-up to avoid the stream stalls in the PCM code and
the prelimianry work for SG-buffer support are added, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The codec proc file becomes a read only that shows the codec widgets
in a text form. A new proc file, codec_rw, is introduced instead for
accessing the Lola verb directly by reading and writing to it.
Also, regs proc file shows the contents of DSD, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added a new driver for supporting Digigram Lola PCI-e boards.
Lola has a similar h/w design like HD-audio but with extended verbs.
Thus the driver is written similarly like HD-audio driver in the bus
part. The codec part is rather written in a fixed way specific to the
Lola board because of the verb incompatibility.
The driver provides basic PCM, supporting multi-streams and mixing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix NULL-dereference when try to use alt_playback since those codecs
which support multistreaming playback usually have more than 1 adc but
the driver should create alt_capture when spec->stream_analog_alt_capture
is also defined.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The check of chained fixup list entry was done against the wrong element.
A stupid mistake during refactoring.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit c6b358748e.
It turned out that there are different pin configurations for this
PCI SSID, including multi-channel modes. And more proper fix for
allowing line-out mutes will come up in 2.6.40 tree, so we won't need
this fixup any more there.
Reported-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The PCI SSID is 1025:031c and the codec SSID is 1025:031d,
so the driver mistakes this for a SKU value, but looking at
the numbers, this is obviously wrong.
Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/761861
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
PC Beep was not being reported as enabled on my EeePC 901:
SKU: enable_pcbeep=0x0
Signed-off-by: Daniel Cordero <danielcordero@lavabit.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Auto-Mute Mode control is useful even when only two outputs
(e.g. HP and speaker) are available. Then user can enable/disable
the auto-mute behavior on the fly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
By popular demands, I add the functionality to mute / unmute the
line-out jacks per the headphone plug / unplug. For achieving this
and keeping the compatibility with the old behavior, the new mixer
enum "Auto-Mute Mode" is added. With this, user can control the
auto-mute behavior either disabled, speaker-only or lineout+speaker.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Yet another consolidation of auto-mute functions for the devices
controlling the output muts together with the master mixer switch,
typically found for ALC262 machines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the common helper function and flags to support the auto-mute
per line-out jack detection, and also the mute of line-out jacks.
A few model-specific implementations are replaced with the common
helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some models do mute on/off the connected mixer widget for the automatic
muting, instead of controlling the pin widget itself. This patch adds
the implementation of such type of auto-mute in the common helper
function, and reduces the redundant codes for each model preset.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There are two entry points for the headphone automute functions for
Realtek, alc_automute_amp() and alc_automute_pin(). These call the
same function in the end, so we can basically consolidate these
with a flag in spec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In notify_aa_path_ctls(), adds 'rear mic' item and confirms the A-A
path control existing before notifying card that the A-A path volume
is muted if smart5.1 is enabled.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This allow application such as gstreamer and wine which use
snd_pcm_hw_params_set_buffer_time_near() won't fail any more
since sound chips require special containt power 2 period bytes
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the support of "Channel Mode" enum control to Realtek
auto-parser. When line-in or mic-in jacks are capable to output and
free DACs are available, the driver allows to switch to multi-channel
mode via "Channel Mode" enum switch, as already implemented in some
preset cases.
Not implemented in all Realtek codecs. Currently, ALC880, 882, 861,
662 and the compatible codecs are supported.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow alc662_dac_to_mix() and alc662_look_for_dac() to parse
down the selector widget that is found in ALC880-type codecs,
and rename them to alc_auto_*() accordingly.
This is for the next coming multi-io extensions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For some motherboards with 5 or 6 audio jacks which had six or eight multiple
channels output, smart5.1 item is no useful and should be removed.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs. So, it's better to activate it
generically in hda_intel.c from the beginning.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
EAPD power-down should be called also for normal shutup cases.
Let's move to there. This also fixes the compile warnings when
CONFIG_PM isn't set automatically.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The AMD chipset seems unstable in the normal operation mode, and it
seems requring more sensible access for each verb. Enabling sync_write
mode and allowing bus-reset is a sort of workaround for these chipset
stability issues.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When SND_HDA_NEEDS_RESUME is not defined, the compiler identifies that
the following symbols are static but not used:
restore_shutup_pins
hda_cleanup_all_streams
Fix warnings by adding SND_HDA_NEEDS_RESUME guards.
Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the HD Audio Controller DeviceIDs for the Intel Panther Point PCH.
Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This was reverted mistakenly in the recent update patch.
Fixed again.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove "Front Playback Volume" and "Front Playback Switch" from emu10k1 only
for STAC9758/59
Since commit 7eae36fbd5
"Fix the confliction of 'Front' control",
the "Front Playback Volume" control created by commit
edf8e4565c
"emu10k1: Front channels via fxbus 8 and 9"
was removed
"Front Playback Volume" and "Surround Playback Volume" have same dB range
since I2S DAC of SB Live! and SB Live! Platinum does not has any hardware
volume control.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acer laptops with ALC271x needs a magic initialization for digital-mic
to make it working with mono streams (and PulseAudio).
Added a fix-up applied to Acer with ALC271x generically.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Don't query connections for widgets have no connections
ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
ALSA: HDA: Fix dock mic for Lenovo X220-tablet
ASoC: format_register_str: Don't clip register values
ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
ASoC: zylonite: set .codec_dai_name in initializer
The connection lists are static and we can reuse the previous results
instead of querying via verb at each time. This will reduce the I/O
in the runtime especially for some codec auto-parsers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since we now set up the connections and mutes dynamically in the
auto-parser, all static initializations via alc662_init_verbs & co are
no longer needed. Let's drop them.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically. This fixes the
uninitialized mixer 0x0f on ALC892.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In cases where there is only one internal mic connected to ADC 0x11,
alc275_setup_dual_adc won't handle the case, so we need to add the
ADC node to the array of candidates.
Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/752792
Reported-by: Vincenzo Pii
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The MCP7x hardware computes the audio infoframe channel count
automatically, but requires the audio driver to set the audio
infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum
control verb.
When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum
to (0x71 - chan - chanmask). For example, for 2ch audio, chan == 1
and chanmask == 0 so the checksum is set to 0x70. When audio playback
finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the
channel formats, causing the channel count to revert to 8ch. Since
the checksum is not reset, the hardware starts generating audio
infoframes with invalid checksums. This causes some displays to blank
the video.
Fix this by updating the checksum and channel mask when the device is
closed and also when it is first initialized. In addition, make sure
that the channel mask is appropriate for an 8ch infoframe by setting
it to 0x13 (FL FR LFE FC RL RR RLC RRC).
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add shutup callback to be called codec-specifically for avoiding pop
noises at suspend or shutdown. As a generic callback, just turn EAPD
off.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, alc662_init_verbs[] is used for all ALC662-compatible chips,
but the EAPD controls for 0x15 in there is invalid for ALC892.
Also, since EAPDs should be set up in alc_auto_init_amp(), these static
elements aren't needed for auto-parser, too.
In this patch, the EAPD init verbs are split from alc662_init_verbs,
and applied only to static quirks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current alc662 parser doesn't set the DAC for the mixer 0x0f
properly for ALC892, which has 4 DACs while ALC662 has 3.
Fixed by implementing alc662_mix_to_dac() more genericly with the
dynamic widget list.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some ALC272-quirks use alc662_dac_nids instead of alc272_dac_nids.
This patch fixes these entries. No functional change since the first
two elements are identical in both arrays.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SB Live! Platinum CT4760P is just a 4 channels sound card with STAC9721 and
Philips UDA1334 DAC.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alc662 series only have 3 DAC, so it can only support 5stack-dig
instead of 6stack-dig.
[updated HD-Audio-Models.txt as well by tiwai]
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove some unneeded defintions
Use %pR to print resources
Make some data const
Consistent braces for else
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Define and use pcm_debug_name if CONFIG_SND_DEBUG
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow older non DMA capable cards to use MMAP by
emulating the DMA using read and write functions,
and getting rid of copy & silence callbacks that
were used only by older cards.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the card drained status reporting for playback,
but allow it to persist for a few timer cycles before
signalling XRUN, to allow card to recover by itself.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clock source is neither capture nor playback,
so change 'Capture Clock' to 'Clock'.
Add spaces to control name string for consistency,
always 'PCM 0' , never 'PCM0'
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>