The loader API has been revised so that OS specific data is kept
local to hpidspcd.c, and the public API is unchanged across OSes.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some cobranet control data would not fit in an original HPI message.
Now that HPI is able to transfer larger messages, this special handling
is no longer required.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow for up to 256 bytes of extra data on top of standard hpi
request and response sizes.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Having a 'request message' makes more sense than a 'message message'
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for Roland/BOSS BR-800 (0582:011e) to snd-usb-audio driver.
This allows playback and recording, which has been tested and found to
work. The third interface should be MIDI (MTC/SMPTE?) for DAW interface
and is set as per ME-25, but this has not been tested. SDHC card access
is already supported by usb-storage for Backup/Rhythm Editor/Wave
Convertor mode which should not conflict with this.
Signed-off-by: David G Turner <dgturner@iee.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes non-working indep-HP control on VT1708* codecs.
The problems are that via_independent_hp_put() wasn't fixed to follow
the recent change of three HP paths, and hp_indep_path didn't contain
the amp nids of mixer elements.
Together with the fixes, a few code clean-ups are done.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In preparation for ASoC Dynamic PCM (AKA DSP) support.
Provide convenience methods to retrieve the soc_card or snd_card from a
DAPM context.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
I2S in Exynos4 and S5PC110(S5PV210) has a internal dma.
It can be used low power audio mode and 2nd channel transfer.
This patch can support idma.
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Previously, I2S driver only can support system dma.
In this patch, i2s driver can support internal dma too.
IDMA h/w configuration is initialized on idma.c
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In davinci_vcif_trigger() function, a break() statement was missing
causing the davinci_vcif_stop() function to be called as a fallback
after calling davinci_vcif_start().
Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
According to DM365 voice codec data sheet at [1], before starting
recording or playback, ADC/DAC modules should follow a reset and
enable cycle. Writing a 1 to the ADC/DAC bit in the register resets
the module and clearing the bit to 0 will enable the module. But the
driver seems to be doing the reverse of it.
[1] http://focus.ti.com/lit/ug/sprufi9b/sprufi9b.pdf
Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
This closes the small race between a status being read in response to an
interrupt and clearing the interrupt, meaning that if the status changes
between those periods we might not get a reassertion of the interrupt.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Print a hint when the user has a setup where CONFIG_REGULATOR is really
needed to make the driver work.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Dong Aisheng <b29396@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The code for registering the internal ldo was present twice. Turn it
into a function instead. Also, inform the user if LDO is used now.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Dong Aisheng <b29396@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In one comment, cpu_dai was mentioned although codec_dai was used in the
code. Also, fix the name for the card dai list which has no seperation
into card_dai and codec_dai.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since quite a few drivers are not managing to flag the cache as needing
to be resynced after suspend and it's a reasonable thing to do flag the
cache as needing sync automatically when suspending.
The expectation is that systems will mainly only keep the CODEC powered
when doing audio through the CODEC so we won't actually suspend the
device anyway; drivers which want to can override this behaviour when
they resume.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
This patch changes the behavior of independent-HP enum switch. Now
instead of returning a busy error, the driver switches dynamically the
stream of the HP (and shared) DACs according to the current mode.
The logic is similar like the dual-mic ADC switch, but a bit more
complicated because of the presence of shared DAC.
Together with the change, a mutex is introduced to protect against the
possible races for the indep-HP mode setting.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the dynamic control of analog-loopback for VIA codecs.
When the loopback is enabled, the inputs from line-ins and mics are
mixed with the front DAC, and sent to the front outputs. The very same
input is routed to the headhpones and speakers in loopback mode.
However, since the loopback mix can't take other than the front DAC,
there is no longer individual volume controls for headphones and
speakers. Once when the loopback control is off, these volumes take
effect.
Since the individual volumes are more desired in general use caess, the
loopback mode is set to off as default for now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit dd203fa97b (ALSA: virtuoso: remove non-working controls on
Essence ST Deluxe) made it impossible to adjust the volume after the
driver initialized it to muted.
Ensure that those DACs that can be accessed with I2C are initialized
to the same volume that is the reset default of the DAC without I2C.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.38+ <stable@kernel.org>
The WM8994 and WM8958 series of devices have two MICBIAS supplies rather
than one, the current widget actually manages the microphone detection
control register bit (which is managed separately by the relevant API).
Fix this, hooking the relevant supplies up to the MICBIAS1 and MICBIAS2
widgets.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Makes life a little easier if you want to add subsequences to an existing
driver as you can use -1 to put things at the start of sequences.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If DAIs are idle but their clocks are in use for some reason (eg, as
SYSCLK or for accessory detect) then set the clock dividers to the maximum
to reduce slightly the power consumption of the unclocked circuits.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Not only fixes error handling but also some uninitialized variable
warnings.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Try the completion before we start the FLL so that if an interrupt was
delayed long enough for us to miss it we don't wait for the completion
it signalled.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8983 is a low power, high quality stereo CODEC
designed for portable multimedia applications. Highly flexible
analogue mixing functions enable new application features,
combining hi-fi quality audio with voice communication.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
BugLink: https://bugs.launchpad.net/bugs/774895
The original reporter states that his volume keys do not change the
desired Master and PCM mixer elements together, so apply the hp+mute led
quirk for his PCI SSID.
Reported-by: Jeffrey Finkelstein
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
During the rewrite, the check of spec->need_dac_fix and the corresponding
num_dacs change was dropped from the channel-mode control.
This patch re-adds it, and also enables need_dac_fix for ALC880 as default,
as this feature was originally introduced to fix h/w bugs of this chip.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We should spot them anyway on state changes but logging them gives us
better time information about when the misconfiguration happened.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Using 256fs or 512fs will result in distortion of 24-bit
audio samples. This is because the lrclk generated is not
proper. Using 384 fs generates proper output.
Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we have interrupts then wait for the FLL lock interrupt rather than
using dead reckoning when waiting for the FLL to start.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The individual devices should set the flag dcs_done_irq in the hubs
shared data structure to indicate that they will flag the interrupt
by calling wm_hubs_dcs_done().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This ensures appropriate clocking for bypass paths to speaker and
headphone and direct voice paths on affected revisions.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Chip documentation explicitly requires that the reset values
of reserved register bits are left untouched. It is possible
there are differences between STA326 and STA328 or future
chip revisions in these bits, and clobbering them might
cause malfunction.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The STA32x has a number of preset EQ settings, but also
allows full user control of the biquad filter coeffcients
(when "Automode EQ" is set to "User").
Each biquad has five signed, 24bit, fixed-point coefficients
representing the range -1...1. The five biquad coefficients
can be uploaded in one atomic operation into on-chip
coefficient RAM.
There are also a few prescale, postscale and mixing
coefficients, in the same numeric format and range
(a negative coefficient inverts phase).
These coefficients are made available as SNDRV_CTL_ELEM_TYPE_BYTES
mixer controls.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is a fix up for commit acfa634f.
commit acfa634f7e
Author: Takashi Iwai <tiwai@suse.de>
Date: Tue Jul 12 17:27:46 2011 +0200
ALSA: hda - Add Kconfig for the default buffer size
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch gives M-Audio Fast Track Pro and M-Audio Quattro quirks and
endpoints to boot and setup those devices with special options (digital
inputs and outputs, 24 bits mode, etc...). M-Audio Audiophile quirks are
just adapted to match the new global M-Audio parameters.
Special configurations can be then loaded through a modprobe conf file.
For example, to set the 24 bits mode on the Fast Track Pro add
/etc/modprobe.d/fast_track_pro.conf :
options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x08
Here is a list of the possibilities in this example :
http://files.parisson.com/debian/fast-track-pro.conf
Signed-off-by: Guillaume Pellerin <yomguy@parisson.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a Kconfig entry to specify the default buffer size.
Distros using PulseAudio can choose a larger value here.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1718S and co have a secret connection from DAC to AA-mix, which
doesn't appear in the connection list obtained from the h/w.
Currently the driver fixes the connection index locally at init, but
now we can expose it statically via snd_hda_override_connections()
so that this conection can be checked better by the parser in future.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the codec proc outputs, read the raw connections instead of the
cached connection list, i.e. proc files contain only raw values.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a function to add/modify the connection-list cache entry.
It'll be useful to fix a buggy hardware result.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some machines seem to use EAPD control of the unused pin for controlling
the overall EAPD. Since the driver currently doesn't check the EAPD of
unused pins, the EAPD isn't enabled. For avoiding such a problem, turn
all extra EAPDs on as default.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For smart51 pins, we need to preserve the input pin-control bits at
auto-mute controls instead of overwriting zero or pin-out-only.
Otherwise the VREF won't be set properly when smart51 is disabled
again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When Independent-HP mode is changed for VIA, the driver needs to
re-issue the auto-mute check so that the line-out pins are set properly
without influence of HP pin state.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the line-jack is plugged/unplugged, the driver must check also
the headphone jack state in addition to the line-out jack. Currently
it checks only the line-out state and ignores the headphone.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of checking the model quirk, use a fixup table for workaround
of 44kHz-fixed PCM for Lenovo IdeaPad with ALC269.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
it shouldn't contain space letters and
special letters like parentheses.
aplay will be "Segmentation fault" without this patch
special thanks to Takashi.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
it shouldn't contain space letters and
special letters like parentheses.
aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
it shouldn't contain space letters and
special letters like parentheses.
aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It's harmless but annyoing.
sound/pci/hda/patch_realtek.c: In function ‘alc_cap_getput_caller’:
sound/pci/hda/patch_realtek.c:2722:9: warning: ‘err’ may be used uninitialized in this function
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now all alc*_parse_auto_config() do almost same thing except for the
NID list to ignore and the PINs for SSID-check, we can merge all these
to a single function. A good amount of code reduction.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
One more code reduction. This codec has less DACs, thus the wiring
to DAC can't be filled uniquely for all output pins, i.e. some outputs
share the same volume control.
Except for that, all seems working fine.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge more auto-parser code in patch_realtek.c, now for ALC861.
The topology of this codec is pretty simple, and can be parsed well
by the current starndard parser.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
query_amp_caps() may return non-zero if the amp cap isn't supported
by the codec. Thus one needs to check widget-caps first, then check
the corresponding amp-caps.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A regression fix from commit 21268961d3
ALSA: hda - More flexible dynamic-ADC switching for Realtek codecs
The auto-mic wasn't detected properly when no ADC-switch is needed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For VT2002P, VT1802 and VT1812 codecs, to create Independent HP
control.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For VT2002P, VT1802 and VT1812 codecs, there're only two DACs. So smart51
control shouldn't be created.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For VT2002P, VT1802 and VT1812 codecs, the original activate_output_path()
function can't initialize output and hp path correctly, since mixers connected to
output pin widgets are not considered. So modify the activate_output_path()
function to satisify this kind of codec.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove unused variable 'dai' to eliminate below warning.
CC sound/soc/pxa/pxa2xx-pcm.o
sound/soc/pxa/pxa2xx-pcm.c: In function 'pxa2xx_soc_pcm_new':
sound/soc/pxa/pxa2xx-pcm.c:91: warning: unused variable 'dai'
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Put the all static quirk codes out of patch_realtek.c, split into the
file for each codec model. For controlling the build of quirk codes,
a new Kconfig, CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS is introduced.
By setting this off, all quirk codes won't be built, thus you can save
lots of memory.
The codes in patch_realtek.c are also shuffled and more comments are
given, but the contents aren't changed. This is just a refactoring.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch changes the auto-parser and the auto-mic handling codes to
allow more flexible dynamic ADC-switching with Realtek codecs.
In the new code, the following strategy is taken:
- When a cap-src can't handle all input-sources, either skip it, or
switch to the ADC-switching mode. In ADC-switching mode, like the
former dual-ADC mode for ALC275, it changes ADC on the fly according
to the current input source.
- When auto-mic is possible, always assign imux. If the mic pins are
set statically via a quirk, rebuild imux according to the pins.
In the auto-mic mode, the driver always changes the imux (although
the imux isn't exposed as a mixer element).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The legacy mode has been accidentaly removed by commit:
ASoC: twl6040: add all ABE DAIs
Add back the twl6040-hifi dai.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since the PLL handling has been simplified, and
rebased on 0, there is no longer need for converting
the PLL ID.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Avoid configuring the PLL several times during audio startup.
We can configure the PLL at prepare time with parameters collected
earlier hw_param, and set_dai_sysclk calls.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We can manage the sample rate constraints without the need
to maintain a variable and a pointer.
This simplifies the handling of the constraint, and makes it
more robust.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It is better if the selection between the Low power,
and High performance PLL is handled within the codec
driver, not in machine driver(s) to avoid duplicated
code, and also to have consistent tracking of the selected
PLL, and the resulting differences in supported sample
rates.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>