ALC268 has different NIDs from ALC262. Acer model should use NID 0x02 and
0x03 instead of 0x0c and 0x0d for the master volume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The number of mixer elements for SPDIF control don't match with the
actual array size (3). This may result in a memory corruption that
overwrites the i2c_capture_source field (ALSA bug#3095).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the support for Macbook Pro rev3 with ALC885 codec chip.
The patch taken from ALSA bug#3242.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fixed the double entries in the model presets.
Toshib A135 prefers model=lenovo rather than dallas.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added auto-mute function with HP jack to Sony VAIO laptop with STAC9872
codec. The patch taken from ALSA bug#3275.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Remove the superfluous code that's actually not used at all.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix power-management on ALC885 Intel Macs.
It fixes the problem with power-saving mode, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added model=acer for ALC268 codec support.
The configuration is: headphone = 0x14, speaker = 0x15
needs hp-jack auto-detection. The same routine as alc262-fujitsu model
is used.
Also, added the auto-muting routine for ALC268 model=toshiba.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
When CME keyboards send a SysEx message (e.g. master volume), the USB
packet uses a format different from the standard format. Parsing this
packet according to the specification corrupts the SysEx message itself
and can cause the following MIDI messages to be misinterpreted, too.
This patch adds a workaround for this case.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Use the bind-control for NID 0x1a and 0x1b as Master volume control
on AD1986 model=laptop as well as model=laptop-eapd. This will fix
the missing output on some devices.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added flush_scheduled_work() in snd_hda_codec_free() to make sure that
the all work is gone. Also, optimized the condition to schedule the
delayed work in snd_hda_power_down().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the missing text entries and descriptions for the newly added
model values for Realtek codec chips.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the support for Biostar NF61S SE mobo with ALC861VD codec,
model=6stack-digout (ALSA bug#3190).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
1. Support Acer Aspire 9810
2. Support TOSHIBA A205
3. Support HP TX1000
Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Removed conflicting capture mixers for ALC861VD model=dallas.
It fixes the ALSA bug#3236.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
In the power-saving mode, the suspend is done dynamically at power-down.
So we don't have to call suspend stuff explicitly if it's already
powered down.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add a snd_pcm_rate_to_rate_bit() function to factor out common code used
by several drivers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Merge the rates[] arrays from pcm_misc.c and pcm_native.c because they
are both the same.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Set the SNDRV_PCM_INFO_SYNC_START flag and the substream's sync ID
(only) if the substream actually can be linked to another one.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add power_save_controller module option instead of define flag.
Also, added descriptions of new module options in ALSA-Configuration.txt.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Tested against a couple of different systems (with different pin
configs), but the others should also work. Also cleaned up some of the
9205 patch code.
Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The controller power wasn't turned on properly at resume due to the
power-saving patch. Now fixed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
isn't needed there. Upatched code uses:
memset(info, 0, sizeof(info));
where 'info' is a pointer and therefore only first 4 bytes of 'info' gets
cleared on a 32bit machine. Anyway looking at the code zeoring this memory
region isn't needed at all because the snd_emu10k1_fx8010_info() function
initializes all the 'info' fields on its own. So that's why this code works
at all in its original form.
This patch removes this redundant code. Also snd_emu10k1_fx8010_info() can't
fail so lets save some bytes and change its return type to void.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Update the documentation to reflect the last changes regarding the
power-saving mode and register caches.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added CONFIG_SND_HDA_POWER_SAVE kconfig. It's an experimental option
to achieve an aggressive power-saving. With this option, the driver
will turn on/off the power of each codec and controller chip dynamically
on demand.
The patch introduces a new module option 'power_save'. It specifies
the second of time-out for automatic power-down. As default, it's
10 seconds. Setting 0 means to suppress the power-saving feature.
The codec may have analog-input loopbacks, which are usually represented
by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'.
When these are on, we cannot turn off the mixer and the codec chip has
to be kept on. For bookkeeping these states, a new codec-callback is
introduced.
For the bus-controller side, a new callback pm_notify is introduced,
which can be used to turn on/off the contoller appropriately.
Note that this power-saving might cause slight click-noise at
power-on/off. Also, it might take some time to wake up the codec, and
might even drop some tones at the very beginning. This seems to be the
side-effect of turning off the controller chip.
This turn-off of the controller can be disabled by undefining
HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
We have already a generic bind-control helper, so let's clean up the codes
using it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits. It simplifies most of
amp-handling codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
So far, the driver looked the table of snd_kcontrol_new used for creating
mixer elements and forces to call each of its put callbacks in PM resume
code. This is too ugly and hackish.
Now, the resume is simplified using the codec amp and command register
caches. The driver simply restores the values that have been written
in the cache table. With this simplification, most codec support codes
don't require any special resume callback.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds the cache for codec command registers.
snd_hda_codec_write_cache() and snd_hda_sequence_write_cache() do
the write operations with caching, which values can be resumed via
snd_hda_codec_resume_cache().
The patch introduces only the framework, and no codec code is using
this cache yet. It'll be implemented in the following patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Rewrite the code to handle amp cache and hash tables to be more
generic. This routine will be used by the register caches in the
next patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Replace the direct calculation of jiffies with msecs_to_jiffies().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch uses the Kconfig parameters SND_AD1848_LIB and
SND_CS4231_LIB instead of mentioning each driver that requires
the ad1848-lib or cs4231-lib separately in the Makefiles.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Check for a valid event type when encoding a system real-time message to
prevent the bytes F9 or FD resulting in an empty sequencer message.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Reorganize the encoder logic to prevent status bytes that appear where
data bytes are expected from being interpreted as data bytes.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Reset the event type after encoding a system message to prevent any
following data bytes from being interpreted as data for a running status
system message, which is not allowed in MIDI.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Create a new state ST_INVALID for the encoder to prevent data bytes at
the beginning of a stream or after a sysex message being interpreted as
note-off parameters.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
(bugtrack #2932). The interface is two USB devices in the same physical
box. Note that this is the USB ScratchAmp v1 and not the later v2
(firewire) model.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The recent OSS includes the support for 32bit and other formats, which
we already have, too. Let's define and map them.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add the support of 3-bytes 24bit formats in PCM OSS emulation.
Also removed snd_pcm_build_linear_format() function. It's exported
just for OSS emulation, and now the code was changed without calling
this function.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Simplify the format conversion code in PCM OSS emulation.
This patch also adds the support of 3bytes 24bit formats with linear
and mulaw, but they are not enabled in pcm_plugin.c yet.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix Makefile to compile files conditionally to CONFIG_SND_PCM_OSS_PLUGINS,
and remove unneeded ifdefs in these files.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>