Spotted by smatch,
sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: potential
null dereference 'dma_engine'. (kzalloc returns null)
sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: we
previously assumed 'dma_engine' could be null (see line 1857)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c:1781 dspxfr_one_seg() info: why not
propagate 'status' from dsp_dma_stop() instead of (-5)?
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent update of ca0132 driver replaced the pinctl setup to the
direct write via snd_hda_codec_write() again. This should be covered
by snd_hda_set_pin_ctl() to be safer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit c3b4eea262.
Since the recent firmware loader code supports caching at S3/S4 by
itself, we don't have to handle f/w caching in the driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Handle a potential dma_engine alloc error and fix the possible use of an
uninitialized status variable in dspxfr_one_seg(). Also correct the initial
sampling rate for Mic 1.
Update the module description.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the controls used for tuning the DSP effects.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the unsolicited response handler for incoming DSP responses and
jack detection reporting, and routines for reading the incoming DSP response.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove the playback PCM open callback.
PCM stream setup and cleanup functions are added for use by PCM callbacks.
Delay stream cleanup if effects are on, to allow time for any effects tail to
finish.
Add the analog capture PCM callbacks.
Change the max channels of analog playback to 6.
Add two new PCMs: AMic2 and What-U-Hear.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the kcontrols for the DSP effects, playback and recording
source selection.
ca0132_is_vnode_effective() checks whether virtual node settings have
taken effect.
The control change helpers ca0132_pe_switch_set(), ca0132_voicefx_set()
and ca0132_cvoice_switch_set() are added to toggle playback / capture
DSP effects, ca0132_voicefx_info(), _get() and _put() are added for
input path DSP effect value access. The volume helpers are updated to
volume_info(), _get() and _set() to use the virtual nodes.
The redundant headphone and speaker switches and ct_extension function
are removed.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the framework to set effect parameters: ca0132_effects_set()
and ca0132_setup_defaults() are general functions for parameter setting and
initializing to default values. dspio_set_param() and dspio_set_uint_param()
are lower-level fns to simplify setting individual DSP parameters via an
SCP buffer transfer to the firmware.
The CA0132 chip parameter init code is added in ca0132_init_params().
In chipio_[write,read]_data(), the current chip address is auto-incremented
if no error has occurred.
ca0132_select_out() selects the current output. If autodetect is enabled,
use headphones (if jack detected) or speakers (if no jack).
ca0132_select_mic() selects the current mic in. If autodetect is enabled,
use exterior mic (if jack detected) or built-in mic (if no jack).
Init digital mic and switch between dmic and amic with ca0132_init_dmic(),
ca0132_set_dmic(). amic2 is initialized in ca0132_init_analog_mic2().
Finally, add verb tables for configuring DSP firmware.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds definitions and structs used for configuring DSP effects,
virtual nodes, effect tuning controls, and mixer control helpers.
The effect structs are also initialized.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When "alsactl restore" is performed on HDMI codecs, it tries to
restore the channel map value since the channel map controls are
writable. But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
is assigned yet, and this results in an error message from alsactl.
Although the error is harmless, it's certainly ugly and can be
regarded as a regression.
As a workaround, this patch changes the return code in such a case to
be zero for making others happy. (A slight excuse is: when the chmap
is changed through the proper alsa-lib API, the PCM status is checked
there anyway, so we don't have to be too strict in the kernel side.)
Cc: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of checking the codec SSID in find_mute_led_cfg() for HP Mini
110, set the proper spec->default_polairty in the fixup table.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The PCI vendor ID check in find_mute_led_cfg() is now superfluous
because the function is called in the fixup table entries of HP
machines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Finally all codecs in patch_sigmatel.c have been converted to use the
standard fixup helpers. This change also includes trivial cleanups
like the call of common setup for GPIO LED or the removal of unused
function.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This one is rather a simple conversion. The fixups for Dell machines
are implemented by fixup functions in the end.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This time, the only intrusive changes are for HP machines.
As the mute LED fixup and the bass speaker switch are required only
for HP machines, we can move these checks into the fixup entries; the
former is applied generically to all HP machines while the latter for
only certain models.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sometimes (or rather often) BIOS sets the pin default configurations
obviously wrongly. Looking through these failures, one common pattern
is to enable some dead pins that are usually marked as speaker pins.
In such a case, we can skip them if the pins don't have the output
capability.
In this patch, add a check for the valid pin cap bit for each parsed
pin, and filter out when it's invalid.
The fix was originally suggested by Raymond Yau.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This conversion is a bit tricky. Since STAC927x may take two
different volume-knob initialization values depending on the model, a
new flag, spec->volknob_init, is introduced to indicate whether it's
the standard volume-knob initialization or not.
Also, Dell BIOS model is now directly mapped onto the fixup table
instead of parsing in the function. This resulted in a new model ref,
STAC_927X_DELL_BIOS_SPDIF, which is a chained entry.
Also, for reducing the fixups, virtual entries like
STAC_927X_DELL_DMIC and STAC_D965_VERBS are introduced.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rather straightforward conversion, except for ones for Intel Mac.
As Intel Mac have only unique codec SSIDs, we need to remap the fixup
again for the codec SSID and call the new fixup there.
Also, we can reduce model enums like STAC_MACMINI, which are model
aliases for backward compatibility, since they can be pointed directly
via hda_model_fixup table.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add names of the clock sources for the M-Audio Fast Track
C400.
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Attain constant real-world latency by skipping 16 data packets.
The number of packets to be skipped was found by trial and error.
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Taking another look at the C400 descriptors, I see now that there is
a clock selector (0x80) for this device.
Right now, the clock source points to the internal clock (0x81), which
is also valid. When the external clock source (0x82) is selected in the
mixer, and the rates mismatch (if it's free-running it is fixed to
48KHz), xruns will occur.
Set the clock ID to the clock selector unit (0x81), which then
allows the validation code to function correctly.
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A patch in the 3.2 kernel caused regression with hotplugging the
M-Audio Fast track pro, or sound after suspend. I don't have the
device so I haven't done a full analysis, but it seems userspace
(both udev and pulseaudio) got confused when a card was created,
immediately destroyed, and then created again.
However, at least one person in the bug report (martin djfun)
reports that this patch resolves the issue for him. It also leaves
a message in the log:
"snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
a bit misleading. It is better than non-working audio, but maybe
there's a more elegant solution?
BugLink: https://bugs.launchpad.net/bugs/1095315
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CONFIG_HOTPLUG is always true now and the __dev* macros have been removed.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Support for loading the Renesas FSI driver via devicetree.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This adds the driver for the Tegra 2x AC97 host controller.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current simple-card driver calls asoc_simple_card_dai_init()
if platform had a asoc_simple_card_dai_init pointer.
And, this initialization function works only
when platform has an applicable initial value for each dai settings.
And basically, almost all sound card requires certain initialization.
This means that almost all platform has initialization settings,
and driver do nothing if it doesn't have settings.
And additionally, current simple-card supports sysclk settings but it was
only for codec. In order to abolish deviation between cpu and codec,
and in order to simplify processing,
this patch adds asoc_simple_dai, and removed pointless
struct asoc_simple_dai_init_info which was trigger of
calling asoc_simple_card_dai_init().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
With idle_bias_off these are no longer needed.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Yet another step forward. As all features for VIA codecs have been
implemented in the generic driver, we can move on to migrate the VIA
codec parser, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the support for the generic auto-parser to AD codec
driver. For AD1988, the old code is replaced simply with the new
generic parser. For other codecs, new model "auto" is added and
directed to use the generic parser.
No fixup codes have been implemented yet as of now. Eventually we'd
replace each static quirk with the generic parser + fixup.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Just shuffle the codes and add ifdefs for testing to drop the static
quirk codes from patch_conexant.c.
By commenting out ENABLE_CXT_STATIC_QUIRKS define at the beginning of
the file, you can disable the whole static codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This time, the target is Cirrus codec. Its parser is a subset of
generic parser, so we can migrate fully with it now.
The only tricky part is the handling of SPDIF automute.
Cirrus driver sets the SPDIF out plug over the headphone. As a
workaround, set spec->gen.master_mute for toggling the headphone (and
other) mute.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CA0110 codec is a fairly straightforward hardware implementation,
and we can use the generic parser almost as is.
Just set spec->multi_cap_vol flag to follow the current behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Replace the old parser code for C-Media auto-parser with the latest
generic parser. For compatibility reason, the static bindings are
still left, but they could be cleaned up in future.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The pincfgs, init_verbs and hints set by sysfs or patch might be
changed dynamically on the fly, thus we need to protect it.
Add a simple protection via a mutex.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As David Henningsson recently suggested, some HP laptops use an unused
mic pin for controlling a mute LED, and this information is provided
via DMI string "HP_Mute_LED_X_Y" string. This patch adds the generic
support for such cases, as we've already done in patch_sigmatel.c.
This is applied generically to all devices with ID 0x103c.
But as we don't know whether the device 103c:1586 really contains
HP_Mute_LED_X_Y DMI string, still keep the static setup for this
device using the mic2 pin 0x19.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some fixups such as setting the flags influencing on the parser
behavior should be applied before actually parsing the tree.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Try to recover from the regression: set the HP amp for the speaker and
add the hp jack mode enum as default.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the enum controls for changing the headphone amp bits of output
jacks, such as "Headphone Jack Mode". This feature isn't enabled as
default, so far, unless spec->add_out_jack_modes flag is set.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a multi-io jack is switched to another direction, call the
automute and autoswitch update functions, as this jack won't be used
as the headphone or the mic jack that may turn off others.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new fixup type, HDA_FIXUP_PINCTLS, for overriding the pinctl
values of the given pins. It takes the same array of struct pintbl
like HDA_FIXUP_PINS, but each entry contains the pinctl value instead
of the pin default config value.
This patch also replaces the corresponding codes in patch_realtek.c.
Without this change, the direct call of verbs may be overridden again
by the later call of pinctl restoration by the driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now the whole codebase has been changed from the earlier kernels, it
makes little sense to keep these aliases. Simply replace with the
official names.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a jack is retasked as a different direction (e.g. a mic jack is
used as a CLFE output), such a jack shouldn't be counted as the target
for the automatic jack switching. Skip the automute or the autoswitch
when the current pinctl direction is different from what we suppose.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the new pin target accessors for managing the current pinctl
values in the generic parser. The pinctl values of all active pins
are once determined at the initialization phase, and stored via
snd_hda_codec_set_pin_target(). This will be referred again in the
codec init or resume phase to set the actual pinctl.
This value is kept while the auto-mute. When a line-out or a speaker
pin is muted by auto-mute, the driver simply disables the pin, but it
doesn't touch the cached pinctl target value. Upon unmute, this value
is used to restore the original pinctl in return.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Check more strictly about the validity of pinctl values in
snd_hda_set_pin_ctl() and correct the wrong bits automatically.
Also provide the helper function to correct pinctl bits to codec
drivers.
This automatically fixes the invalid pinctl writes that are found in
a few Realtek fixups for NID 0x0f amp like ASUS A6Rp.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We already have the list of whole pin widgets and there is an unused
space in the list; let's use it for caching the current pinctl value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a DAC is reassigned from surrounds to front or ADCs are reduced
due to incomplete imux, we clear the path indices but the path
instances remain as is. Since the paths might be still referred
through the whole path list parsing (e.g. is_active_nid()), we should
clear these path instances as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since some codecs can choose the aamix as a capture source, we should
support it as well. When spec->add_stereo_mix_input flag is set, the
parser checks the availability of aamix as the input source, and adds
the paths automatically when possible.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the current parser code, the input_paths[] may become inconsistent
when some of detected ADCs are dropped due to incomplete inputs, since
the driver rearranges only adc_nids[] but doesn't touch input_paths[].
This patch fixes the issue, and also it optimizes the reachability
checks by simply referring to the parsed input_paths[] instead of
calling is_reachable() again for each connection.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of handling special cases in the caller side, give a proper
name string "Headphone Mic" from hda_get_autocfg_input_label() when
the headhpone jack pin is specified as an input.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The capture paths shouldn't contain the analog loopback mixer.
Pass a proper argument to exclude the aamix NID.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new flag spec->suppress_mic_auto_switch for codecs that don't
support unsol events properly like VT1708.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the default config value shows the connection AC_JACK_PORT_BOTH,
it's better to handle it as a speaker pin. This makes the behavior
consistent in snd_hda_get_pin_label() and snd_hda_parse_pin_defcfg().
There are only few old machines showing this attribute, and all of
them are actually fixed speaker pins, as far as I know.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit modifies the definition of snd_hda_parse_nid_path()
slightly, now with_aa_mix argument is changed to anchor_nid, so that
it can handle any NID generically as an anchor point to include or
exclude.
The with_aa_mix field in struct nid_path is removed again by this
change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The multi-io channels can vary not only from 1 to 6 but also may vary
from 6 to 8 or such. At the same time, there are more speaker pins
available than the primary output pins. So, we need three variables
to check: the minimum channel counts for primary outputs, the current
channel counts for primary outputs, and the minimum channel counts for
all outputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of looking through paths with the dac -> pin connection at
each time, just pass the already parsed path index to
assign_out_path_ctls(). This simplifies the code a bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The path indices must be reset at each evaluation of DAC assignment.
Otherwise the badness value will be wrongly calculated and mixers may
be inconsistently assigned.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Let is_jack_detectable() return true when the jack polling is enabled
for the codec. VT1708 uses the polling explicitly so we need to allow
it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new hook which is called at each PCM playback ops.
It can be used to control the codec-specific power-saving feature in
each codec driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The bind-volume workaround was introduced for simplifying the mixer
abstraction in the case where one or more pins of multiple outputs
lack of individual volume controls. This was essentially the case
like Acer Aspire 5935, which has 5.1 speakers and 5.1 (multi-io)
jacks although there are 5 DACs, so some of them must share a DAC.
However, the recent code rewrite changed the DAC assignment policy to
share with the same channel instead of binding to the front, thus
binding the volumes for all channels makes little sense now, rather
it's confusing. So in this patch, the ugly workaround is finally
dropped and simply create the volume control corresponding to the
parsed path position.
For dual headphones or 2.1 speakers with a shared volume control, it's
anyway bound to the same DAC if needed, so this change shouldn't bring
any practical difference.
And, as a good bonus, we can cut off the whole code handling the bind
volume elements.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When 5.1 or more multiple speakers with found but not enough DACs are
available, it's better to bind such pins to the DACs of the primary
outputs with the same channels rather than binding to the first DAC
(i.e. the front channel). For the cases with two speaker pins, it's
rather regarded as front + bass combination, thus it's more practical
to still bind to the front, though.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
... like "Speaker Surround Playback Switch".
This fix had been already applied to patch_conexant.c but was
forgotten in other places, then migrated to hda_generic.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For codecs that have individual routes going through a loopback mixer
(like VIA codecs), we need to provide an explicit switch to choose
whether the output goes through mixer or directly from DAC.
This patch adds the check for such paths and creates "Loopback Mixing"
enum control when available.
It won't influence on codecs like Realtek or others where the loopback
mixer is connected independently from the primary output routes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The output paths including aamix should be parsed only for the first
output. The surround paths including aamix must be wrong, since it
would mix all streams, i.e. all channels would be mixed into a single
and multiplexed again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Call the path activation for the digital input pin properly, not only
setting the pin control. Also add spec->digin_path for keeping the
path index.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Instead of search for the path with the certain route at each time,
keep the path index for each output and loopback, and just use it when
referred.
In this implementation, the path index number begins with one, not
zero (although I've been writing in C over decades). It's just to
make the check for uninitialized values easier.
So far, the input paths aren't handled with indices yet, but still
picked up via snd_hda_get_nid_path() at each time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When speakers are chosen as the the primary output during evaluation,
we did some tricks to assign the possible multi-io jacks with a
certain offset value to multi_out dacs. This was a workaround for the
case with multiple speakers like Acer Aspire. But this is quite ugly
at the same time and the resultant code is hard to understand. More
badly, it works wrongly for 2.1 speakers like Apple iMac91.
In this patch, instead of fiddling with the offset to multi_out dacs,
simply add a certain badness number if headphone(s) + multi-ios are
possible. This simplify the code a bit, and it's more robust.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If the requested path has been already added, return the existing path
instance instead of adding a duplicated instance.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the paths are created in map_singles(), we don't have to
re-create new paths in try_assign_dacs(). Just evaluate the badness
and skip to the next item.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Set path->active flag at the path creation time and let the paths
initialized according to the current path->active state in
set_output_and_unmute(). This allows to modify the active flag of
some output paths dynamically, e.g. switching the front output route
with or without aamix like patch_via.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
activate_amp() in the generic parser checks whether the given NID is
included in any active paths and skips it if found. This was a
workaround for avoiding disabling the widgets in the active paths when
one path is disabled, thus it shouldn't be applied to the case for
path activation. Due to this wrong check, some analog loopback paths
haven't been initialized correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Manage the connection list cache using linked lists instead of
snd_array, and revive snd_hda_get_conn_list() again, so that we don't
have to keep the expanded values locally.
This will reduce the stack usage by recursive call of
snd_hda_get_conn_index() or parse_nid_path() of the generic parser.
The list management doesn't include any mutex protection, thus the
caller needs to take care of race appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Yet another broken hardware workaround: there are hardware indicating
the inverted jack detection bit result.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the new flag, codec->inv_eapd, indicating that the EAPD
implementation is inverted.
There are always broken hardware in the world.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Similar like the implementation in patch_analog.c and patch_via.c,
the generic parser can provide the independent HP PCM stream now.
It's enabled when spec->indep_hp is set by the caller while parsing.
Currently no dynamic PCM switching as in patch_via.c is implemented
yet. The control returns -EBUSY when the value is changed during PCM
operations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow the path including the loopback mixer widget in the primary
output channel as an alternative in the generic codec parser.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a better debug print code to show the new assigned paths in
generic parser. It appears only with CONFIG_SND_DEBUG_VERBOSE=y.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's never used in the generic parser. It was there from the old
Realtek code, which has been dropped quite ago, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a PCM name string is generated from the chip name, it might
become strange like "CX20549 (Venice) Analog". In this patch, the
parser tries to drop the invalid words like "(Venice)" in the PCM name
string. Also, when the name string is given beforehand by the caller,
respect it and use it as is.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There were some old codes that look not stable enough, which was
derived from the old Realtek code. The initialization for primary
output in init_multi_out() needs to consider the case of shared DAC.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For preliminary works to migrate the generic parser for Conexant
codecs: the same function is ported to hda_generic.c.
But now it looks through the jack detect table so that it can cover
better.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a flag to indicate whether the vmaster mute hook enum is exposed
or not. Conexant codecs may want not to expose the control depending
on the model.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Old codecs like AD1986A tend to have long paths as they were just made
to be the way like AC97. The current max depth 5 can be too short for
such devices.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The access to a cache array element could be invalid outside the
mutex, so copy locally for the later references.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The dirty entry has to be checked at the beginning in the loop, not in
the inner loop for channels. This caused a regression that the right
channel isn't properly written.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The bound capture volume and switch controls use the cached amp
updates, but it's missing the flushing at the end.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The inverted dmic fix overwrites the right channel amp value, but it
would work only when the amp values have been already actually
written. Put snd_hda_codec_resume_amp() before the amp write for
flushing caches.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add an overflow check of CORB in HD-audio controller and codec drivers
so that flood of sequential writes would work properly.
In the controller side, add a check of CORB read-pointer to make
returning -EAGAIN when it's full. Meanwhile in the codec side, when
-EAGAIN error is received, it retries the write after flushing the
pending verbs (calling get_response() essentially does it).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These functions are supposed to be called at finishing the cached
sequential writes, so clear the flag properly for lazy developers who
often forget details.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When verbs or amps are actually written to the hardware, we can clear
dirty flag so that the later snd_hda_codec_resume_*() calls can skip
these verbs / amps.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit [2e9bf24: ALSA: hda_codec: Check for invalid zero
connections] trims the whole connection list when an invalid value is
reported by the hardware. But some codecs (at least AD1986A) may give
a zero NID in the middle of the connection list, so dropping the whole
list isn't good for such cases.
In this patch, as a workaround, allow a single zero NID in the read
connection list. If it hits zero twice, it's handled as an error, so
that we can avoid "too many connections" errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In general we prefer "Capture Source" to "Input Source".
The latter was chosen in many places just because "Capture Source"
label doesn't work well with the current alsa-lib mixer abstraction
when multiple instances are present. But when we know that there is a
single input-source element, we can safely choose "Capture Source"
label.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The next migration step is to use the common code in generic driver
for Realtek driver. This is no drastic change and there should be no
real functional changes, as the generic parser code comes from Realtek
driver originally.
As Realtek driver requires the generic parser code, it needs a
reverse-selection of CONFIG_SND_HDA_GENERIC kconfig.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These handlers are supposed to be called externally from the codec
drivers once when they need to handle own jack events.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When no controls are assigned in the parser (e.g. no analog path),
spec->kctls.list is still NULL. We need to check it before passing to
snd_hda_add_new_ctls().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In some cases, we want to manipulate the auto_pin_cfg table before
passing to snd_hda_gen_parse_auto_config() (e.g. Realtek SSID check
code fiddles with the headphone pin). Also passing ignore_pins just
for snd_hda_parse_pin_defcfg() isn't good.
In this patch, snd_hda_gen_parse_auto_config() is changed to receive
the auto_pin_cfg table to be parsed. The passed auto_pin_cfg table
must have been initialized (typically by calling
snd_hda_gen_parse_auto_config()) beforehand by the caller.
Also together with this change, spec->parse_flags is also removed.
Since this was referred only at the place calling
snd_hda_parse_pin_defcfg(), no longer needed to be kept in spec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Finally the whole generic parser code in Realtek driver is moved into
hda_generic.c so that it can be used for generic codec driver.
The old dumb generic driver is replaced. Yay.
The future plan is to adapt this generic parser for other codecs,
i.e. the codec driver calls the exported functions in generic driver
but adds some codec-specific fixes and setups.
As of this commit, the complete driver code is still duplicated in
Realtek codec driver. The big code reduction will come from now on.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch extends the capability of the auto-mic feature.
Instead of limiting the automatic input-source selection only to the
mics (internal, external and dock mics), allow it for generic inputs,
e.g. switching between the rear line-in and the front mic.
The logic is to check the attribute and location of input pins, and
enable the automatic selection feature only if all such pins are in
different locations (e.g. internal, front, rear, etc) and line-in or
mic pins. That is, if multiple input pins are assigned to a single
location, the feature isn't enabled because we don't know the
priority.
(You may wonder why this restriction doesn't exist for the headphone
automute. The reason is that the output case is different from the
input: the input source is an exclusive selection while the output
can be multiplexed.)
Note that, for avoiding regressions, the line-in auto switching
feature isn't activated as default. It has to be set explicitly via
spec->line_in_auto_switch flag in a fixup code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Put INPUT_PIN_ATTR_FRONT after INPUT_PIN_ATTR_REAR, and define
INPUT_PIN_ATTR_LAST to point to the last element.
This is a preliminary work for cleaning up Realtek auto-mic parser.
In the auto-mic implementation, the front panel is preferred over the
rear panel. By arranging the attr definitions like in this commit, we
can simply use sort() for figuring out the priority order.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous commit passed an utterly wrong value for checking the
split inv dmic pin. This patch fixes it and also tries to remove
inv_dmic_split_idx field.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since the fixup code is used commonly, it's worth to move it to the
common place, struct hda_codec, instead of keeping in hda_gen_spec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To make the parser more generic, a few codes to handle the inverted
stereo dmic in a way Conexant parser does is added in this patch.
The caller should set spec->inv_dmic_split flag appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far we create only "Capture Volume" and "Capture Switch" controls
for binding all possible amps, but we'd prefer creating individual
capture volume and switch controls per input in some cases
(e.g. conexant parser does it).
Add a new flag, spec->multi_cap_vol, to follow that policy.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge a few functions that have been split due to historical reasons
to single functions. Splitting too much (and placing too far away)
actually worsens the readability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There are a few more cases where we can assign "Master" mixer element
safely, e.g. when a single DAC is used in the whole output paths.
Also, when vmaster hook is present, avoid "Master" but assign "PCM"
instead. Otherwise vmaster hook won't work properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
... so that the fixup just needs to set the hook function in
FIXUP_ACT_PROBE. This will make easier to port for other codecs,
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new field to indicate the possible pin NID for alternative vref
setup for the shared hp/mic. Although 0x18 is valid for all Realtek
codecs, it'll be different on other vendor's codecs.
Also, drop the sanity check in update_shared_mic_hp() since the
reference pin is set explicitly in the caller side.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Make the function more generic for both input and output directions,
and returns the assigned path pointer. The argument order is changed
to follow the standard (from, to) way.
Now this new function is used for analog input and loopback path
parser codes, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The amps will be initialized via activate_path(), thus it's
superfluous to set in alc_auto_init_analog_input().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove some fields from struct alc_spec, and clean up the usage.
Namely,
- spec->input_mux becomes a single element, private_imux[] is removed
- spec->adc_nids becomes an array by itself, and private_adc_nids[]
gets removed, too
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now we reached to the final big piece of parser rewrite: the input
paths. While the old parser code assumes the more-or-less direct and
similar connections from input pin to ADC, the new code handles the
complete input paths. The capture source is switched by simple calls
of activate_path() function.
The parsing of capture volume and capture switches is, however, not
fully generalized. It assumes that amps are available in the vicinity
of ADCs (in three depth). This isn't perfect but it should cover all
codecs I know of.
Also, this commit removes some NID mapping of capture-related controls
temporarily for simplicity. It'll be restored in later commits.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now we have a complete list of loopback paths, thus we can initialize
the paths more completely based on it, instead of assuming a direct
connection from pin to mixer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Don't forget to take boost volumes into account in the managed path
list. Since it's an additional volume, we need to extend the ctls[]
array.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The paths used for multi-io haven't been initialized properly, so
far. It's usually no big matter because the pins are set to input as
default, but it's still cleaner to initialize the paths properly.
Now with the path active/inactive check, we can do it easily.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The pin widget has only a single amp value for the input even if it
has multiple "sources". Handle the situation in activate_path().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alc_auto_is_dac_reachable() can be replaced fully with
is_reachable_path(). The only difference is the order of arguments.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
... and rewrite the initialization of output paths as a generic
function that is applicable for both i/o directions.
The new flag, active, is introduced to each nid_path entry. This
indicates whether the given path is active, and it's used for checking
whether a certain widget can be turned off or changed when a path is
no longer used or newly enabled.
It's still used only in the output paths. More wider adaption for
input and loopback paths will be achieved in the later patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We are using only AUTOMUTE_MODE_PIN in patch_realtek.c and all others
have been already dropped. Let's remove the old superfluous codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The new function snd_hda_codec_amp_init() (and the stereo variant)
initializes the amp value only once at the first access. If the amp
was already initialized or updated, this won't do anything more.
It's useful for initializing the input amps that are in the part of
the path but never used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For optimizing the verb executions, a new mechanism to cache the verbs
and amp update commands is introduced. With the new "write to cache
and flush" way, you can reduce the same verbs that have been written
multiple times.
When codec->cached_write flag is set, the further
snd_hda_codec_write_cache() and snd_hda_codec_amp_stereo() calls will
be performed only on the command or amp cache table, but not sent to
the hardware yet. Once after you call all commands and update amps,
call snd_hda_codec_resume_amp() and snd_hda_codec_resume_cache().
Then all cached writes and amp updates will be written to the
hardware, and the dirty flags are cleared.
In this implementation, the existing cache table is reused, so
actually no big code change is seen here. Each cache entry has a new
dirty flag now (so the cache key is now reduced to 31bit).
As a good side-effect by this change, snd_hda_codec_resume_*() will no
longer execute verbs that have been already issued during the resume
phase by checking the dirty flags.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The generated defines in the header are pre-shifted.
Reported-by: Heather Lomond <Heather.Lomond@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Enable bypass when the regulator is idle, not when it is in use. This is
consistent with what the few existing users actually want.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
I've removed several unreachable returns.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
With commit f2818d0 (ASoC: fsl: fix miscompilation of snd-soc-imx-pcm),
we will see the following build error when building modules with
CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig.
CC [M] sound/soc/fsl/phycore-ac97.o
LD [M] sound/soc/fsl/snd-soc-fsl-ssi.o
LD [M] sound/soc/fsl/snd-soc-fsl-utils.o
LD [M] sound/soc/fsl/snd-soc-imx-ssi.o
LD [M] sound/soc/fsl/snd-soc-imx-audmux.o
LD [M] sound/soc/fsl/snd-soc-imx-pcm.o
sound/soc/fsl/imx-pcm-dma.o: In function `init_module':
imx-pcm-dma.c:(.init.text+0x0): multiple definition of `init_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.init.text+0x0): first defined here
sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module':
imx-pcm-dma.c:(.exit.text+0x0): multiple definition of `cleanup_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.exit.text+0x0): first defined here
make[4]: *** [sound/soc/fsl/snd-soc-imx-pcm.o] Error 1
Instead of using bool for SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA
to fix the original issue, we should completely remove SND_SOC_IMX_PCM
and have imx-pcm.o statically linked with imx-pcm-fiq.o or imx-pcm-dma.o.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
As the IEC-60958 channel status word is set by ANDing and ORing with
the appropriate definitions, the word bytes need to be initialized
to zero to avoid misconfiguration due to previous hw_params calls.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The code to do the ramp has been removed a long time ago. Remove the
remaining code as well since this is not needed.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There's no need to create a queue for this anymore
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In this way we can clean up the probe and remove paths
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
No need to set the bias_level twice to _STANDBY - since this is the only
state the device could be at suspend time. The driver do not support
idle_bias_off yet.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
With idle_bias_off these are no longer needed.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Convert headset PLUGINT interrupt to NO_SUSPEND type in order to
allow handling of insertion/removal events while device is suspended.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The commit [0d9741c0: ALSA: usb-audio: sync ep init fix for
audioformat mismatch] introduced the correction of parameters to be
set for sync EP. But since the new code assumes that the sync EP is
always paired with the data EP of another direction, it triggers Oops
when a device only with a single direction is used.
This patch adds a proper check of sync EP type and the presence of the
paired substream for avoiding the crash.
Reported-and-tested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The header can be local in mach-s3c24xx/ and sort out inclusions.
Accordingly, the GTA02_ macro in driver can be replaced.
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Nothing terribly exciting here except for the DOUBLE_RANGE fix which
just hadn't worked before, nobody noticed due to lack of use.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJQ7rMBAAoJELSic+t+oim9kIsP/3tsJ+GZQu8WJHRGsnCMquC3
fFpf7uJ9Lc4O9UJ2xmwn3igN6iNFPushVqXY62J+51Mey27o+tmvHs7+7AUQiXmE
Pbr3OR9OntmA8CmI9G3QUxBaxsdJ6ZtijPRIfWquvTx58zF4EFJXn2HymOEhW2fB
488OGauLIa5cG7B1WysxjxJ3ZA4sumzzvHmrPSOszYZfl3OCF1HK3PbmUiCtDSdu
XxPOogzQJRpVVRquMtuyiPJf+ZxKNRUPxm/YWQ66q0e3fSNsFIDXF3UPSMe4lwGt
OCH7FlgifZ5yjzToeUlsRNzNbopaZ70I9q65iy7xZLRwVvfRLpX45SkK1UXEzFDI
6QSwlv5ANxGdlQIsoFOj0m/+3AjIaKmhXcxutuiydCfTido1PSy7N0aE3WZNVD1m
mRPtz5tbLb+iFkCiu3tSA+eTJ1MS8WUWDz9QyfD2TVHEpdNJEfXTO3hddlPUDAmU
n81bCsCoaJ5KzIZ1lkC5I1YXbMPlQ2DY46V5GX+hxscWueKtjILUwZDKUgz/ZlEb
O3CCA7UWRNRAEBtCXbcZDE1mTd1+5ePNrL7mbFOwUOXhVtD3aRByY7zd5sv2/rzh
7XqsPdMsTaxRN/TAXXYOpR3Hoqy31Q2gZC/0oC+P2MGW6/oGLJtvSLsfJHGMvkGP
/9pkWIp/uRnFJ40cEYEe
=dgII
-----END PGP SIGNATURE-----
Merge tag 'asoc-fix-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.8
Nothing terribly exciting here except for the DOUBLE_RANGE fix which
just hadn't worked before, nobody noticed due to lack of use.
Support for loading the ak4642 codec module via devicetree.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When initializing the output paths, we assumed the input amps have
almost two inputs blindly. It's not only generic but even incorrect
for some codecs like ALC268 & co. Also, the same assumption (two
sources) exists for the bind input-amp controls.
This patch changes the codes in these places to handle the input
connections in a more generic way.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For handling the analog-loopback paths more generically, check the amp
capabilities of the aa-mixer widget, and create only the appropriate
mixer elements.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Improve the parser of analog loopback paths and handle in a more
generic way. The following changes are included in this patch:
- Instead of assuming direct connections between pins and
the mixer widget, track the whole path between them. This fixes
some missing connections like ALC660.
- Introduce the path list for loopback paths like input and output
path lists. Currently it's not used for any real purposes, yet.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Just like the output paths, parse the whole paths for inputs as well
and store in a path list. For that purpose, rewrite the output parser
code to be generically usable.
The input path list is not referred at all in this patch. It'll be
used to replace the fixed adc/capsrc array in later patches for more
flexible input path selections.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, idx[i] and multi[i] indicate the attribute of the widget
path[i - 1]. This was just for simplifying the code in
__parse_output_path(), but this is rather confusing for later use.
It's more natural if both idx[i] and multi[i] point to the same widget
of path[i]. This patch changes to that way.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Simplify the output path initialization using the existing path
information instead of assuming the topology specific to Realtek
codecs. This is also implicitly a fix for some amp values on output
pins where the old parser missed (e.g. ALC260 output pins).
The same function alc_auto_set_output_and_unmute() can be used now for
the multi-io activation, since the output selection means nothing but
activating the given output path.
And, finally at this stage, we can get rid of alc_go_down_to_selector()
and other functions that are codec really specifically to Realtek
codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, Realtek codec driver evaluates the NIDs for volume and mute
controls twice, once while parsing the DACs and evaluating the
assignment, and another while creating the mixer elements. This is
utterly redundant and even fragile, as it's assuming that the ctl
element evaluation is identical between both parsing DACs and creating
mixer elements.
This patch simplifies the code flow by doing the volume / mute
controls evaluation only once while parsing the DACs. The patch ended
up in larger changes than expected because of some cleanups became
mandatory.
As a gratis bonus, this patch also fixes some cases where the stereo
channels are used wrongly for mono amps.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mono widget is always connected to the left channel, thus the left
channel amp value also should be referred for mono widgets instead of
the right channel.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As we parse the output paths more precisely now, we can use this path
list for parsing the widgets for volume and mute mixer controls.
The spec->vol_ctls[] and sw_ctls[] bitmasks are replaced with the
ctls[] in each output path instance.
Interestingly, this move alone automagically fixes some bugs that the
conflicting volume or mute NIDs weren't properly detected.
Also, by parsing the whole path, there are more chances to get a free
widget for volume/mute controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add the output path parser to Realtek codec driver as we already have
in patch_via.c. The nid_path struct represents the complete output
path from a DAC to a pin. The alc_spec contains an array of these
paths, and a new path is added at each time when a new DAC is
assigned.
So far, this path list is used only in limited codes: namely in this
patch, only alc_is_dac_already_used() checks the list instead of dac
arrays in all possible outputs. In the later development, the path
list will be referred from more places, such as the mixer control
assignment / check, the mute/unmute of active routes, etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the probing phase, create a list of all available DACs in the codec
and use it for checking the single DAC connections.
This list will be used in more other places in the later commits, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use the helper function snd_hda_get_conn_index() instead of open
codes. This also improves the detection of some routes to DAC on
ALC260 (although the difference doesn't influence on the end
results of the mapping).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the support for a new codec ALC284, which is compatible with
ALC269. Also add more codec variants to handle the SSID check
properly.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixes the following sparse warning:
sound/usb/mixer_quirks.c:1209:23: warning:
symbol 'ebox44_table' was not declared. Should it be static?
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use correct bitmask for AES32 cards to determine wordclock lock state,
add missing bitmask for sync check and make output of the corresponding
control and /proc coherent.
Signed-off-by: Andre Schramm <andre.schramm@iosono-sound.com>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Change the power_save_controller option to bint from bool so that user
can override the runtime PM capability bit and force to enable or
disable the runtime PM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit 697c373e34.
The original patch was meant to remove clicking, but in fact caused even
more clicking instead.
Thanks to c4pp4 for doing most of the work with this bug.
BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've got a few bug reports that the runtime D3 results in the dead
HD-audio controller. It seems that the problem is in a deeper level
than the sound driver itself, so as a temporal solution, disable the
feature for these controllers again.
Reported-and-tested-by: Vincent Blut <vincent.debian@free.fr>
Reported-and-tested-by: Maurizio Avogadro <mavoga@gmail.com>
Cc: <stable@vger.kernel.org> [v3.7]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
WMDR coefficient files can specify coefficients in terms of algorithm
specific data regions. Record the start addresses of these regions while
parsing the algorithms and then use them to handle coefficients with
these formats.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we run into I/O problems the algorithm count may be crazy, validate it
before we proceed and dump the read data for diagnostic purposes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ADSP devices report information on the algorithms loaded on them. Parse
this data and use it to allow coefficients to be configured for specific
algorithms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The free running mode can cause problems when attempting to bring up the
FLL running from a defined clock source. This patch disables
free-running mode.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
saif->id and saif->master_id are unsigned, so they can not be negative.
Fix the following warning when building with W=1 option:
sound/soc/mxs/mxs-saif.c: In function 'mxs_saif_probe':
sound/soc/mxs/mxs-saif.c:676:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
sound/soc/mxs/mxs-saif.c:688:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
sound/soc/mxs/mxs-saif.c:692:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Use a signed variable 'ret' to handle the error values.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It seems useful, and power states are required for AFG nodes,
so I see no reason not to print it. As a bonus, also print the
AFG nid.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch does nothing functionally, it just gives the function a new name and
modifies the prototype slightly in order to clarify what the function is doing
(which is not necessarily asserting the reset).
Some commentary also added.
Tested on a palm treo 680 machine.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch fixes some code that implements a work-around to a hardware bug in
the ac97 controller on the pxa27x. A bug in the controller's warm reset
functionality requires that the mfp used by the controller as the AC97_nRESET
line be temporarily reconfigured as a generic output gpio (AF0) and manually
held high for the duration of the warm reset cycle. This is what was done in
the original code, but it was broken long ago by commit fb1bf8cd
([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset())
which changed the mfp to a GPIO input instead of a high output.
The fix requires the ac97 controller to obtain the gpio via gpio_request_one(),
with arguments that configure the gpio as an output initially driven high.
Tested on a palm treo 680 machine. Reportedly, this broken code only prevents a
warm reset on hardware that lacks a pull-up on the line, which appears to be the
case for me.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Cold reset on the pxa27x currently fails and
pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
appears in the kernel log. Through trial-and-error (the pxa270 developer's
manual is mostly incoherent on the topic of ac97 reset), I got cold reset to
complete by setting the WARM_RST bit in the GCR register (and later noticed that
pxa3xx does this for cold reset as well). Also, a timeout loop is needed to
wait for the reset to complete.
Tested on a palm treo 680 machine.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
All MXS users have been converted to device tree and the board files have been
removed.
No need to keep platform data in the driver.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Otherwise we won't run correctly on systems that require this for larger
data transfers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The mute LED is in this case connected to the Mic1 VREF.
The machine also exposes the following string in BIOS:
"HP_Mute_LED_0_A", so if more machines are coming, it probably
makes sense to try to do something more generic, like for the
IDT codec.
Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1096789
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
vortex_wt_setdsout performs bit-negation on the bit position (wt&0x1f)
rather than on the resulting bitmask. This code is never actually
invoked (vortex_wt_setdsout is always called with en=1), so this does
not currently cause any problem, and this patch is simply cleanup.
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In preparation for more advanced sample rate managment move the existing
code out of the main hw_params() function.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Some systems use external analogue switches to connect more analogue
devices to the CODEC than are supported by the device. In some systems
this requires changing the switched output from single ended to
differential mode dynamically at runtime. Add a new function
arizona_set_output_mode() to support this.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Added a fix for hardware dependence bug where a sound card failure
should not result in reading beyond array memory index.
Signed-off-by: Asim Kadav <kadav@cs.wisc.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch is based on 3.8-rc1. It fixes two things:
1) A kernel panic caused by incorrect allocation of a u8 variable
"bootresponse".
2) A noisy dmesg (urb status -32) caused by broken pipe to an
invalid midi endpoint.
It is also a little cleaner because there is no need for a new
QUIRK_MIDI type as suggested by kernel developers, since the device
follows exactly the MIDIMAN protocol.
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The bestcomm dma hardware, and some of its users like the FEC ethernet
component, is used in different FreeScale parts, including non-powerpc
parts like the ColdFire MCF547x & MCF548x families. Don't keep the
driver hidden in arch/powerpc where it is inaccessible for other arches.
.c files are moved to drivers/dma/bestcomm, while .h files are moved to
include/linux/fsl/bestcomm. Makefiles, Kconfigs and #include directives
are updated for the new file locations.
Tested by recompiling for MPC5200 with all bestcomm users enabled.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Support the Creative BT-D1 Bluetooth USB audio device. Before this
patch, Linux had trouble finding the correct USB descriptors and bailed
out with these messages:
no or invalid class specific endpoint descriptor
Now it still prints these messages on hotplug:
snd-usb-audio: probe of ...:1.0 failed with error -5
snd-usb-audio: probe of ...:1.2 failed with error -5
snd-usb-audio: probe of ...:1.3 failed with error -5
But the device works correctly, including the HID support.
The patch is diff'ed against 3.8-rc1 but should apply to older kernels
as well.
Signed-off-by: Alexander Schremmer <alex@alexanderweb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The vmaster hook sends 1 for enabled/unmuted and 0 for disabled/muted,
but "Mute-LED Mode" being "On" refers to the LED being on, not the
volume being on.
Therefore "On" and "Off" should be switched.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Current FSI driver is using platform info pointer,
but it is not good design for DT support.
This patch made it not to use platform info pointer.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Remove creation of an soc-audio device from the machine platform_driver probe
function, and add a call to snd_soc_register_card() instead.
The current code still works, but this mechanism has been deprecated, if I'm not
mistaken. The ASoC core code produces the warning "ASoC: machine Palm/PXA27x
should use snd_soc_register_card()"
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC core code now handles creation of controls and routing based on contents of
struct snd_soc_card, so remove calls to snd_soc_dapm_new_controls() and
snd_soc_dapm_add_routes() from the snd_soc_dai_link init function, and add
widget and route definitions to struct snd_soc_card.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
These boards are using the common omap-twl4030 machine driver, no need for
separate machine drivers anymore.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Update the common machine driver to support more boards including Zoom2 and
SDP3430.
- Support for voice port of twl4030
- HS jack plug detection support
- The audio routing can be fine tuned via pdata or via provided routing
table from DT.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The codec driver takes care of this.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When HS extmute is enabled without custom GPIO we should configure the mux
to allow the pin to be used as extmute signal.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In order to avoid breakage update the machine drivers at the same time using
twl4030: omap3pandora, sdp3430 and zoom2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The codec driver takes care of these bits.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The codec driver takes care of these bits.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In order to be able to use the Voice port of twl4030 three bits need to be
handled in VOICE_IF register:
VIF_EN: to enable the voice port (needed for both playback and capture)
VIF_DIN_EN: Need to be enabled for playback only (input to the codec)
VIF_DOUT_EN: Need to be enabled for capture only (output from codec)
Use DAPM_SUPPLY for the VIF_EN bit and add DAPM_AIF_IO/OUT widget to handle
the playback/capture bit.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Refactor set_pll code to avoid the following warnings:
sound/soc/codecs/wm8985.c:852:50: warning: 'pll_div.k' may be used uninitialized in this function
sound/soc/codecs/wm8985.c:849:9: warning: 'pll_div.n' may be used uninitialized in this function
sound/soc/codecs/wm8985.c:848:23: warning: 'pll_div.div2' may be used uninitialized in this function
Do the same as in commit 86ce6c9a (ASoC: WM8804: Refactor set_pll code to avoid
GCC warnings).
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When probing aux_dev, initializing is as below:
device_initialize()
device_add()
So when remove aux_dev, we need do as below:
device_del()
device_put()
Otherwise, the rtd_release() will not be called.
So here using device_unregister() to replace device_del(),
like the action in soc_remove_link_dais().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
After called device_initialize(), even device_add() returns
error, we still need use the put_device() to release the reference
to call rtd_release(), which will do the free() action.
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it. Most uses are unnecessary
and quite a few of them are buggy.
Remove unnecessary pending tests from wm8350. Only compile tested.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In the case of no-match, return -EINVAL instead of 0.
Since we assign i to ret in the for loop, ret always less than
ARRAY_SIZE(clk_map_table). Thus remove the boundary checking for ret.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This connection is used by the AC97 controller.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
AC97 uses a fixed rate, unrelated to the sample rate. Add a function to
make the setup more trivial.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
3449f5fab8
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
added clock inversion support via snd_soc_dai_set_fmt().
Thus, this patch removed SH_FSI_xxx_INV and fsi_get_info()
from fsi driver, and modified platform settings to use new style.
Then, it cleaned up meaningless settings from platform.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ab6f6d8521
(ASoC: fsi: add master clock control functions)
added driver level clock control functions.
And now, platform depended .set_rate() is no longer needed.
This patch removed unnecessary .set_rate() platform callback support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Refactor set_pll code to avoid the following warnings:
sound/soc/codecs/wm8983.c:873:40: warning: 'pll_div.k' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm8983.c:870:9: warning: 'pll_div.n' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm8983.c:869:23: warning: 'pll_div.div2' may be used uninitialized in this function [-Wuninitialized]
Do the same as in commit 86ce6c9a (ASoC: WM8804: Refactor set_pll code to avoid
GCC warnings).
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The condition "if (!freq_in || !freq_out)" has already been tested previously,
so no need to do it again.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The CS4271 requires its LRCLK and MCLK to be stable before its RESET
line is de-asserted. That also means that clocks cannot be changed
without putting the chip back into hardware reset, which also requires
a complete re-initialization of all registers.
One (undocumented) workaround is to assert and de-assert the PDN bit
in the MODE2 register.
This patch adds a new flag to both the DT bindings as well as to the
platform data to enable that workaround.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Not very useful on non AT91/AVR32 platforms but it provides
more build coverage and prepares for ARM multiplatform.
Also fixes a couple of format type warnings.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Update lm49453_reg_defs values as per LM49453 HW revision-B
Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since we are now using the clock API integration to manage MCLK we can now
use clk_get_rate() to determine if we need to divide MCLK without relying
on platform data.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Request MCLK as a clock and then enable it when carrying out a state
transtion and while ANC is active, minimising system power consumption
in idle modes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The FLL source constants were numbered as a simple enumeration but were
being used in the code as direct values to be written to the registers.
Renumber the constants to reflect the usage.
Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
The references used for the noise gates and parameters for their triggering
are configurable, expose that to users.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The references used for the noise gates and parameters for their triggering
are configurable, expose that to users.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Though the controls are named as stereo controls in the part the main use
case for the analogue inputs to the WM5102 is mono. Reflect this in the
controls exposed to userspace, providing a series of mono controls rather
than stereo ones.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Though the controls are named as stereo controls in the part the main use
case for the analogue inputs to the WM5102 is mono. Reflect this in the
controls exposed to userspace, providing a series of mono controls rather
than stereo ones.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If the FLL is being shut down we will exit early so there is no need to
check here and in fact we're checking the wrong thing anyway.
Reported-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Just found some cases that some codec drivers set the bias to _STANDBY and
set idle_bias_off to 1 during probing.
It will cause unpaired runtime_get_sync/put() issue. Also as Mark suggested,
there is no reason to start from _STANDBY bias with idle_bias_off == 1.
So here giving one warning when detected (dapm.idle_bias_off == 1) and
(dapm.bias_level != SND_SOC_BIAS_OFF) just after driver->probe().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Omair M. Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3.
From Eric Nelson:
"We also found that for the microphones we have here (commodity PC boom mics) a
default value of 2 for the gain gives the best results."
So change the default microphone gain as well.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Enable delay report on capture path. The delay is reset when an
URB is retired and increment at each call to .pointer based
on frame counter changes. The precision of the delay
information is limited to 1ms as in the playback case.
This reverts commit 3f94fad095.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to the defines in wm2200.h:
/*
* R1284 (0x504) - Audio IF 1_5
*/
We should not left shift 1 bit for fmt_val when setting dai format.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Although we've had macros defining double _RANGE controls for a while now
they've not actually been backed up properly by the implementation, it's
treated everything as mono. Fix that by implementing the handling in the
stereo controls, ensuring that the mono controls don't mistakenly get
treated as stereo.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Both the mask and mode settings are wrong in current code.
According to the datasheet:
S2PCFG0 (0x0A)
BIT[3:1] DATA_FORMAT
serial interface protocol format:
000: left Justified
001: I2S (default)
010: right justified
100: PCM no delay
101: PCM delay
111: DSP
Thus fixes the defines for LEFT_J_DATA_FORMAT, I2S_DATA_FORMAT, and
RIGHT_J_DATA_FORMAT.
Also adds define for DATA_FORMAT_MSK.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
When front-end PCM session is in paused state, back-end
PCM session will be put in paused state as well if given
front-end PCM session is the only client of given back-end.
Then, application closes front-end PCM session, DPCM
framework will not allow back-end enters HW_FREE state
so back-end will never get shutdown completely.
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
This update contains overall only driver-specific fixes.
Slightly large LOC are seen in usb-audio driver for a couple of new
device quirks and cs42l71 ASoC driver for enhanced features.
The others are a few small (regression) fixes HD-audio, and yet other
small / trival ASoC fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJQ0thSAAoJEGwxgFQ9KSmk/i8P+wcdjCcp5FdfZ5YP2h9siEw5
7KJPwwk9eTa0PVB5olgabxSh6L5P+rM69OGiXnHSKF8RwsuZDRp/5pPcaoUVRzH/
6uibGozfLApeLBuBAJZ96eJhRIigysoSrm5W4FQeNVAbwK67zpIjP/xGwKa0+qfO
vsK/BtSn+nVsmFpgOfO6vXZ7gKBlfKGXHYdyFVXzHEhGYSHLdf1IDxnCapIXlh78
0nXHD2FHgKlSM6y/S6W7wiUwyNqbgmnZHwh29iIyes1CrX0wVyvtos3qgwJHukrU
WVY87E1TDxD6HLAWTUxqeOIvNyucSarUZ+kvtYg0i31gmRCY8QNXqYVp1wBybqVd
Uwbwe4qWwSxXhXluodFsizNwcH9T+KA3IM4B5u6yCT1pFY759pCh/KpLoNfD+maL
6atnBU6lvtTCMxoeSyJFSdAjdOQJUpylQ9TyQaI/PIr6jrEMVC2ki/i3UX+YpQGo
oWJj5x8Nl58MUv7GhYGTo7vfm3ZqaUbxN/YugbCeVkrcV0McJNycvddotplD4iTd
pqfep1fVpefW9X4pJnvsys2neo7R8e8a87Qg2CfVGXQ91ijevPCf+YAh4EmHShsT
vwNcOP/gZ+qQp/bY40SigMj5SZtZ/ZQxT47yPo6OLI4FyhyD+WK4l1AAEK5B1uPA
odsIcQg2F6/RjzkDSsSl
=JoY5
-----END PGP SIGNATURE-----
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"This update contains overall only driver-specific fixes. Slightly
large LOC are seen in usb-audio driver for a couple of new device
quirks and cs42l71 ASoC driver for enhanced features. The others are
a few small (regression) fixes HD-audio, and yet other small / trival
ASoC fixes."
* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:
ALSA: HDA: Fix sound resume hang
ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins
ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs
ASoC: atmel-ssc: change disable to disable in dts node
ASoC: Prevent pop_wait overwrite
ALSA: usb-audio: ignore-quirk for HP Wireless Audio
ALSA: hda - Always turn on pins for HDMI/DP
ALSA: hda - Fix pin configuration of HP Pavilion dv7
ASoC: core: Fix splitting of log messages
ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT
ASoC: cs42l73: Add DAPM events for power down.
ASoC: cs42l73: Add DMIC's as DAPM inputs.
ASoC: sigmadsp: Fix endianness conversion issue
ASoC: tpa6130a2: Use devm_* APIs
This patch is the result of a lot of trial and error, since there are no specs
available for the device.
Full duplex support is provided, i.e. playback and recording in stereo.
The format is hardcoded at 48000Hz @ 24 bit, which is the maximum that the
device supports. Also, MIDI in and MIDI out both work.
Users will notice that the S/PDIF light also flashes when playback or recording
is active. I believe this means that S/PDIF input/output is simultaneously
activated with the analogue i/o during use.
But this particular functionality remains untested.
Note that this particular version of the patch is so far untested on the
physical hardware because I have not compiled a full kernel with the changes.
However, extensive testing has been done by many users of the hardware
who believe other versions of my patch have worked since circa 2009.
[Modified to make a function static by tiwai]
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Resuming a switcheroo'd HDA controller hangs since the completion
is one-shot (thus works the first time). Fix by using completions
that explictly need rearming, so remain fired before.
Signed-off-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Haswell HDMI codec pins may report invalid connection list entries, which
will cause failure to play audio via HDMI or Display Port.
So this patch adds fixup for Haswell to workaround this hardware issue:
enable DP1.2 mode and override the pins' connection list entries with proper
value.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In commit 9c0ece069b ("Get rid of Documentation/feature-removal.txt"),
Linus removed feature-removal-schedule.txt from Documentation, but there
is still some reference to this file. So remove them.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The workaround to force VREF50 for dallas/hp model with ALC861VD
was introduced in commit 8fdcb6fe42,
but it contained wrong pincap override bits.
This patch fixes to exclude VREF80 pincap bit correctly.
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that Realtek codecs (ALC260, etc) with input amps in
audio-input widgets don't handle the multiple individual input amps.
Thus we need to set codec->single_adc_amp flag for them in general.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Nothing terribly exciting here, just small localised changes.
As well as fixes there are a couple of Cirrus changes and one devm_
change which were in prior to the merge window but got missed from the
original pull to Takashi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJQzJCAAAoJELSic+t+oim976sQAI8OMV9oRV2qjhjWz+WRQlR7
dPMLRh1UzBKaYxs4izF21Kp4tfH6fQfopZb5m13JZJXEgjp1cV+3FyZaxQHrdJz4
n6+vrzc2yp8PRdgv0FDuqbnKVlgxEJQEqX/okWjGFYg4AGn6St0UsDgH1eHt+QsF
LTsbDnEwgsfni7ybUeukv6RyPpskfw+KfBpKyHfb1lf/5x+W9sel96Hsf/ihFLIT
Ij1wPjYarK5LYfwNqQO4g1FaBAe4TmKEUOt0sjMCx7B3icDp4tgp+rbEOEdA1bLJ
w9cJu5HPkvyXcin6cguk6Hu4QmPPSyi2Q56dnwTqdP+2Dq4rQzUd6e9BFdvkQqpR
Pn2L8RQRv3RMD+mgPVnMJK5LnKF5iBKzEZINa32CeacTTjThMbRUr0odo+Wc4Xql
kfoNmSU2rMwM93pweWD/OGl6Am0WrmNWy8jDnkvhhEd5+ZEAQkox6fiSZTe0YLCs
CZ0TIW/7UzqaUv5MqRKg3W5+9rdsxcaMgIbjB7LE+MKBaLApHIPgBqRpqRtfwTh1
DPr1lCUqjJoJomMPHVhIPq7ktR1oHuVULEtGPyxygaxLSmbAA8ib2r7e8fsA0GTS
joJsLrRU6+X9fIK272NmC15dbflnv6cgvaba2RDkenM8+DHqpNrufRqe0MflzoEU
0p9h7mTLk5+No+DzxWfs
=3VlW
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.8p1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.8
Nothing terribly exciting here, just small localised changes.
As well as fixes there are a couple of Cirrus changes and one devm_
change which were in prior to the merge window but got missed from the
original pull to Takashi.
pop_wait is used to determine if a deferred playback close
needs to be cancelled when the a PCM is open or if after
the power-down delay expires it needs to run. pop_wait is
associated with the CODEC DAI, so the CODEC DAI must be
unique. This holds true for most CODECs, except for the
dummy CODEC and its DAI.
In DAI links with non-unique dummy CODECs (e.g. front-ends),
pop_wait can be overwritten by another DAI link using also a
dummy CODEC. Failure to cancel a deferred close can cause
mute due to the DAPM STOP event sent in the deferred work.
One scenario where pop_wait is overwritten and causing mute
is below (where hw:0,0 and hw:0,1 are two front-ends with
default pmdown_time = 5 secs):
aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE -d 1
sleep 1
aplay /dev/urandom -D hw:0,1 -c 2 -r 48000 -f S16_LE -d 3 &
aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE
Since CODECs may not be unique, pop_wait is moved to the PCM
runtime structure. Creating separate dummy CODECs for each
DAI link can also solve the problem, but at this point it's
only pop_wait variable in the CODEC DAI that has negative
effects by not being unique.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
As Joe Cooper <swelljoe@gmail.com> reported, "On most HP Envy laptops
the snd-usb-audio module causes the system to become unresponsive and
Gnome Shell 3 to crash.".
See also:
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-December/057729.html
Add a quirk to ignore this device (for now) to solve the instability
issue and allow other USB audio devices to be used.
Reported-by: Joe Cooper <swelljoe@gmail.com>
Tested-by: Isaac Smith <hunternet93@gmail.com>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've seen the broken HDMI *video* output on some machines with GM965,
and the debugging session pointed that the culprit is the disabled
audio output pins. Toggling these pins dynamically on demand caused
flickering of HDMI TV.
This patch changes the behavior to keep the pin ON constantly.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51421
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull trivial branch from Jiri Kosina:
"Usual stuff -- comment/printk typo fixes, documentation updates, dead
code elimination."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
HOWTO: fix double words typo
x86 mtrr: fix comment typo in mtrr_bp_init
propagate name change to comments in kernel source
doc: Update the name of profiling based on sysfs
treewide: Fix typos in various drivers
treewide: Fix typos in various Kconfig
wireless: mwifiex: Fix typo in wireless/mwifiex driver
messages: i2o: Fix typo in messages/i2o
scripts/kernel-doc: check that non-void fcts describe their return value
Kernel-doc: Convention: Use a "Return" section to describe return values
radeon: Fix typo and copy/paste error in comments
doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
various: Fix spelling of "asynchronous" in comments.
Fix misspellings of "whether" in comments.
eisa: Fix spelling of "asynchronous".
various: Fix spelling of "registered" in comments.
doc: fix quite a few typos within Documentation
target: iscsi: fix comment typos in target/iscsi drivers
treewide: fix typo of "suport" in various comments and Kconfig
treewide: fix typo of "suppport" in various comments
...
This update contains a fairly wide range of changes all over in sound
subdirectory, mainly because of UAPI header moves by David and __dev*
annotation removals by Bill. Other highlights are:
- Introduced the support for wallclock timestamps in ALSA PCM core
- Add the poll loop implementation for HD-audio jack detection
- Yet more VGA-switcheroo fixes for HD-audio
- New VIA HD-audio codec support
- More fixes on resource management in USB audio and MIDI drivers
- More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite,
Roland VG-99, etc
- Add support for FastTrack C400 usb-audio
- Clean ups in many drivers regarding firmware loading
- Add PSC724 Ultiimate Edge support to ice1712
- A few hdspm driver updates
- New Stanton SCS.1d/1m FireWire driver
- Standardisation of the logging in ASoC codes
- DT and dmaengine support for ASoC Atmel
- Support for Wolfson ADSP cores
- New drivers for Freescale/iVeia P1022 and Maxim MAX98090
- Lots of other ASoC driver fixes and developments
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJQyYh9AAoJEGwxgFQ9KSmk95UP+wcVXRynWulCVwEnVjjWv/UM
2fIsD0RkWO4WoqEVCNCHzW27pvFC36uqLx5vtas4CoJ2CX8ufQsPqWTx6K3MY/DQ
/VJT8CI2EKPQY1Q0PySVo2nBqwcUXWWoZE47t1ZowR6cxtmgrS8lLxYJvkbfEOHF
PS8WItACqH5F5VPxGFkhPwR2OTLfaYt7ilKx82vgxSzdMAel8q/I9uS/MUv8KV+1
1s5yBvlW5eyDXKpQbP/KiMJLJ/zk1MRAKK2HftAk8pNt+Xy160NvXhbILDWKC4uT
QBRPqyIe8BmL3VlXpw3mn7nbeU7rSfc/Rbrnm2+Yb54/Wtj4PnV6Z6bg7HO610im
e/tBNHoaL7qn1iNYSC3heW11rToksd03/LK0GREvkX3Bl21T+Naaun/DY/PGIfMQ
nOXy7uVo6sVdZnN2MTWof9qeMYBSlrwQVsMde6kbYadNcXnuqUqCOx41kiAdE8t5
jfZy5QR+uDjdJgDv8/CuiCYxSjjTUfO1tdSV/VjsTK17Gfw3DWTJpeznVnoIALbZ
81HXYxb+uGZ8xDr0WXGkydlnPvB6bnWu2vvfrLBkioA/p60EDNCtgKo1y3NzQGh8
P2qILNhXIRrS2EoAScQOb6F1RPsvbDN9PbihnkShX3r7DXyeynr9jgPy3L2vf0bR
xyu0jtQiqYb34ss7qqdz
=IIsz
-----END PGP SIGNATURE-----
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"This update contains a fairly wide range of changes all over in sound
subdirectory, mainly because of UAPI header moves by David and __dev*
annotation removals by Bill. Other highlights are:
- Introduced the support for wallclock timestamps in ALSA PCM core
- Add the poll loop implementation for HD-audio jack detection
- Yet more VGA-switcheroo fixes for HD-audio
- New VIA HD-audio codec support
- More fixes on resource management in USB audio and MIDI drivers
- More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite,
Roland VG-99, etc
- Add support for FastTrack C400 usb-audio
- Clean ups in many drivers regarding firmware loading
- Add PSC724 Ultiimate Edge support to ice1712
- A few hdspm driver updates
- New Stanton SCS.1d/1m FireWire driver
- Standardisation of the logging in ASoC codes
- DT and dmaengine support for ASoC Atmel
- Support for Wolfson ADSP cores
- New drivers for Freescale/iVeia P1022 and Maxim MAX98090
- Lots of other ASoC driver fixes and developments"
Fix up trivial conflicts. And go out on a limb and assume the dts file
'status' field of one of the conflicting things was supposed to be
"disabled", not "disable" like in pretty much all other cases.
* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (341 commits)
ALSA: hda - Move runtime PM check to runtime_idle callback
ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522
ALSA: hda - Avoid doubly suspend after vga switcheroo
ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3
ALSA: hda - Check validity of CORB/RIRB WP reads
ALSA: hda - use usleep_range in link reset and change timeout check
ALSA: HDA: VIA: Add support for codec VT1808.
ALSA: HDA: VIA Add support for codec VT1705CF.
ASoC: codecs: remove __dev* attributes
ASoC: utils: remove __dev* attributes
ASoC: ux500: remove __dev* attributes
ASoC: txx9: remove __dev* attributes
ASoC: tegra: remove __dev* attributes
ASoC: spear: remove __dev* attributes
ASoC: sh: remove __dev* attributes
ASoC: s6000: remove __dev* attributes
ASoC: OMAP: remove __dev* attributes
ASoC: nuc900: remove __dev* attributes
ASoC: mxs: remove __dev* attributes
ASoC: kirkwood: remove __dev* attributes
...
This branch contains board updates for shmobile that had dependencies
on earlier branches past the first driver branch, and thus are merged
separately.
Most of these are to enable audio and USB on shmobile. They contain a
dependent ASoC branch that has been coordinated with Mark Brown.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJQySyyAAoJEIwa5zzehBx3PmkP/3hvmOJz/WVvsfsU2eomAiD/
QA8NRWCLV4rLdJfe5FUztP0S3UtrA34pdjehwW1drPtX0J4c+o2aap7UKInNPzih
kUj9W+D7tLyzITzHReD5kvP5HbyI+VnNN07N+okYNfpYw+dc9/sYQuQ11SdrgRHA
IUZr0G7uF0RaZQ3tb+WjAgOr09AwDf7lxQenS+TN9wND14jGq91XINfgKuVkD9fF
WhvUj/l/2O+R9t3HkklJQvdxIEbxHd0eaDc4mNJpnTjN3+4yTsaWsFkgfNkGY113
+e5RPx5IkRH6d+IBzYMSGjZtRi4JOQKDT9yce4tLmQtjL03EF6yHtwV1PiYx8FPI
QpY0i9kEGrTA6l7DSBK/4/pUSZHBAeMqaM+/9/9v26JZSGNp8rJzJ2wLaGkADv/v
MUPL0iu86pRpOOur6ArHwu3uwOf7UCalXWTHB/3fFcpspR1x+FtA7qMTvKh/wQSp
0DhOVD5MbEq/MByqp0VKLLzzbXnPgkWeFNKsRXdMJOVfPpUygC1QIJcT2zC38Tc0
8yJM0q/omAzUVO4LytcQQwiqCVLce6BRJa+cbv8olET4kZ4bG3sVsrbXyTk8H/N5
VO2lu9/cXexHJCg5HNOmmF7SrG56iuLXtNwRriy6j1DSd1A12p8fvMJt28562KLw
voCOaNlGm5uYcbLn0M4b
=1a/W
-----END PGP SIGNATURE-----
Merge tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates, take 2 from Olof Johansson:
"This branch contains board updates for shmobile that had dependencies
on earlier branches past the first driver branch, and thus are merged
separately.
Most of these are to enable audio and USB on shmobile. They contain a
dependent ASoC branch that has been coordinated with Mark Brown."
* tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: shmobile: mackerel: Add FLCTL IRQ resource
ARM: shmobile: use FSI driver's audio clock on ap4evb
ARM: shmobile: use FSI driver's audio clock on mackerel
ARM: shmobile: use FSI driver's audio clock on armadillo800eva
ARM: shmobile: mackerel: enable DMAEngine on USB Host
ARM: shmobile: marzen: add USB OHCI driver support
ARM: shmobile: marzen: add USB EHCI driver support
ARM: shmobile: marzen: add USB phy support
ASoC: fsi: add master clock control functions
ASoC: fsi: care fsi_hw_start/stop() return value
ASoC: fsi: fsi_set_master_clk() was called from fsi_hw_xxx() only
ASoC: fsi: use devm_request_irq()
ASoC: fsi: fixup channels_min/max
This branch contains a largeish set of updates of power management and
clock setup. The bulk of it is for OMAP/AM33xx platforms, but also a
few around hotplug/suspend/resume on Exynos.
It includes a split-up of some of the OMAP clock data into separate
files which adds to the diffstat, but gross delta is fairly reasonable.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJQySrdAAoJEIwa5zzehBx3XBMQAJCgrE/I1vbuiENiVMLpQkN7
0Y5t89SwoALnme5jsM8vW/H0o6b163FfH+249UNs6dyk6MdCqqSv8cQVvSfCKRKn
m4JTXS6njSnYgU025klNU9W3FyMuFcgH8b63+c5+sCcqfvdkxrjpNoKqAYNxQlgJ
6DHgHCKZP3JB1e2EFqViw0GJgZIjTNxlWvx8XLcAShSapQ+Ovq/iAcKo41o7ZadB
4zV//VkBMv0TLNTs6SoR0EO8qM+2nIUKE8fgPrRxvvb98tuasKPvlSq9VUeIjnYk
kWjNTQYbD1IkrAMPYrwcpLU3xkEr14wrKDBtPK6GdCDcXzdyKq3fzROOXNsqrLmn
Y8PkY+J39B59F0DKjyrCjasZyi0tQQV6ps5Xm2X2CB003GWEbo1yu+BodShYEyaL
7OvkLiVpOtq+LOYcsScHtOGdO9le2O3yZevNRvlrCDCvJUYbXNjaM9ZrWcQuTlJc
oseYNSRPaIP5PMv2c+Xup9qh/dyAjj8g6gSi9BlDvwVOu/+Cf3laaCAXaFph22jT
/m8fW2paiP5UJ0gSt1MLAGFxKi0YI/Qxck8G11LJxUwMZd3SIfOPUAY27tnNC4yL
GRynOi3BFRMUAe/Leu2qgwEyoME5nHn+OmAKb36WTYH/HL+PGzHq84e+Wfdan8ha
YcSKc1A52LSoYTi4XTUX
=h2Qo
-----END PGP SIGNATURE-----
Merge tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC power management and clock changes from Olof Johansson:
"This branch contains a largeish set of updates of power management and
clock setup. The bulk of it is for OMAP/AM33xx platforms, but also a
few around hotplug/suspend/resume on Exynos.
It includes a split-up of some of the OMAP clock data into separate
files which adds to the diffstat, but gross delta is fairly reasonable."
* tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h
ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support
watchdog: OMAP: fixup for ARM multiplatform support
ARM: EXYNOS: Add flush_cache_all in suspend finisher
ARM: EXYNOS: Remove scu_enable from cpuidle
ARM: EXYNOS: Fix soft reboot hang after suspend/resume
ARM: EXYNOS: Add support for rtc wakeup
ARM: EXYNOS: fix the hotplug for Cortex-A15
ARM: OMAP2+: omap_device: Correct resource handling for DT boot
ARM: OMAP2+: hwmod: Add possibility to count hwmod resources based on type
ARM: OMAP2+: hwmod: Add support for per hwmod/module context lost count
ARM: OMAP2+: PRM: initialize some PRM functions early
ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n
ARM: OMAP4: USB: power down MUSB PHY during boot
ARM: OMAP2+: clock: Cleanup !CONFIG_COMMON_CLK parts
ARM: OMAP2xxx: clock: drop obsolete clock data
ARM: OMAP2: clock: Cleanup !CONFIG_COMMON_CLK parts
ARM: OMAP3+: DPLL: drop !CONFIG_COMMON_CLK sections
ARM: AM33xx: clock: drop obsolete clock data
ARM: OMAP3xxx: clk: drop obsolete clock data
...
Here are more patches in the progression towards multiplatform, sparse
irq conversions in particular.
Tegra has a handful of cleanups and general groundwork, but is
not quite there yet on full enablement.
Platforms that are enabled through this branch are VT8500 and Zynq. note
that i.MX was converted in one of the earlier cleanup branches as
well (before we started a separate topic for multiplatform). And both
new platforms for this merge window, sunxi and bcm, were merged with
multiplatform support enabled.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJQySb/AAoJEIwa5zzehBx3Wo4P/0GrpUhB/qwuhgy43MA2I1Dv
tnyuFvsfW9uRExcw2IwT39GFls98QUM9TwQxPqOTHVf+u0LkYMZ9aDeWJOdj3RvG
H70Ypj4gZDrzZAFr2TUf8NnYGHd6G2EcMn3261Hjfd7YrswCjsMPvgRns7VOyHCa
deif3KcLu3+HzxvuzqlVlTuSAagCQbfqqnTQduMRdJPHT3X3sXwl7ABW+qfOoeYC
rjqIbjdh5dB1d/f7igtgBbXjSTnVz/Mr1+wk4rp9Xr1Wv0IXvIaSKjK2Df8ZuNAk
aQ6mMy/oDVxlDSrYv0F7lB40/rsZcPqz8+fgYJ2FnvCpIM7z7NeTWD2kQJ2UaQ/s
VunShloRxF8It6104EVWZDfEA9NvVBcCALSze0NukqiHZRZYGUzxRNQDrncaksC9
Lm+Z16cUWogsZq7VDCgXYQJeakPQfBDnsx7siMvAbOgvtpSClxuwhdC/czJiix7h
BcpA+l5xSviUhHvzHhDt9iJxHjbUmo1xLDvaZSgj2OjAj257JcwaNBCk5BjZTCwe
xZmQu1FjwaGtjLiG6QY0WJRsq1hiFRIb/MaWar/WpfqADFqARoambGFUjOl+P4Mu
DIM5Z0AS04H+pLuP1QOz/yXxOPEP6Ri36to6XrgzfL/XGet5LW2P59xXxhcWC/OL
/3IAcQrsAqh4aGMOstW1
=UJlh
-----END PGP SIGNATURE-----
Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC multiplatform conversion patches from Olof Johansson:
"Here are more patches in the progression towards multiplatform, sparse
irq conversions in particular.
Tegra has a handful of cleanups and general groundwork, but is not
quite there yet on full enablement.
Platforms that are enabled through this branch are VT8500 and Zynq.
Note that i.MX was converted in one of the earlier cleanup branches as
well (before we started a separate topic for multiplatform). And both
new platforms for this merge window, sunxi and bcm, were merged with
multiplatform support enabled."
Fix up conflicts mostly as per Olof.
* tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
ARM: zynq: Remove all unused mach headers
ARM: zynq: add support for ARCH_MULTIPLATFORM
ARM: zynq: make use of debug_ll_io_init()
ARM: zynq: remove TTC early mapping
ARM: tegra: move debug-macro.S to include/debug
ARM: tegra: don't include iomap.h from debug-macro.S
ARM: tegra: decouple uncompress.h and debug-macro.S
ARM: tegra: simplify DEBUG_LL UART selection options
ARM: tegra: select SPARSE_IRQ
ARM: tegra: enhance timer.c to get IO address from device tree
ARM: tegra: enhance timer.c to get IRQ info from device tree
ARM: timer: fix checkpatch warnings
ARM: tegra: add TWD to device tree
ARM: tegra: define DT bindings for and instantiate RTC
ARM: tegra: define DT bindings for and instantiate timer
clocksource/mtu-nomadik: use apb_pclk
clk: ux500: Register mtu apb_pclocks
ARM: plat-nomadik: convert platforms to SPARSE_IRQ
mfd/db8500-prcmu: use the irq_domain_add_simple()
mfd/ab8500-core: use irq_domain_add_simple()
...
Fix the quirk entry for HP Pavilion dv7 in order to make the bass
speaker working.
Reported-and-tested-by: Tomas Pospisek <tpo2@sourcepole.ch>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The runtime_idle callback is the right place to check the suspend
capability, but currently we do it wrongly in the runtime_suspend
callback. This leads to a kernel error message like:
pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50 [snd_hda_intel] returns -11
and the runtime PM core would even repeat the attempts.
Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Cc: <stable@vger.kernel.org> [v3.7]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acer Aspire One 522 has the infamous digital mic unit that needs the
phase inversion fixup for stereo.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=715737
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The HD-audio driver artificially calls the suspend and the resume code
path in the VGA switcheroo state changes. When a machine goes to
suspend, it tries to suspend the device again, and it stalls at
snd_power_wait().
This patch adds checks whether the devices were already in (forced)
suspend in PM callbacks for avoiding the doubly suspend.
Reported-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The only required change is to extend the existing Xonar U1
mixer quirks to the U3, which seems to be controlled the same
way.
Signed-off-by: Denis Washington <denisw@online.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the HD-audio controller is disabled (e.g. via vga switcheroo) but
the driver is still accessing it, it spews floods of "spurious
response" kernel messages. It's because CORB/RIRB WP reads 0xff, and
the driver tries to fill up until this number.
This patch changes the CORB/RIRB WP reads to word instead of byte, and
add the check of the read value. If it's 0xffff, the controller is
supposed to be disabled, so the further action will be skipped.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reducing the time on HDA link reset can help to reduce the driver loading
time. So we replace msleep with usleep_range to get more accurate time
control and change the value to a smaller one. And a 100ms timeout is set
for both entering and exiting the link reset.
Signed-off-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for new codec VT1808, which is similiar with VT1705CF.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for new codec VT1705CF.
When power on/off Audio output converter of VT1705CF, the stream tag
will be cleared. But driver caches the value. So when power on Audio
output converter, the update_conv_power_state() will restore the saved
stream tag of it.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some incremental updates, nothing too exciting. The biggest block here
is the __dev annotation removal stuff from Bill, everything else is the
usual driver-specific stuff - a combination of fixes and development.
There will be at least more more set of fixes to come but I wanted to
get these out ready for the merge window to make sure Bill's stuff makes
it in.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJQxK9SAAoJELSic+t+oim9MNEP/RzdU9/vHK2xeZ8O7SsIC4T+
TMIzNLNyjMGA8qOJXmd5iwdTE/Cxh7OEYJvG/qUony8XipjdGC6V4e+Ybbl55Kc8
mf/5fytyTX3+1eZ0uYHVrTMGcSfZ7qelmUXbIASo4jiqZUm2Uo/jar10Omy5EG/J
mn7dtt67bOoiWugMhBEeKslwDSOQFBL2qcMbkWVRfqpvCLPqT7gg12OfQbrfb/ZV
Ucj9zVMblel3ziWkElKxgm1Sfo60ExyekbnR11yLlSe8NfX6ky+46lUj3SEwCIzv
8sknZYwGdGgb0bgNMzeqwUtPS1smCH46/5UVul6of9ox9DafKklfu01jdRg27zTj
c95YQDDw3CtQap8FXjKIB5pn3zRl8pK7zYllZdEdUF0tYhaFSrCt566nXLfuZ3Fq
jVkpwQe4u/oCmDlBpZUGlzyv0Vo7xarm79q2RYvgpNPN310mlufKjcJyhm5kAxdp
6RTKcxtW6IrB8r5MmkBcyLiRoVjt/3e1dK0lOgp66NjSmo+GPSi7Yf4KKjTS6dDL
kJ8Tiv9xI2daY0ZKwNu/3ifQPx3c2KLw9aoEb/R9RMe+LbulZu8DJcm0xpc1jYWP
x63MSLfYwCO373dIuobv7O4PuI5hu11tArIYosBuq2vUuyQ9ymqGdsquYMXM10DA
FKHsSz3oC3jMr4nhsUyt
=Ywvf
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.8
Some incremental updates, nothing too exciting. The biggest block here
is the __dev annotation removal stuff from Bill, everything else is the
usual driver-specific stuff - a combination of fixes and development.
There will be at least more more set of fixes to come but I wanted to
get these out ready for the merge window to make sure Bill's stuff makes
it in.
Since VSP only has one power bit, only provide one DAPM widget.
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add power down delays between setting PDN and MCLKDIS for spk amp, spklo amp, and ear amp.
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The 'addr' field of the sigma_action struct is stored as big endian in the
firmware file.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>