Comment in hda_intel.c states that 'the explicit resume is needed only
when POWER_SAVE isn't set', but this is not true.
There is no code that will automaticly power up the codec on resume,
but only code that powers it up when user accesses it. So if user
leaves a sound playing, codec will not be powered
To fix that I check if there are any codecs that should be powered
codec->power_count, and if so I power them up together with main
controller.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
codec->power_transition is supposed to be true while codec is going
to be shut off if in the mean time somebody calls snd_hda_power_up,
hda_power_work will not shut down the codec, but nether will clear
codec->power_transition, thus it stays on forever. Fix this.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The '-MCx' suffix that is expected by alsa-lib is only needed in the
card driver string, so we can show the actual chip name in the
shortname.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Check that the UART_EN bit actually enabled the MPU-401 port.
Apparently, C-Media thinks that it is a good idea to be paranoid here.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Integrated MPU-401/OPL3 ports are available with chip version 39 and
later, so we do not test for the port with version 37.
Now that the test is known to work, we can again enable the MIDI port by
default.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add support for 88.2 kHz and 96 kHz analog and digital playback on
CMI8768/CMI8770 chips.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Remove the constraint that sets the channel limit for the first playback
device to that of the second one; the first device supports only stereo.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The STAC codes adds line_out_pins[] for shared mic/line-inputs accordingly.
But, the current code may give a hole with NID=0 in some setting, which
results in an error at probe. This patch fixes the problem.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The resume procedure for STAC codecs overrides the cached values and
results in the wrong (reset) PIN state. The patch gets rid of the
overriding part and simplifies the resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Clean up the mixer entries for Input Source using a macro.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix the index for Front Mic capture source on ALC262 HP machines.
Also, added the new capture source list for HP BPC DC7000 series
to work properly.
From: zhejiang <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
added support for the latest revision of the 9632 (and hopefully a few
following ones). The DSP matrix was not working because of wrong
identification of the card in this part of the code.
Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* better report of speed mode change failures
* autosync_ref control bugfix (was reporting pref_sync_ref instead)
(changed HDSPM_AES32_AUTOSYNC_FROM_NONE value to comply with array
indexing in snd_hdspm_info_autosync_ref())
* added support for master modes up to 192kHz (clock source control
value was restricted up to 96kHz)
Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
On codec chips with both audio and modem functions (e.g. Conexant one),
performing AC97_RESET resets the whole registers. When both audio and
modem drivers are resumed at the same time, the modem one often is
resumed after the audio, and it results in the reset of audio registers
(ALSA bug#3333).
This patch fixes such a problem. Since the modem codec basically
doesn't need AC97_RESET, skip this initialization unless specified
as audio.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Some codecs need Mic Boost mixer controls for obtaining a proper recording
level, but the auto-configuration doesn't create them.
This patch adds the creation of mic-boost controls on corresponding codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
vmalloc() returns void *. no need to cast.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Show the actual name of CMI8762/CMI8768/CMI8769/CMI8770 chips in the
card longname instead of just using 'CMI8738' for all of them.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Remove the has_dual_dac variable because it was always set.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add a case for chip version 39 where no bit is set in register 0Ch, and
move the detection of version 39 before that of 8768. This makes the
logic more compatible with the driver on that other OS.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Unused bytes in the I/O register range are likely to have the value 0x00
instead of 0xff, so test against both values when checking for the
presence of the integrated MIDI port.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fixed Dell laptops support with STAC92xx codecs.
Many pin-config models are introduced. See ALSA-Configuration.txt
for details.
The patch taken from ALSA bug#3319, originally by Jorg Prante:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3319
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The unsol event of ALC268 is in the standard bit 26.
Also, fixed the Acer master controls, and added Extensa 5210
to the quirk list.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fixed the master mixer switch of ALC272 sony-amd model.
It used a simple bind-control, but it resulted in unexpected
unmute of speaker output. Now the control checks the HP jack
state apropriately, just like fujitsu model.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
gcc-3.x doesn't like forward inlining:
CC [M] sound/pci/hda/hda_codec.o
sound/pci/hda/hda_codec.c: In function 'snd_hda_codec_free':
sound/pci/hda/hda_codec.c:517: sorry, unimplemented: inlining failed in call to 'free_hda_cache': function body not available
sound/pci/hda/hda_codec.c:534: sorry, unimplemented: called from here
sound/pci/hda/hda_codec.c:517: sorry, unimplemented: inlining failed in call to 'free_hda_cache': function body not available
sound/pci/hda/hda_codec.c:535: sorry, unimplemented: called from here
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the PCI ID entries for known working devices
- Prolink PixelView PV-M4900
- Pinnacle Studio PCTV rave
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Make sure that the MPU-401 MIDI and OPL-3 FM devices are used only on
those chips where they are supported, and that the correct port
addresses are used.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Initialize card->shortname early enough so that the MIDI device can pick
it up and does not need to have a generic name.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Some Fujitsu laptops have SPDIF output jack (ALSA bug#3009).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the black-list of probe_mask option to set the default value for
known non-working devices. Currently, Thinkpad *60 and *61 series are set.
I'm afraid more will be added to the list in near future...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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>
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>
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>
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 adds support for some Acer Aspire systems.
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>
This patch adds support for Dell E520 and a couple of other 965 based systems.
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>
In sound/pci/au88x0/au88x0.c::snd_vortex_create() :
The Coverity checker found that if we allocate storage for 'chip'
but then leave via the regions_out: label, then we end up leaking
the storage allocated for 'chip'.
I believe simply freeing 'chip' before the 'return err;' line is
all we need to fix this, but please double-check me :)
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Some functions in hda_codec.c are called from patch ops, which are
kept in the codec instance even after initialization. Thus they
shouldn't be marked as __devinit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix missing cast:
sound/pci/hda/hda_hwdep.c:86: warning: passing argument 4 of 'hda_hwdep_ioctl' makes integer from pointer without a cast
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds ALC861VD support for the ASRock K8NF6G-VSTA motherboard.
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>
It is possible to have linked substreams that belong to different cards
and/or different drivers. This patch changes some drivers to make sure
that they do not incorrectly try to handle substreams of a different
card.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Create kernel configs to choose the codec support codes to build.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added callbacks for a generic bind-control of mixer elements.
This can be used for creating a mixer element controlling multiple
widgets at the same time. Two macros, HDA_BIND_VOL() and HDA_BIND_SW(),
are introduced for creating bind-volume and bind-switch, respectively.
It taks the mixer element name and struct hda_bind_ctls pointer, which
contains the real control callbacks in ops field and long array for
private_value of each bound widget.
All widgets have to be the same type (i.e. the same amp capability).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added a hwdep interface for each codec (enabled per kconfig).
This interface can be used for reading/writing HD-audio verbs
and other purposes as future extensions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix codes to follow more to the standard kernel coding style.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix codes to follow more to the standard kernel coding style.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Clean up Makefile using xxx- style instead of
ifeq(CONFIG_XXX,y).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Many of ALC262 codes don't call the automute function at the beginning,
which may keep the silence until the HP jack is replugged. Now proper
init_hook is added.
Also, sony-assamd model doesn't handle the widget 0x14 properly, thus
calling automute isn't enough. Now Front switch handles both widgets.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The init sequence set a number of registers more than once to different
values. It's only necessary to set them once to their final values.
It also never actually updated the digital attenuation settings.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add more symbol name for SPI register values. Change the SPI_XXX_BIT defines
from the bit number to a mask. Saves having to write (1<<SPI_XXX_BIT) all the
time to convert to mask. We never end up wanting the bit number.
Use all the symbol names for the SPI DAC init sequence. The sequence is
exactly the same as it was before.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
For cards with an SPI DAC (SB Live 24-bit / Audigy SE), power down channels
0-2 when not in use. They are powered up on PCM open and down again on PCM
close. Channel 4 (== Front) is not powered down, as it is used for capture
feedback. Powering it down would effectively kill line in pass-through.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The SPDIF output on AD1988 had some problems due to the wrongly routed
analog loopback to SPDIF. This patch fixes the implementation of
'IEC958 Playback Source' mixer to handle the amp bits of mixer widget
0x1d correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Turn a rather long lined for loop that is duplicated multiple times into a
macro.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add four mute controls for the analog output channels for cards that use
an SPI DAC, like the SB0570 SB Live! 24-bit / Audigy SE. The Wolfson DAC
doesn't support muting left/right so the controls are mono.
The chip state struct gets a 32-byte array to act as a shadow of the spi
dac registers. Only two registers are used for mute, but more would be
needed for analog gain, de-emphasis, DAC power down, phase inversion, and
other features.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch fixes an off-by-one in a snd_assert() spotted by the
Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
There were some places I forgot to replace with snd_ctl_boolean_mono_info.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Patch submitted by Ctirad Fertr
<c.fertr@volny.cz>
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The existing code for handling the 44.1 slot's volume has two problems:
the volume is not affected by the 'Wave Playback Volume' mixer control,
and the BUF441OUTVOL register, which is used to control the per-
substream volume for this slot, uses a different scale than the gain
fields of the other slots.
This patch makes the BUF441OUTVOL register a shadow of the
NATIVEDACOUTVOL register so that the Wave volume is consistent for all
substreams.
As a consequence of this, the per-substream PCM volume control gets no
longer activated for the substream using this slot. The code for
(de)activating the mixer control is moved from the open/close to the
prepare/trigger_stop callbacks so that it is able to determine the
substream's slot.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>