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>
Add a new helper function to guess the default VREF pin control bits
for mic in. This can be used to set the pin control value safely
matching with the actual pin capabilities.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For setting the pin-control values more safely to match with the
actual pin capability bits, a copule of new helper functions,
snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are
introduced. These are simple replacement of the codec verb write with
AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out
superfluous pin-control bits if they don't fit with the corresponding
pin capabilities.
Some codecs are screwed up or ignore the command when such a wrong bit
is set. These helpers will avoid such secret errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The function now gives more unique names for the output pins by adding
some prefix and suffix for the location and the channels. Otherwise, it
can pass the index number.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Create a new helper function snd_hda_get_pin_label() for getting a label
string for both input and output pins. hda_get_input_pin_label() is
obsoleted by this function, and the callers are replaced appropriately
now by this patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up. So
fix up those users now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
The SPDIF output controls apply to converter widgets. A future change
will create a PCM device per pin widget, and hence a set of SPDIF output
controls per pin widget, for certain HDMI codecs. To support this, we
need the ability to virtualize the SPDIF output controls. Specifically:
* Controls can be "unassigned" from real hardware when a converter is
not used for the PCM the control was created for.
* Control puts only write to hardware when they are assigned.
* Controls can be "assigned" to real hardware when a converter is picked
to support output for a particular PCM.
* When a converter is assigned, the hardware is updated to the cached
configuration.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The dig_out_nid field must take a digital-converter widget, but the current
ca0110 parser passed the pin wrongly instead.
Reported-by: Wai Yew CHAY <wychay@ctl.creative.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch improves the input-source label strings to be generated from
the pin information instead of fixed strings per AUTO_PIN_* type.
This gives more suitable labels, especially for mic and line-in pins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the missing definition of max channels for CA0110, which resulted
in an error at opening PCM devices.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the support for Creative SB X-Fi boards with UAA (HD-audio) mode.
In the HD-audio mode, no multiple streams are supported by just it
behaves like a normal HD-audio device.
Signed-off-by: Takashi Iwai <tiwai@suse.de>