Commit Graph

4528 Commits

Author SHA1 Message Date
Lydia Wang
ba31a60d0f ALSA: VIA HDA: Mute/unmute mixer conncted to Headphone for VT1718S.
When switch HP independent mode, mute/unmute connctions of mixer  which is
connected to headphone for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-21 07:23:19 +02:00
Lydia Wang
42467b32ce ALSA: VIA HDA: Modify initial verbs list for VT1718S.
Remove some invalid initial verbs and correct some wrong initial verbs
for VT1718S codec.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-21 07:22:57 +02:00
Tony Vroon
c933790614 ALSA: hda - Remove ALC268 model override for CPR2000
The "diverse" Quanta ID 0x0763 is overridden to ALC268_ACER.
This keeps headphone automute and microphone input from operating
on at least one laptop from Opti Systems.
Without the override, the BIOS parser does a fine job setting the
card up and everything works.

Tested-By: Peter Schneider <e.at.chi.kaen@googlemail.com>
Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-21 07:18:36 +02:00
David Henningsson
6f2e810ad5 ALSA: HDA: Remove quirk for an HP device
The reporter, who is running kernel 2.6.38, reports that
he needs to set model=auto for the headphone output to work
correctly.

BugLink: http://bugs.launchpad.net/bugs/761022
Cc: stable@kernel.org (v2.6.38+)
Reported-by: Jo
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:32:50 +02:00
Takashi Iwai
ada509ec00 ALSA: hda - Simplify analog-low-current mode check for VIA codecs
Use the existing aa-loop list for simplifying the check for analog
low-current mode.  Also fix the stream count test for playback streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:16 +02:00
Takashi Iwai
47be05ce0a ALSA: hda - Remove NID_MAPPING hacks in patch_via.c
There is no longer virtual kmixer element for NID mapping.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:16 +02:00
Takashi Iwai
c619160787 ALSA: hda - Remove unused defines and struct fields in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:15 +02:00
Takashi Iwai
6aadf41d6b ALSA: hda - Name the primary out as Speaker when needed for VIA codecs
When the primary output is the speaker output, rather name it as
"Speaker".  This will be more intuitive.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:14 +02:00
Takashi Iwai
13af8e77ea ALSA: hda - Create loopback-list dynamically in patch_via.c
Create loopback list dynamically from the parsed input pins for VIA
codecs instead of the fixed arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:13 +02:00
Takashi Iwai
e3d7a1431f ALSA: hda - Fix smart51 handling again
Fix the broken detection of smart51 and its handling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:12 +02:00
Takashi Iwai
370bafbdae ALSA: hda - Create virtual-master control for VIA codecs
Now let's add the missing Master control to VIA codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:12 +02:00
Takashi Iwai
4a918ffeaa ALSA: hda - Initialize unsol events dynamically in patch_via.c
Issue the init verbs of unsolicited events dynamically from the parsed
results for VIA codecs.  Also, consolidate the unsol handlers for HP
and line-out mutes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:11 +02:00
Takashi Iwai
096a885494 ALSA: hda - Initialize input-path dynamically in patch_via.c
Similarly like the previous commit, initialize the input-paths dynamically
from the parsed results instead of the fixed array for VIA codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:10 +02:00
Takashi Iwai
5d41762a21 ALSA: hda - Initialize output path dynamically in patch_via.c
Instead of fixed array for each codec type, initialize the output path
dynamically from the parsed results.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:09 +02:00
Takashi Iwai
0fe0adf82f ALSA: hda - Replace with standard consts in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:09 +02:00
Takashi Iwai
ece8d0431f ALSA: hda - Fix independent-HP handling in patch_via.c
Fix races in handling of HP DAC and independent streams for VIA codecs.
Also, allow the HP output path without front-DAC, and removed
unnecessary activation of HP mixer elements.

This also removes the handling of shared side/HP stream; it's anyway
implemented in a broken way, so we need to re-implement the feature
later...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:08 +02:00
Takashi Iwai
12daef65fd ALSA: hda - Unify auto-parser in patch_via.c
Now all codecs use the same parser-path, so we can reduce into a single
auto-parser function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:07 +02:00
Takashi Iwai
7f0df88ce0 ALSA: hda - Return error for invalid setup for VIA
Instead of ignoring the invalid pin configuration, return the error.
This will avoid unexpected crash, anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:06 +02:00
Takashi Iwai
d7a99cce55 ALSA: hda - Unify capture-mixer creations in patch_via.c
Create capture-related mixer elements dynamically from the parsed
ADCs and input-pins instead of fixed values for each codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:05 +02:00
Takashi Iwai
7eb56e84e6 ALSA: hda - Assign HP-independent PCM to individual stream
Instead of using the secondary substream, create an individual PCM
stream for HP-independent PCM.  Otherwise it's difficult to handle
different channel numbers with multi-channel stream in the sam PCM
stream structure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:05 +02:00
Takashi Iwai
9af7421091 ALSA: hda - Unify PCM assignments in patch_via.c
Unify PCM streams for all codecs by assigning the NID dynamically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:04 +02:00
Takashi Iwai
57307bf24a ALSA: hda - Don't create secondary substream when no independent-hp is used
For VIA codecs, we shouldn't create a substream for independent HP mode,
when no individual HP DAC is found.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:03 +02:00
Takashi Iwai
f4a7828bc1 ALSA: hda - Re-implement smart51 detection for VIA codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:02 +02:00
Takashi Iwai
4a79616d07 ALSA: hda - Unify output-control parsing in patch_via.c
Parse the output-paths more dynamically, i.e. traverse the paths
from each output pin instead of fixed assignment for each codec.
Now all codecs are using the same output parser code.

The smart51 setup doesn't work with this change, and will be fixed
in the next commits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:01 +02:00
Takashi Iwai
620e2b28b7 ALSA: hda - Unify input-volume creations in patch_via.c
Now storing the analog-mixer widget in spec, we can simplify the rest
parts.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:01 +02:00
Takashi Iwai
64be285b66 ALSA: hda - Auto-mute all LO and speakers in patch_via.c
Muting all line-outs and/or speakers is more common in other drivers,
so we should follow it, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:24:00 +02:00
Takashi Iwai
3e0693e278 ALSA: hda - Change pin-ctl for auto-muting in patch_via.c
Mute the outputs via pin-controls instead of amps for the auto-mute
handling.  This makes our life easier as it avoids conflict of the states
between the mixer elements and the auto-mute toggles.

With this change, we can use vmaster for the master control easily now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:59 +02:00
Takashi Iwai
82673bc895 ALSA: hda - Generate PCM names dynamically in patch_via.c
This reduces lots of static strings.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:58 +02:00
Takashi Iwai
291c9e33bf ALSA: hda - Refactor ctl array handling in patch_via.c
No functional change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:57 +02:00
Takashi Iwai
e06e5a2974 ALSA: hda - Defer mixer element creation to the right time in patch_via.c
The jack-detect control should be created at the time of build_controls
callback instead of calling snd_hda_add_ctls() at the tree-parsing time.
For that, copy the control to the temporary array like other cases.

Also, fixed typos of vt1708_jack_detect in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:56 +02:00
Takashi Iwai
a766d0d763 ALSA: hda - Fill ADCs dynamically for VIA codecs
Instead of giving the fixed ADC list, parse the widgets and fill in
ADCs dynamically.

Also, probe the stereo-mixer input more dynamically, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:55 +02:00
Takashi Iwai
24088a58d6 ALSA: hda - Add control to suppress the dynamic pin-power for VIA
Currently VIA driver controls the power-state of each pin per jack
detection.  But, it means that the power-state mismatch may occur when
the machine doesn't give the proper jack-detection.

For avoiding this problem, a new control element "Dynamic Power-Control"
is provided so that user can turn on/off the pin-power control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:23:55 +02:00
Takashi Iwai
5f4b36d64d ALSA: hda - Remove superfluous NID_MAPPING use for smart51 mixer
Just a minor clean up; nid-mapping can be set directly to the smart51
mixer element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-20 16:07:02 +02:00
David Henningsson
b13e552d37 ALSA: HDA: Remove redundant LPIB quirks for ATI chipset
Now that we have changed the position_fix default for ATI and AMD
to be LPIB (see commit 50e3bbf989), we can remove the quirks that
were added for ATI chipsets.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17 18:48:23 +02:00
Takashi Iwai
3409fcd1f7 Merge branch 'fix/hda' into topic/misc 2011-06-17 14:54:47 +02:00
Takashi Iwai
ad2409413d ALSA: hda - Fix no NID error with VIA codecs
The via driver spews warnigs like
	hda-codec: no NID for mapping control Independent HP:0:0
with some codecs because snd_hda_add_nid() is called with nid=0.
This patch fixes it by skipping the call when no corresponding widget
is found.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17 14:23:46 +02:00
Clemens Ladisch
f4b1e98aa9 ALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods
Since commit f2b3614cef (Don't check DMA time-out too shortly),
drivers need no longer restrict their PCM period length to be shorter
than 10 seconds.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17 11:36:30 +02:00
Harry Butterworth
030aba53ea ALSA: ctxfi: Change PLL initialization code
This is a reworked patch from Creative to change the PLL code to address
unreliable 44100Hz initialization.

Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-16 07:28:57 +02:00
Takashi Iwai
e72888e91c ALSA: lola - Fix section mismatch
Add missing __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-15 15:14:49 +02:00
Takashi Iwai
30bdee0259 ALSA: es1968,maestro3 - Use work for hw-volume control
Instead of tasklet, use workq for handling the hw-volume control.
This reduces lots of spinlocks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14 13:59:51 +02:00
Takashi Iwai
85e4d95da0 Merge branch 'test/pci-rename' into topic/misc 2011-06-14 08:56:42 +02:00
Takashi Iwai
ca2585afa0 ALSA: hda - Fix missing static inline to beep dummy function
The commit 2308f4add3 missed static inline
thus it resulted in multiple-definitions error at linking.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14 08:14:32 +02:00
Harry Butterworth
b028b81835 ALSA: ctxfi: Implement a combined capabilities query method to replace multiple have_x query methods.
Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14 07:34:03 +02:00
Harry Butterworth
55309216ba ALSA: ctxfi: Add support for Creative Titanium HD
Initialise model-specific DAC and ADC parts.
Add controls for output and mic source selection.
Rename some mixer controls according to ControlNames.txt.
Remove Playback switches for Line-in and IEC958-in - these
were controlling the input mute/unmute which affected
capture too.  Use the capture switches to control the
input mute/unmute instead - it's less confusing.
Initialise the WM8775 to invert the left-right clock
to swap the left and right channels of the mic and aux
input.

Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14 07:32:29 +02:00
Greg Thelen
9857edfd4d ALSA: hda: check make_exec_verb() return value
If given a -1 cmd parameter then make_exec_verb() returns -1 without
setting the res output value.

Prior to this change snd_hda_codec_read() assumed that make_exec_verb()
unconditionally set res regardless of the cmd value.

This change explicitly checks the make_exec_verb() return value before
consuming the potentially unset res value.

Signed-off-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-13 17:52:06 +02:00
Takashi Iwai
5ab775c707 Merge branch 'fix/hda' into topic/hda 2011-06-13 08:37:53 +02:00
Joe Perches
2308f4add3 ALSA: hda - Fix beep_device compilation warnings
Using static inline functions can reduce compilation messages
and macro misuse.

 sound/pci/hda/patch_conexant.c: In function ‘patch_cxt5045’:
 sound/pci/hda/patch_conexant.c:1232:3: warning: statement with no effect

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-13 08:36:26 +02:00
Takashi Iwai
54463a66b9 ALSA: hda - Fix wrong auto-mute type for Acer Aspire-one
The auto-mute setup for Acer Aspire-one with ALC268 was set wrongly
during the clean-up of auto-mute function.  Fixed now.

Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-13 08:32:06 +02:00
Florian Zeitz
ac5d4b404e ALSA: emu10k1: Add details for E-mu 0404 PCIe version
This patch adds the necessary details to support the PCIe version of
E-MU's 0404 card.
From comparing the PCBs it seems the PCIe version just added a PCIe
chipset and left all other components pretty much in place.
For anyone intrigued to take a look at the PCB there are pictures I took
at <http://babelmonkeys.de/~florob/E-MU%200404/>.

Signed-off-by: Florian Zeitz <florob@babelmonkeys.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12 21:24:17 +02:00
Adrian Knoth
efef054e8c ALSA: hdspm - Add firmware revision ID for RME MADI PCI version
The PCI version of the RME HDSP MADI card uses 0xcf as revision ID. Just
add this to the list of supported cards.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12 18:50:08 +02:00
Adrian Knoth
fedf1535ab ALSA: hdspm - Fix jumping external wordclock frequency in AutoSync mode
When using Word Clock on RME MADI cards, AutoSync mode was alternating
betweeen MADI and WC due to a typo: AutoSync is indicated in the second
status register (status2), not the first one (status).

While the proc output was always correct, the reported WC frequency to
ALSA was unstable as mentioned in

http://mailman.alsa-project.org/pipermail/alsa-devel/2008-March/006723.html

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12 18:49:56 +02:00
Adrian Knoth
c0da00145f ALSA: hdspm - Fix locking in snd_hdspm_midi_input_read
For the MIDI part, we need to acquire (and release) the hmidi->lock,
access to the global hdspm structure is serialized through
hmidi->hdspm->lock instead.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12 18:49:42 +02:00
Takashi Iwai
934c2b6d0c ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*
The name argument of request_irq() appears in /proc/interrupts, and
it's quite ugly when the name entry contains a space or special letters.
In general, it's simpler and more readable when the module name appears
there, so let's replace all entries with KBUILD_MODNAME.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:36:37 +02:00
Daniel T Chen
7ab1fc0af3 ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
BugLink: https://launchpad.net/bugs/761171

The original reporter needs the model=auto quirk for his internal
speakers to be audible in the latest daily snapshot, so add an entry in
the quirk table for his PCI SSID.

A trivially different version of this patch using the model=asus quirk
should be applied to the 2.6.38 and 2.6.39 stable kernels. We don't use
the asus quirk in 3.0-rc2, because 3.0-rc2's autoparser is much
improved.

Reported-and-tested-by: tomdeering7
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:31:24 +02:00
Takashi Iwai
3733e424c4 ALSA: Use KBUILD_MODNAME for pci_driver.name entries
The convention for pci_driver.name entry in kernel drivers seem to be
the module name or equivalent ones.  But, so far, almost all PCI sound
drivers use more verbose name like "ABC Xyz (12)", and these are fairly
confusing when appearing as a file name.

This patch converts the all pci_driver.name entries in sound/pci/* to
use KBUILD_MODNAME for more unified appearance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:20:20 +02:00
Takashi Iwai
c0a20263db ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
Some Reatlek model quirks use master_mute bool switch for controlling
the master-mute of outputs.  For these cases, the initialization of HP
pins/amps were forgotten during the transition to the common automute
helper function in 3.0 development time, and resulted in the muted HP
output as default.

This patch fixes the issue by adjusting the HP output explicitly with
master_mute switch.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 15:28:15 +02:00
Takashi Iwai
20f5e0b36d ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
The tag number was forgotten to be fixed after cleaning up the model
quirks for ALC262 fujitsu and lenovo-3000 models.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 15:27:32 +02:00
Takashi Iwai
8b0bd2266f ALSA: hda - Fix SSYNC register value for non-Intel controllers
SSYNC register was once defined as 0x34-37 in the old Intel datasheet,
but corrected later to 0x38-3b.  For fixing the register usage, a new
bit-flag is introduced for indicating the old ICH SSYNC register, and
ICH* PCI entries are added explicitly to enable this quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 15:00:07 +02:00
Takashi Iwai
695cd4a34e ALSA: hda - Disable SPDIF only when no pin config set for HP with AD1981
Some HP laptops with AD1981 have SPDIF connections, but currently the
driver disables it statically.  Better to check the pin default config
to judge whether to enable or disable the SPDIF.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 14:37:04 +02:00
Takashi Iwai
b4a655e81d ALSA: hda - Judge playback stream from stream id in azx_via_get_position()
Instead of checking the azx_dev index with a fixed number (4), check
the stream direction of the assigned substream.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07 12:26:56 +02:00
Takashi Iwai
a810364a04 ALSA: hda - Handle -1 as invalid position, too
When reading from the position-buffer results in -1, handle as it's
invalid and falls back to LPIB mode as well as 0.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07 12:23:23 +02:00
Daniel T Chen
0a1896b27b ALSA: hda: Fix quirk for Dell Inspiron 910
BugLink: https://launchpad.net/bugs/792712

The original reporter states that sound from the internal speakers is
inaudible until using the model=auto quirk. This symptom is due to an
existing quirk mask for 0x102802b* that uses the model=dell quirk. To
limit the possible regressions, leave the existing quirk mask but add
a higher priority specific mask for the reporter's PCI SSID.

Reported-and-tested-by: rodni hipp
Cc: <stable@kernel.org> [2.6.38+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-07 07:26:01 +02:00
Stephen Warren
384a48d715 ALSA: hda: HDMI: Support codecs with fewer cvts than pins
The general concept of this change is to create a PCM device for each
pin widget instead of each converter widget. Whenever a PCM is opened,
a converter is dynamically selected to drive that pin based on those
available for muxing into the pin.

The one thing this model doesn't support is a single PCM/converter
sending audio to multiple pin widgets at once.

Note that this means that a struct hda_pcm_stream's nid variable is
set to 0 except between a stream's open and cleanup calls. The dynamic
de-assignment of converters to PCMs occurs within cleanup, not close,
in order for it to co-incide with when controller stream IDs are
cleaned up from converters.

While the PCM for a pin is not open, the pin is disabled (its widget
control's PIN_OUT bit is cleared) so that if the currently routed
converter is used to drive a different PCM/pin, that audio does not
leak out over a disabled pin.

We use the recently added SPDIF virtualization feature in order to
create SPDIF controls for each pin widget instead of each converter
widget, so that state is specific to a PCM.

In order to support this, a number of more mechanical changes are made:

* s/nid/pin_nid/ or s/nid/cvt_nid/ in many places in order to make it
  clear exactly what the code is dealing with.

* We now have per_pin and per_cvt arrays in hdmi_spec to store relevant
  data. In particular, we store a converter's capabilities in the per_cvt
  entry, rather than relying on a combination of codec_pcm_pars and
  the struct hda_pcm_stream.

* ELD-related workarounds were removed from hdmi_channel_allocation
  into hdmi_instrinsic in order to simplifiy infoframe calculations and
  remove HW dependencies.

* Various functions only apply to a single pin, since there is now
  only 1 pin per PCM. For example, hdmi_setup_infoframe,
  hdmi_setup_stream.

* hdmi_add_pin and hdmi_add_cvt are more oriented at pure codec parsing
  and data retrieval, rather than determining which pins/converters
  are to be used for creating PCMs.

This is quite a large change; it may be appropriate to simply read the
result of the patch rather than the diffs. Some small parts of the change
might be separable into different patches, but I think the bulk of the
change will probably always be one large patch. Hopefully the change
isn't too opaque!

This has been tested on:

* NVIDIA GeForce 400 series discrete graphics card. This model has the
  classical 1:1:1 codec:converter:pcm widget model. Tested stereo PCM
  audio to a PC monitor that supports audio.

* NVIDIA GeForce 520 discrete graphics card. This model is the new
  1 codec n converters m pins m>n model. Tested stereo PCM audio to a
  PC monitor that supports audio.

* NVIDIA GeForce 400 series laptop graphics chip. This model has the
  classical 1:1:1 codec:converter:pcm widget model. Tested stereo PCM,
  multi-channel PCM, and AC3 pass-through to an AV receiver.

* Intel Ibex Peak laptop. This model is the new 1 codec n converters m
  pins m>n model. Tested stereo PCM, multi-channel PCM, and AC3 pass-
  through to an AV receiver.

Note that I'm not familiar at all with AC3 pass-through. Hence, I may
not have covered all possible mechanisms that are applicable here. I do
know that my receiver definitely received AC3, not decoded PCM. I tested
with mplayer's "-afm hwac3" and/or "-af lavcac3enc" options, and alsa a
WAV file that I believe has AC3 content rather than PCM.

I also tested:
* Play a stream
* Mute while playing
* Stop stream
* Play some other streams to re-assign the converter to a different
  pin, PCM, set of SPDIF controls, ... hence hopefully triggering
  cleanup for the original PCM.
* Unmute original stream while not playing
* Play a stream on the original pin/PCM.

This was to test SPDIF control virtualization.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:58:14 +02:00
Stephen Warren
2def8172c6 ALSA: hda: hdmi_eld_update_pcm_info: update a stream in place
A future change won't store an entire hda_pcm_stream just to represent
the capabilities of a codec; a custom data-structure will be used. To
ease that transition, modify hdmi_eld_update_pcm_info to expect the
hda_pcm_stream to be pre-initialized with the codec's capabilities, and
to update those capabilities in-place based on the ELD.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:58:09 +02:00
Stephen Warren
3aaf898025 ALSA: hda: Separate generic and non-generic implementations
A future change will significantly rework the generic implementation
in order to support codecs with a different number of pins and
converters. Isolate the more custom codec variants from this change by
duplicating the small portions of generic code they share. This
simplifies the later rework of that previously shared code, since we
don't have to consider the more custom codecs, and also prevents
support for those codecs from regressing.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:58:05 +02:00
Stephen Warren
74b654c957 ALSA: hda: Virtualize SPDIF out controls
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>
2011-06-06 12:51:59 +02:00
Stephen Warren
7c93597627 ALSA: hda: Allow multple SPDIF controls per codec
Currently, the data that backs the kcontrols created by
snd_hda_create_spdif_out_ctls is stored directly in struct hda_codec. When
multiple sets of these controls are stored, they will all manipulate the
same data, causing confusion. Instead, store an array of this data, one
copy per converter, to isolate the controls.

This patch would cause a behavioural change in the case where
snd_hda_create_spdif_out_ctls was called multiple times for a single codec.
As best I can tell, this is never the case for any codec.

This will be relevant at least for some HDMI audio codecs, such as the
NVIDIA GeForce 520 and Intel Ibex Peak. A future change will modify the
driver's handling of those codecs to create multiple PCMs per codec. Note
that this issue isn't affected by whether one creates a PCM-per-converter
or PCM-per-pin; there are multiple of both within a single codec in both
of those codecs.

Note that those codecs don't currently create multiple PCMs for the codec
due to the default HW mux state of all pins being to point at the same
converter, hence there is only a single converter routed to any pin, and
hence only a single PCM.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:48:59 +02:00
Stephen Warren
c3d5210575 ALSA: hda: Gate ELD usage only by whether ELD is valid
It's perfectly valid for an ELD to contain no SADs. This simply means that
only basic audio is supoprted.

In this case, we still want to limit a PCM's capabilities based on the ELD.

History:

* Originally, ELD application was limited solely by sad_count>0, which
  was used to check that an ELD had been read.
* Later, eld_valid was added to the conditions to satisfy.

This change removes the original sad_count>0 check, which when squashed
with the above two changes ends up replacing if (sad_count) with
if (eld_valid).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:48:45 +02:00
Joe Perches
d50a2fb636 ALSA: asihpi: Use angle brackets for system includes
Use the normal include style.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 11:46:37 +02:00
Dan Carpenter
9676001559 ALSA: fm801: add error handling if auto-detect fails
In the original code if auto detect failed and tea575x_tuner == 4
then we copy bogus information to chip->tea.card.  I've changed the
autodetect code to cleanup and return -ENODEV on error instead.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 10:11:17 +02:00
Raymond Yau
a01ef051d5 ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write
Check whether the pin supports EAPD in ad198x_power_eapd_write.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 10:08:46 +02:00
Takashi Iwai
4dffbe03d1 ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd()
In ad198x_power_eapd(), wrong pin NIDs are used for controlling EAPD for
HP and Front outputs of AD1988/AD1989.  These are actually same with the
ones for AD1984 & co, port-A is 0x11 and port-D 0x12.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 10:05:02 +02:00
Linus Torvalds
46f2cc8051 ALSA: fix hda AZX_DCAPS_NO_TCSEL quirk check in driver_caps
Commit 9477c58e33 ("ALSA: hda - Reorganize controller quriks with bit
flags") changed the driver type compares into various quirk bits.
However, the check for AZX_DCAPS_NO_TCSEL got reverted: instead of
clearing TCSEL for chipsets that have that standard capability, it
cleared then when the NO_TCSEL bit was set.

This can lead to noise and repeated sounds - a weird "echo" behavior.
As the comment just above says: "Ensuring these bits are 0 clears
playback static on some HD Audio codecs".  Which is definitely true at
least on my Core i5 Westmere system.

Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-27 19:45:28 -07:00
Takashi Iwai
9477c58e33 ALSA: hda - Reorganize controller quriks with bit flags
Introduce bit-flags indicating the necessary controller quirks, and
set them in pci driver_data field.  This simplifies the checks in the
driver code and avoids the pci-id lookup in different places.

Also, this patch adds the PCI ID entry for AMD Hudson.  AMD Hudson
requires a similar workaround like ATI SB while other generic ATI and
AMD controllers don't need but some ATI-HDMI quirks.  So, we need a
different entry for Hudson.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-26 14:43:07 +02:00
Takashi Iwai
0b6267376d ALSA: hda - Use snd_printd() in snd_hda_parse_pin_def_config()
Fixed the wrong usage of snd_printdd() for debug prints of input
entries.  It should be snd_printd() like others.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-26 14:10:44 +02:00
Stephen Warren
739266566a ALSA: HDA: Increase MAX_HDMI_PINS
The recently introduced NVIDIA GeForce GT 520 has 4 pins within a single
codec. Bump MAX_HDMI_PINS to accomodate this. Also bump MAX_HDMI_CVTS
to match it; this might be needed later too.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-26 08:17:59 +02:00
Takashi Iwai
af4ccf4f86 ALSA: hda - Use model=auto for Lenovo G555
The new auto-parser fixes problems on Lenovo G555.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:33:20 +02:00
Stephen Warren
5d44f927a5 ALSA: HDA: Unify HDMI hotplug handling.
This change unifies the initial handling of a pin's state with the code to
update a pin's state after a hotplug (unsolicited response) event. The
initial probing, and all updates, are now routed through hdmi_present_sense.

The stored PD and ELDV status is now always derived from GetPinSense verb
execution, and not from the data in the unsolicited response. This means:

a) The WAR for NVIDIA codec's UR.PD values ("old_pin_detect") can be
   removed, since this only affected the no-longer-used unsolicited
   response payload.

b) In turn, this means that most NVIDIA codecs can simply use
   patch_generic_hdmi instead of having a custom variant just to set
   old_pin_detect.

c) When PD && ELDV becomes true, no extra verbs are executed, because the
   GetPinSense that was previously executed by snd_hdmi_get_eld (really,
   hdmi_eld_valid) has simply moved into hdmi_present_sense.

d) When PD && ELDV becomes false, there is a single extra GetPinSense verb
   executed for codecs where old_pin_detect wasn't set, i.e. some NVIDIA,
   and all ATI/AMD and Intel codecs. I doubt this will be a performance
   issue.

The new unified code in hdmi_present_sense also ensures that eld->eld_valid
is not set unless eld->monitor_present is also set. This protects against
potential invalid combinations of PD and ELDV received from HW, and
transitively from a graphics driver.

Also, print the derived PD/ELDV bits from hdmi_present_sense so the kernel
log always displays the actual state stored, which will differ from the
values in the unsolicited response for NVIDIA HW where old_pin_detect was
previously set.

Finally, a couple of small tweaks originally by Takashi:

* Clear the ELD content to zero before reading it, so that if it's not
  read (i.e. when !(PD && ELDV)) it's in a known state.

* Don't show ELD fields in /proc ELD files when the ELD isn't valid.

The only possibility I can see for regression here is a codec where the
GetPinSense verb returns incorrect data. However, we're already exposed
to that, since that data is used (a) from hdmi_add_pin to set up the
initial pin state, and (b) within snd_hda_input_jack_report to query
a pin's presence value. As such, I don't believe any HW has bugs here.

Includes-changes-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:31:32 +02:00
Tony Vroon
4e60b4f830 ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT Deluxe
The microphone input on the back panel (pink connector)
stopped operating correctly after an upgrade from
2.6.35 to 2.6.38; the actual problem manifests itself
as a lack of microphone bias voltage (VREF_HIZ) on
node 0x17.
With AD1988_6STACK_DIG the maximum bias voltage (VREF_80)
is applied and the headset operates correctly.

Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Doug Redlich <pbrigade@nxltech.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:30:39 +02:00
Takashi Iwai
e2df82ffb8 ALSA: hda - Fix speaker auto-mute in Cxt auto-parser
Fix some logic failures in auto-mute handling in Conexant auto-parser.
Also, modify codes to be a bit more understandable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-24 12:15:53 +02:00
Takashi Iwai
313d2c0652 ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parser
Fix the initialization of capture-source route when auto-mic is enabled
for Conexant auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 20:27:02 +02:00
Takashi Iwai
506a4196d4 ALSA: hda - Fix auto-mic detection in Conexant codec-parser
Fix the auto-mic detection for Cxt auto-parser due to off-by-one
missing initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 20:07:15 +02:00
David Henningsson
d2859fd492 ALSA: HDA: Add quirk for Lenovo U350
Add model=asus quirk for Lenovo Ideapad U350 to make internal mic
work correctly.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/751681
Reported-by: Kent Baxley <kent.baxley@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 08:56:23 +02:00
Takashi Iwai
f686c74cc3 Merge branch 'topic/hda' into for-linus 2011-05-22 10:01:35 +02:00
Takashi Iwai
02e5fbf622 Merge branch 'topic/misc' into for-linus 2011-05-22 10:01:29 +02:00
Takashi Iwai
b759b3ac9a Merge branch 'topic/lola' into for-linus 2011-05-22 10:01:22 +02:00
Takashi Iwai
50e3bbf989 ALSA: hda - Use LPIB for ATI/AMD chipsets as default
ATI and AMD chipsets seem not providing the proper position-buffer
information, and it also doesn't provide FIFO register required by
VIACOMBO fix.  It's better to use LPIB for these.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 16:29:09 +02:00
Takashi Iwai
314c3ff476 Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets"
This reverts commit 447ee6a7cb.

The workaround introduced by this commit seems bogus.
The AMD chipsets don't provide proper position-buffer nor FIFO value
required by VIACOMBO fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 16:27:02 +02:00
Wu Fengguang
591e610d65 ALSA: hda - add Intel Panther Point HDMI codec id
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:40:00 +02:00
Raymond Yau
bfe9fc8aeb ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live!
As the "Wave", "Wave Surround" or "Front" Playback Volume must be
changed to 70% (i.e. -12 dB) so that distortion won't occur when
increase Bass and Treble from 50% to 100%, so the maximum gain in
Bass and Treble are +12 dB.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:08:04 +02:00
Raymond Yau
acb373da7c ALSA: hda - Remove PCM mixer elements from Virtual Master of realtek
Afer commit aa202455ee , none of realtek
codec has hardware volume control "PCM Playback Volume" and
"PCM Playback Switch".

As Virtual Master require all slave controls must have same number of step
and dB range.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:03:20 +02:00
Adrian Wilkins
5a2d227fdc ALSA: hda - Fix input-src parse in patch_analog.c
Compare pin type enum to the pin type and not the array index.
Fixes bug#0005368.

Signed-off-by: Adrian Wilkins <adrian.wilkins@nhs.net>
Cc: <stable@kernel.org> (2.6.37 and later)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:01:28 +02:00
Madis Janson
39dfe13870 ALSA: hda - Enable Realtek ALC269 codec input layer beep
This fixes the input layer beep not working on some EeePC 1000 models by
adding the subsystem id into whitelist. Otherwise the corresponding ALSA
mixer is not enabled and stays muted, resulting in no console beep.

Signed-off-by: Madis Janson <madis@cyber.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 18:32:41 +02:00
Dmitry Eremin-Solenikov
df1fe13289 ALSA: intel8x0m: enable AMD8111 modem
AMD 8111 southbridges contain a controller for MC'97 modem. Enable support
for this controller in intel8x0m driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 18:06:26 +02:00
David Henningsson
07acecc111 ALSA: HDA: Add jack detection for HDMI
Just as for headphones and microphone jacks, this patch adds reporting
of HDMI jack status through the input layer.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 12:00:50 +02:00
Kailang Yang
b896b4ebf0 ALSA: hda - Fix no sound after Windows boot with ALC269
Change power control register to default.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:53:16 +02:00
Kailang Yang
296f03380e ALSA: hda - Add support of ALC221 / ALC276 codecs
Compatible with ALC269.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:52:36 +02:00
Kailang Yang
b478b99844 ALSA: hda - Add support of ALC898/899 codec
These are compatible with ALC882 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:52:05 +02:00
Takashi Iwai
20c304ed84 ALSA: hda - Enable snoop bit for AMD controllers
AMD Hudson controllers give noisy outputs when the buffer data is
rewritten on the fly as PulseAudio does.  This seems fixed by the
snoop bit enabled just like ATI chipset.

Also, disable 64bit DMA as now, to be sure.
We can revisit this later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 18:41:25 +02:00
Takashi Iwai
b55fcb508d ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parser
Similar process like in patch_realtek.c and patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:57:46 +02:00
Takashi Iwai
1f83ac5ac9 ALSA: hda - Handle dock line-in as auto-detectable for IDT codecs
When a docking-station has a line-in jack, we can handle it also as
a detectable jack just like mic-in.  This will improve the usability
of HP laptops with a docking-station.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:35:03 +02:00
Takashi Iwai
8ed99d9768 ALSA: hda - Add dock-mic detection support to Realtek auto-parser
In addition to the normal mic jack, the mic (or line-in) jack on the
docking-station is checked also as a candidate for auto-selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:34:57 +02:00
Takashi Iwai
e35d9d6a15 ALSA: hda - Check unsol-cap in is_jack_detectalbe()
Also replace more open-codes with this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:27 +02:00
Takashi Iwai
43c1b2e920 ALSA: hda - Add support of dock-mic detection to Conexant auto-parser
In addition to the normal external mic jack, check also the mic jack
on a docking-station as well, and select the input source appropriately.

The similar functionality was already implemented in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:00 +02:00
Takashi Iwai
52d3cb88d7 ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c
spec->automute_lines shouldn't be set unless the line-detection is
available.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:04:08 +02:00
Takashi Iwai
1682c81746 ALSA: hda - Use get_wcaps_type()
Replace the open-code with get_wcaps_type() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:03:02 +02:00
Takashi Iwai
06dec2282b ALSA: hda - Use is_jack_detectable() helper
Replaced the open-code with the new helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:00:16 +02:00
Takashi Iwai
03697e2acc ALSA: hda - Add automute-mode enum to Conexant auto-parser
Implement the same functionality as Realtek's auto-mute mode control.
Now Conexant auto-parser can also mutes line-out and provide the enum
control for different automute behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:57:19 +02:00
Takashi Iwai
a3a85d3983 ALSA: hda - Add missing Front/Surround/CLFE as slaves for Cxt auto-parser
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:17:52 +02:00
Takashi Iwai
47ad1f4e40 ALSA: hda - Code refactoring in patch_conexant.c
Use a struct instead of each array for managing input-source info
for auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:15:55 +02:00
David Henningsson
e033ebfb39 ALSA: HDA: Use one dmic only for Dell Studio 1558
There are no signs of a dmic at node 0x0b, so the user is left with
an additional internal mic which does not exist. This commit removes
that non-existing mic.

Cc: stable@kernel.org (2.6.32+)
BugLink: http://bugs.launchpad.net/bugs/731706
Reported-by: James Page <james.page@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 14:23:56 +02:00
Takashi Iwai
fea4a4f973 ALSA: hda - Add support of auto-parser to cxt5066 codecs
Still experimental.
Not enabled as default unless model=auto is passed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:50:00 +02:00
Takashi Iwai
f9759301c6 ALSA: hda - Don't create multiple same volume/boost controls in Cxt auto-parser
Check the routing more exactly for avoiding the duplicated controls for
the very same effect for multiple capture routes in Conexant auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:45:15 +02:00
Takashi Iwai
cf27f29ae2 ALSA: hda - Build boost controls from selector widget in Cxt auto-parser
When the intermediate selector widget in the capture path provides the
boost volume, create the corresponding volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:33:02 +02:00
Takashi Iwai
9b842cd868 ALSA: hda - Don't use auto-parser for cxt5045 / 5051 as default
Just for safety reason (for avoiding any possible regressions), don't
enable auto-parser as default for cxt5045 and 5051, as well as 5047.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:35:04 +02:00
Takashi Iwai
1387cde51d ALSA: hda - Enable codec->pin_amp_workaround always for Conexant auto-parser
It can (must for some) be used for all Conexnat codecs safely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:22:20 +02:00
Takashi Iwai
22ce5f74a9 ALSA: hda - Search ADC NIDs dynamically in Conexant auto-parser
Instead of giving fixed arrays, look for ADC nids dynamically in the
tree in Conexant auto-parser code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:21:06 +02:00
Ondrej Zary
fdb62b500d ALSA: fm801: clean-up radio-related Kconfig
Remove TEA575X_RADIO define from fm801.c.
Also update Kconfig help text to include all supported cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 11:43:31 +02:00
Ondrej Zary
10ca720147 ALSA: tea575x: use better card and bus names
Provide real card and bus_info instead of hardcoded values.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:24 +02:00
Ondrej Zary
3d11ba5593 ALSA: tea575x: remove unused card from struct
struct snd_card *card is present in struct snd_tea575x but never used.
Remove it.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:14 +02:00
Ondrej Zary
ea27316e4c ALSA: tea575x: remove freq_fixup from struct
freq_fixup is a constant, no need to hold it in struct snd_tea575x and set in
each driver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:01 +02:00
Takashi Iwai
fa5dadcbe0 ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 Waikiki
Similarly like other Conexant codecs, now model=auto is supported for
cxt5047.

But the auto-parser mode isn't activated as default yet, since BIOS
pin-configs seem often broken on machines with this codec.  User need
to pass model=auto explicitly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:37:45 +02:00
Takashi Iwai
5c9887e087 ALSA: hda - Parse more deep input-source routes in Conexant auto-parser
Handle not only a single-depth input-route but two-level depth routes
(PIN->MUX->ADC), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:30:58 +02:00
Takashi Iwai
f6100bb4b8 ALSA: hda - Clean up input-mux handling in Conexant auto-parser
Keep the registered input-pins in imux_pins[], and fix the inconsistent
use of sepc->auto_mic_ext.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 18:28:03 +02:00
Takashi Iwai
1f8458a262 ALSA: hda - Add auto-parser support to cxt5045 / CX20549 Venice
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 17:22:05 +02:00
Takashi Iwai
6764bcef4c ALSA: hda - Add auto-parser support to cxt5051 / CX20561 Hermosa
Extend the existing auto-parser for CX2064x for cxt5051 codec.
Now the auto-parser supports ADC-switching for this codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:52:25 +02:00
Takashi Iwai
0ad1b5b619 ALSA: hda - Check AMP CAP at initialization of Conexant auto-parser
Some codecs have no mute caps in audio I/O widgets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:43:12 +02:00
Takashi Iwai
da33986651 ALSA: hda - Turn on EAPD dynamically per jack plug in Conexant auto mode
Instead of keeping always EAPD on, turn on/off appropriately at jack
plugging in Conexant auto-parser mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:24:15 +02:00
Takashi Iwai
2557f7427d ALSA: hda - Fix auto-mic for CX2064x codecs
The wrong id is assigned for external/internal mics in the auto-mic
selection parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:18:37 +02:00
Ondrej Zary
d7ba858a7f ALSA: fm801: implement TEA575x tuner autodetection
Autodetect TEA575x tuner connection type during init. This allows tuner to
work out-of-the box.

tea575x_tuner module parameter remains functional to force tuner type.

Tested with SF256-PCP and SF64-PCR.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 10:52:24 +02:00
Ondrej Zary
938a1566b1 ALSA: fm801: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Also convert the original triple implementation to a simple GPIO pin map.

Tested with SF256-PCP and SF64-PCR (added the GPIO pin for MO/ST signal
for them).
SF256-PCS untested (pin for MO/ST signal is a guess).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:45 +02:00
Ondrej Zary
72587173cc ALSA: es1968: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Tested with SF64-PCE2 card.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:29 +02:00
Randy Dunlap
f428c94c84 ALSA: lola - fix lola build
sound/pci/lola/Makefile was trying to build lola modules even
when PCI and SND_LOLA were not enabled, causing build errors:

ERROR: "snd_pcm_hw_constraint_step" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_period_elapsed" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_alloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_hw_constraint_integer" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_ops_page" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_set_ops" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_ioctl" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_malloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_get_chunk_size" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_preallocate_pages_for_all" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_new" [sound/pci/lola/snd-lola.ko] undefined!

Fix the Makefile to build only when CONFIG_SND_LOLA is enabled.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 19:55:13 +02:00
Takashi Iwai
447ee6a7cb ALSA: hda - Use position_fix=3 as default for AMD chipsets
AMD chipsets often behave pretty badly regarding the DMA position
reporting.  It results in the bad quality audio recording.
Using position_fix=3 works well in general for them, so let's enable
it as default for AMD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 18:28:50 +02:00
Takashi Iwai
f2e0192519 ALSA: lola - Yet another linux/delay.h inclusion
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:48:29 +02:00
Takashi Iwai
f044785d0a ALSA: lola - Add missing inclusion of linux/delay.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:21:01 +02:00
Takashi Iwai
fe4af1b55e ALSA: lola - Implement polling_mode like hd-audio
Also protect the call of lola_update_rirb() with spinlock.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:06:53 +02:00
Takashi Iwai
2db3002029 ALSA: lola - Rename to Digital SRC Capture Switch
Renamed to Digial SRC Capture Switch for more correct representation.
Also fixed analog volume control on Lola161611 and lola881.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:05:08 +02:00
Takashi Iwai
c7aad3c317 ALSA: lola - Add sync in loop implementation
For assuring the synchronized state with the pause operation,
loop over the all linked streams and waits until all get ready
in a loop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:02:35 +02:00
Takashi Iwai
7e79f22676 ALSA: lola - Add SRC refcounting
Added the refcounting for the exclusive SRC control.
Also, fixed the possible stall after PCM pause operations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:59:27 +02:00
Takashi Iwai
8bd172dc96 ALSA: lola - Allow granularity changes
Add some sanity checks.
Change PCM parameters appropriately per granularity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:51:56 +02:00
Takashi Iwai
972505ccde ALSA: lola - Use SG-buffer
Completely switch to SG-buffer now, as it's working stably.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:50:51 +02:00
Takashi Iwai
fe3d393eda ALSA: lola - Add Lola-specific module options
Added granularity and sample_rate_min module options.

The former controls the h/w access granularity.  As default, it's set
to the max value 32.

The latter controls the minimum sample rate in Hz, as default 16000.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:48:59 +02:00
Takashi Iwai
0f8f56c959 ALSA: lola - Fix PCM stalls
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:47:03 +02:00
Takashi Iwai
333ff3971f ALSA: lola - Use a single BDL
Use a single BDL for both buffers instead of allocating for each.

Also a few tune-up to avoid the stream stalls in the PCM code and
the prelimianry work for SG-buffer support are added, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:41:02 +02:00
Takashi Iwai
a426c78723 ALSA: lola - Suppress the debug print
Use snd_printdd() for less important debug messages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:53 +02:00
Takashi Iwai
c772bbe69a ALSA: lola - Changes in proc file
The codec proc file becomes a read only that shows the codec widgets
in a text form.  A new proc file, codec_rw, is introduced instead for
accessing the Lola verb directly by reading and writing to it.

Also, regs proc file shows the contents of DSD, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai
1c5d7b312f ALSA: lola - Make SRC helper global
Make lola_sample_rate_convert() global so that it can be accessed from
other files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai
d43f3010b8 ALSA: Add the driver for Digigram Lola PCI-e boards
Added a new driver for supporting Digigram Lola PCI-e boards.

Lola has a similar h/w design like HD-audio but with extended verbs.
Thus the driver is written similarly like HD-audio driver in the bus
part.  The codec part is rather written in a fixed way specific to the
Lola board because of the verb incompatibility.

The driver provides basic PCM, supporting multi-streams and mixing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:31:05 +02:00
Raymond Yau
ce85c9ac8d ALSA: hda - fix NULL-dereference in patch_realtek
Fix NULL-dereference when try to use alt_playback since those codecs
which support multistreaming playback usually have more than 1 adc but
the driver should create alt_capture when spec->stream_analog_alt_capture
is also defined.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 10:32:04 +02:00
Takashi Iwai
20ec8b2463 Merge branch 'fix/hda' into topic/hda 2011-05-02 13:58:23 +02:00
Takashi Iwai
24af2b1cc4 ALSA: hda - Fix Realtek's chained fixup checks
The check of chained fixup list entry was done against the wrong element.
A stupid mistake during refactoring.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 13:55:36 +02:00
Takashi Iwai
90dd48a1a9 ALSA: hda - Constify fixup and other array data in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:38:19 +02:00
Takashi Iwai
2b63536f0c ALSA: hda - Constify fixup and other array data in patch_sigmatel.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:33:43 +02:00
Takashi Iwai
9cf0aa9eba ALSA: hda - Constify fixup and other array data in patch_si3054.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:22:39 +02:00
Takashi Iwai
fb79e1e0a2 ALSA: hda - Constify fixup and other array data in patch_hdmi.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai
34cbe3a6fa ALSA: hda - Constify fixup and other array data in patch_conexant.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai
c42d47829a ALSA: hda - Constify fixup and other array data in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:30 +02:00
Takashi Iwai
728850a7f2 ALSA: hda - Constify fixup and other array data in patch_ca0110.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:29 +02:00
Takashi Iwai
779d065983 ALSA: hda - Constify fixup and other array data in patch_cmedia.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:28 +02:00
Takashi Iwai
498f5b175b ALSA: hda - Constify fixup and other array data in patch_analog.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:27 +02:00
Takashi Iwai
4c6d72d138 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:21 +02:00
Takashi Iwai
dda144103c ALSA: hda - Constify some API function arguments
Also fixed the assignment of multiout.dac_nids to satisfy const.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:07:48 +02:00
Takashi Iwai
a9111321f2 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:30:18 +02:00
Takashi Iwai
031024eea8 ALSA: hda - Constify some API function arguments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:29:30 +02:00
Takashi Iwai
a3ea8e8f24 Merge branch 'fix/hda' into topic/hda 2011-05-02 10:41:40 +02:00
Takashi Iwai
ebb47241ea Revert "ALSA: hda - Fix pin-config of Gigabyte mobo"
This reverts commit c6b358748e.

It turned out that there are different pin configurations for this
PCI SSID, including multi-channel modes.  And more proper fix for
allowing line-out mutes will come up in 2.6.40 tree, so we won't need
this fixup any more there.

Reported-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 10:37:29 +02:00
David Henningsson
94024cd1ae ALSA: HDA: Fix automute for Gateway NV79
The PCI SSID is 1025:031c and the codec SSID is 1025:031d,
so the driver mistakes this for a SKU value, but looking at
the numbers, this is obviously wrong.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/761861
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 14:19:31 +02:00
Takashi Iwai
c2de187e5b ALSA: hda - Show the line-out type in snd_hda_parse_pin_def_config()
Helpful for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 13:01:33 +02:00
Daniel Cordero
a7e985e18f ALSA: hda: add beep quirk for Realtek 0x1043:831a
PC Beep was not being reported as enabled on my EeePC 901:
        SKU: enable_pcbeep=0x0

Signed-off-by: Daniel Cordero <danielcordero@lavabit.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 08:18:06 +02:00
Takashi Iwai
ae8a60a598 ALSA: hda - Add Auto-Mute Mode enum for two-output cases
The Auto-Mute Mode control is useful even when only two outputs
(e.g. HP and speaker) are available.  Then user can enable/disable
the auto-mute behavior on the fly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 18:09:52 +02:00
Takashi Iwai
1daf5f46c6 ALSA: hda - More line-out auto-mute support for Realtek
Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:57:46 +02:00
Takashi Iwai
1a1455de10 ALSA: hda - Add support for Line-Out automute to Realtek auto-parser
By popular demands, I add the functionality to mute / unmute the
line-out jacks per the headphone plug / unplug.  For achieving this
and keeping the compatibility with the old behavior, the new mixer
enum "Auto-Mute Mode" is added.  With this, user can control the
auto-mute behavior either disabled, speaker-only or lineout+speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:55:53 +02:00
Takashi Iwai
0f0f391c73 ALSA: hda - More reduction of redundant automute codes in Realtek parser
Removed the redundant codes by replacing with the common helper
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 16:26:24 +02:00
Takashi Iwai
e9427969f5 ALSA: hda - Consolidate auto-mute with master-switch for Realtek
Yet another consolidation of auto-mute functions for the devices
controlling the output muts together with the master mixer switch,
typically found for ALC262 machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 15:46:07 +02:00
Takashi Iwai
e6a5e1b709 ALSA: hda - Add support of line-out automute for Realtek
Add the common helper function and flags to support the auto-mute
per line-out jack detection, and also the mute of line-out jacks.

A few model-specific implementations are replaced with the common
helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:56 +02:00
Takashi Iwai
3b8510ce97 ALSA: hda - Add common automute support for mxier-amp on/off for Reatek
Some models do mute on/off the connected mixer widget for the automatic
muting, instead of controlling the pin widget itself.  This patch adds
the implementation of such type of auto-mute in the common helper
function, and reduces the redundant codes for each model preset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:50 +02:00
Takashi Iwai
d922b51dab ALSA: hda - Consolidate default automute functions for Realtek
There are two entry points for the headphone automute functions for
Realtek, alc_automute_amp() and alc_automute_pin().  These call the
same function in the end, so we can basically consolidate these
with a flag in spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:19 +02:00
Lydia Wang
525566cb60 ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
In notify_aa_path_ctls(), adds 'rear mic' item and confirms the A-A
path control existing before notifying card that the A-A path volume
is muted if smart5.1 is enabled.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 11:35:18 +02:00
Raymond Yau
54a96dadaa ALSA - au88x0 - Add buffer bytes constraints
This allow application such as gstreamer and wine which use
snd_pcm_hw_params_set_buffer_time_near() won't fail any more
since sound chips require special containt power 2 period bytes

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 17:00:00 +02:00
Takashi Iwai
ce764ab22e ALSA: hda - Add channel-mode support to Realtek auto-parser
This patch adds the support of "Channel Mode" enum control to Realtek
auto-parser.  When line-in or mic-in jacks are capable to output and
free DACs are available, the driver allows to switch to multi-channel
mode via "Channel Mode" enum switch, as already implemented in some
preset cases.

Not implemented in all Realtek codecs.  Currently, ALC880, 882, 861,
662 and the compatible codecs are supported.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 16:39:00 +02:00
Takashi Iwai
604401a92c ALSA: hda - Minor update for alc662-parser functions
Allow alc662_dac_to_mix() and alc662_look_for_dac() to parse
down the selector widget that is found in ALC880-type codecs,
and rename them to alc_auto_*() accordingly.
This is for the next coming multi-io extensions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 15:46:40 +02:00
Lydia Wang
cb34c207af ALSA: hda - VIA: Fix Smart5.1 isn't useful for 6 audio jacks motherboard.
For some motherboards with 5 or 6 audio jacks which had six or eight multiple
channels output, smart5.1 item is no useful and should be removed.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-27 11:55:23 +02:00
Takashi Iwai
d507cd668a ALSA: hda - Enable sync_write workaround for AMD generically
The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs.  So, it's better to activate it
generically in hda_intel.c from the beginning.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 15:33:43 +02:00
Takashi Iwai
0da2692256 ALSA: hda - Move EAPD power-down into shutup callback for AD codecs
EAPD power-down should be called also for normal shutup cases.
Let's move to there.   This also fixes the compile warnings when
CONFIG_PM isn't set automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 15:18:33 +02:00
Takashi Iwai
31d44b57c5 Merge branch 'fix/hda' into topic/hda 2011-04-26 15:05:39 +02:00
Raymond Yau
13eb4ab8ca ALSA: au88x0 - Use a better name for pcm devices of au88x0
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 12:27:21 +02:00
Takashi Iwai
885f42e1f4 ALSA: hda - Enable sync_write for AMD chipset with IDT 92HD8x codecs
The AMD chipset seems unstable in the normal operation mode, and it
seems requring more sensible access for each verb.  Enabling sync_write
mode and allowing bus-reset is a sort of workaround for these chipset
stability issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-21 15:27:58 +02:00
Takashi Iwai
6a9a6f233b Merge branch 'fix/hda' into for-linus 2011-04-21 12:44:38 +02:00
Mike Waychison
1c7276cfc0 ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUME
When SND_HDA_NEEDS_RESUME is not defined, the compiler identifies that
the following symbols are static but not used:

 restore_shutup_pins
 hda_cleanup_all_streams

Fix warnings by adding SND_HDA_NEEDS_RESUME guards.

Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:24:31 +02:00
Seth Heasley
d2edeb7c6f ALSA: hda - ALSA HD Audio patch for Intel Panther Point DeviceIDs
This patch adds the HD Audio Controller DeviceIDs for the Intel Panther Point PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:03:48 +02:00
Takashi Iwai
e66d74ced1 ALSA: asihpi - Use %zd for size_t argument in error message (again)
This was reverted mistakenly in the recent update patch.
Fixed again.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 21:02:27 +02:00
Raymond Yau
b6a4840408 ALSA: emu10k1 - Remove "Front" controls only for STAC9758/59
Remove "Front Playback Volume" and "Front Playback Switch" from emu10k1 only
for STAC9758/59

Since commit 7eae36fbd5
      "Fix the confliction of 'Front' control",
the "Front Playback Volume" control created by commit
	edf8e4565c
	"emu10k1: Front channels via fxbus 8 and 9"
was removed

"Front Playback Volume" and "Surround Playback Volume" have same dB range
since I2S DAC of SB Live! and SB Live! Platinum does not has any hardware
volume control.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-20 14:23:15 +02:00
Takashi Iwai
6981d18437 ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec
Acer laptops with ALC271x needs a magic initialization for digital-mic
to make it working with mono streams (and PulseAudio).
Added a fix-up applied to Acer with ALC271x generically.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-19 16:45:31 +02:00
Andrew Morton
5b17b077eb ALSA: hda - sound/pci/hda/hda_codec.c: fix warning
sound/pci/hda/hda_codec.c: In function 'snd_hda_get_connections':
sound/pci/hda/hda_codec.c:332: warning: unused variable 'j'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-15 08:41:22 +02:00
Linus Torvalds
4263a2f1da Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Don't query connections for widgets have no connections
  ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
  ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
  ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
  ALSA: HDA: Fix dock mic for Lenovo X220-tablet
  ASoC: format_register_str: Don't clip register values
  ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
  ASoC: zylonite: set .codec_dai_name in initializer
2011-04-10 09:56:10 -07:00
Linus Torvalds
42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Takashi Iwai
a12d3e1e1c ALSA: hda - Remember connection lists
The connection lists are static and we can reuse the previous results
instead of querying via verb at each time.  This will reduce the I/O
in the runtime especially for some codec auto-parsers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 15:55:15 +02:00
Takashi Iwai
cd9abc7a22 ALSA: hda - Don't query connections for widgets have no connections
Fixes the kernel warnings with IDT codecs like
    hda_codec: connection list not available for 0x1e

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 14:55:57 +02:00
Takashi Iwai
8e28e3b29f Merge branch 'fix/hda' into topic/hda 2011-04-07 12:57:53 +02:00
Takashi Iwai
ad93ffe6e4 ALSA: hda - Fix unused variable warning in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:26 +02:00
Takashi Iwai
35ffe11587 ALSA: hda - Remove superfluous inits for ALC662 auto-parser
Since we now set up the connections and mutes dynamically in the
auto-parser, all static initializations via alc662_init_verbs & co are
no longer needed.  Let's drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:10 +02:00
Takashi Iwai
10696aa0e5 ALSA: hda - Mute ADC as default in ALC882 and other auto-parsers
Mute the ADC as default in the auto-parser dynamically instead of relying
on the static init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:08 +02:00
Takashi Iwai
0e53f34409 ALSA: hda - Unmute mixer dynamically in alc662 auto-parser
Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically.  This fixes the
uninitialized mixer 0x0f on ALC892.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:05 +02:00
David Henningsson
262ac22d21 ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
In cases where there is only one internal mic connected to ADC 0x11,
alc275_setup_dual_adc won't handle the case, so we need to add the
ADC node to the array of candidates.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/752792
Reported-by: Vincenzo Pii
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:12:00 +02:00
Aaron Plattner
1f34852284 ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
The MCP7x hardware computes the audio infoframe channel count
automatically, but requires the audio driver to set the audio
infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum
control verb.

When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum
to (0x71 - chan - chanmask).  For example, for 2ch audio, chan == 1
and chanmask == 0 so the checksum is set to 0x70.  When audio playback
finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the
channel formats, causing the channel count to revert to 8ch.  Since
the checksum is not reset, the hardware starts generating audio
infoframes with invalid checksums.  This causes some displays to blank
the video.

Fix this by updating the checksum and channel mask when the device is
closed and also when it is first initialized.  In addition, make sure
that the channel mask is appropriate for an 8ch infoframe by setting
it to 0x13 (FL FR LFE FC RL RR RLC RRC).

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:04:00 +02:00
Takashi Iwai
5402e4cb80 ALSA: hda - Rewrite alc269_suspend to alc269_shutup
alc269_suspend is just calling the shut-up, so we can use the new shutup
callback for the purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:39:25 +02:00
Takashi Iwai
1c716153a8 ALSA: hda - Introduce shutup callback to Realtek spec struct
Add shutup callback to be called codec-specifically for avoiding pop
noises at suspend or shutdown.  As a generic callback, just turn EAPD
off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:37:16 +02:00
Takashi Iwai
691f1fccf7 ALSA: hda - Refactoring EAPD controls
Reduced the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:31:43 +02:00
Takashi Iwai
a7f2371f9e ALSA: hda - Split EAPD init to a separate array from alc662_init_verbs
So far, alc662_init_verbs[] is used for all ALC662-compatible chips,
but the EAPD controls for 0x15 in there is invalid for ALC892.
Also, since EAPDs should be set up in alc_auto_init_amp(), these static
elements aren't needed for auto-parser, too.

In this patch, the EAPD init verbs are split from alc662_init_verbs,
and applied only to static quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:24:23 +02:00
Takashi Iwai
1304ac8993 ALSA: hda - Fix mix->DAC deduction for ALC892
The current alc662 parser doesn't set the DAC for the mixer 0x0f
properly for ALC892, which has 4 DACs while ALC662 has 3.
Fixed by implementing alc662_mix_to_dac() more genericly with the
dynamic widget list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 15:16:21 +02:00
Takashi Iwai
1bc7cf99a9 ALSA: hda - Correct initial dac_nids for some ALC272-quirks
Some ALC272-quirks use alc662_dac_nids instead of alc272_dac_nids.
This patch fixes these entries.  No functional change since the first
two elements are identical in both arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 09:42:29 +02:00
Raymond Yau
e217b960e4 ALSA: emu10k1 - Remove CLFE-related controls for SB Live! Platinum CT4760P
SB Live! Platinum CT4760P is just a 4 channels sound card with STAC9721 and
Philips UDA1334 DAC.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 08:31:26 +02:00
Raymond Yau
4bf4a6c5b1 ALSA: hda - Fix alc662_dac_nid and change "6stack-dig" to "5stack-dig"
alc662 series only have 3 DAC, so it can only support 5stack-dig
instead of 6stack-dig.

[updated HD-Audio-Models.txt as well by tiwai]

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 08:18:39 +02:00
Eliot Blennerhassett
42258daba2 ALSA: asihpi: Minor cleanups
Remove some unneeded defintions
Use %pR to print resources
Make some data const
Consistent braces for else

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:51:04 +02:00
Eliot Blennerhassett
6d0b898e9c ALSA: asihpi: Simplify driver unload cleanup
Replacing subsys_delete_adapter with adapter_delete
allows some special-case adapter lookup code to be removed.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:50:13 +02:00
Eliot Blennerhassett
b0096a6567 ALSA: asihpi: Standardise substream name generation
Define and use pcm_debug_name if CONFIG_SND_DEBUG

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:54 +02:00
Eliot Blennerhassett
6027dfa46e ALSA: asihpi: Remove 2 unused functions
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:40 +02:00
Eliot Blennerhassett
f3d145aac9 ALSA: asihpi: MMAP for non-busmaster cards
Allow older non DMA capable cards to use MMAP by
emulating the DMA using read and write functions,
and getting rid of copy & silence callbacks that
were used only by older cards.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:25 +02:00
Eliot Blennerhassett
0b7ce9e2bd ALSA: asihpi: Handle playback drained status better
Use the card drained status reporting for playback,
but allow it to persist for a few timer cycles before
signalling XRUN, to allow card to recover by itself.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:08 +02:00
Eliot Blennerhassett
a6477134db ALSA: asihpi: Update debug printing
Debug print full substream ID.
Other minor debug print updates.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:46:48 +02:00
Eliot Blennerhassett
550ac6ba4e ALSA: snd-asihpi: Control naming
Clock source is neither capture nor playback,
so change 'Capture Clock' to 'Clock'.
Add spaces to control name string for consistency,
always 'PCM 0' , never 'PCM0'

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:46:06 +02:00
David Henningsson
b2cb1292b1 ALSA: HDA: Fix dock mic for Lenovo X220-tablet
Without the "thinkpad" quirk, the dock mic in
Lenovo X220 tablet edition won't work.

BugLink: http://bugs.launchpad.net/bugs/751033
Cc: stable@kernel.org
Tested-by: James Ferguson <james.ferguson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 09:17:10 +02:00
Takashi Iwai
17fbb5bdfc Merge branch 'fix/misc' into topic/misc 2011-04-04 12:21:55 +02:00
David Henningsson
840126579d ALSA: HDA: Add dock mic quirk for Lenovo Thinkpad X220
This quirk is needed for the docking station mic of
Lenovo Thinkpad X220 to function correctly.

BugLink: http://bugs.launchpad.net/bugs/746259
Cc: stable@kernel.org
Tested-by: James Ferguson <james.ferguson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-31 20:28:33 +02:00
Lucas De Marchi
25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Clemens Ladisch
6ebb8a4a43 ALSA: ens1371: fix Creative Ectiva support
To make the EV1938 chip work, add a magic bit and an extra delay.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Tino Schmidt <mailtinoshomepage@gmx.net>
Cc: all 2.6.x <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-30 08:57:27 +02:00
Takashi Iwai
cdccfc8dc0 Merge branch 'fix/misc' into topic/misc 2011-03-28 13:03:58 +02:00
Takashi Iwai
f6994ce4a8 Merge branch 'fix/hda' into topic/hda 2011-03-28 13:03:39 +02:00
Takashi Iwai
c6b358748e ALSA: hda - Fix pin-config of Gigabyte mobo
Use pin-fix instead of the static quirk for Gigabyte mobos 1458:a002.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=677256
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-28 12:38:30 +02:00
Linus Torvalds
7b724a2260 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: Fix yet another race in disconnection
  ALSA: asihpi - Update verbose debug print macros
  ALSA: asihpi - Improve non-busmaster adapter operation
  ALSA: asihpi - Support single-rate no-SRC cards
  ALSA: HDA: New AD1984A model for Dell Precision R5500
  ALSA: vmalloc buffers should use normal mmap
  ALSA: hda - Fix SPDIF out regression on ALC889
  ALSA: usb-audio - Support for Boss JS-8 Jam Station
  ALSA: usb-audio: add Cakewalk UM-1G support
  sound/oss/opl3: validate voice and channel indexes
  sound/oss: remove offset from load_patch callbacks
2011-03-27 20:35:07 -07:00
Eliot Blennerhassett
b2e65c8e91 ALSA: asihpi - Update verbose debug print macros
Replace local VPRINTK1 with snd_printdd.
Create local snd_printddd instead of VPRINTK2 for most verbose debug.
In most cases let snd_printk supply default level for messages.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:43:15 +01:00
Eliot Blennerhassett
26aebef420 ALSA: asihpi - Improve non-busmaster adapter operation
Make playback silence callback a no-op, card automatically outputs
silence when written data runs out.
Increasing update interval and thus minimum period avoids xrun on startup
or because of timer jitter.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:42:45 +01:00
Eliot Blennerhassett
7bf76c33e9 ALSA: asihpi - Support single-rate no-SRC cards
Cards without settable local samplerate and without SRC
still must have a valid samplerate.
This fixed rate is determined by reading the current rate for the card.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:42:26 +01:00
David Henningsson
677cd904ab ALSA: HDA: New AD1984A model for Dell Precision R5500
For codec AD1984A, add a new model to support Dell Precision R5500
or the microphone jack won't work correctly.

BugLink: http://bugs.launchpad.net/bugs/741516
Tested-by: Kent Baxley <kent.baxley@canonical.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 11:31:54 +01:00
Lydia Wang
ec7e7e42da ALSA: hda - VIA: Update unsolicited event function
Update unsolicited event process function via_unsol_event() to
make it can process more unsolicited events.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:47:15 +01:00
Lydia Wang
eadb9a804d ALSA: hda - VIA: Update VT2002P initial verbs
Add some hardware related verbs in VT2002P initial verbs.
These verbs are used to fix Class-D speaker no sound issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:57 +01:00
Lydia Wang
4ab2d53a99 ALSA: hda - VIA: Update VT1718S initial verbs
Add a verb to enable control amplifier of stereo mixer in VT1718S
initial verbs. Set stereo mixer default amplifier value as un-mute.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:32 +01:00
Lydia Wang
aa266fccf5 ALSA: hda - VIA: Update VT1708 initial verbs
Add a verb of power down jack detect in VT1708 initial verbs.
This verb is used to avoid noise caused by hardware issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:08 +01:00
Lydia Wang
27439ce717 ALSA: hda - VIA: Add VT1802 check in via_speaker_automute function
Add VT1802 check in via_speaker_automute() function.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:45:44 +01:00
Lydia Wang
e87885fea5 ALSA: hda - VIA: Fix side channel mute invalid issue
Modify side_mute_channel() and update_side_mute_status() functions
to fix invalid side channel mute issue of VT2002P, VT1812 and VT1802
codecs.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:45:33 +01:00
Takashi Iwai
20b67dddcc ALSA: hda - Fix SPDIF out regression on ALC889
The commit 5a8cfb4e8a
    ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
changed to use the default initialization method for ALC889, but
this caused a regression on SPDIF output on some machines.
This seems due to the COEF setup included in the default init procedure.
For making SPDIF working again, the COEF-setup has to be avoided for
the id 0889.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24342
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 22:54:32 +01:00
Linus Torvalds
4bbba111d9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side
  ASoC: Support !REGULATOR build for sgtl5000
  ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
  ALSA: hda - VIA: Correct stream names for VT1818S
  ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
  ALSA: hda - VIA: Fix invalid A-A path volume adjust issue
  ALSA: hda - VIA: Add missing support for VT1718S in A-A path
  ALSA: hda - VIA: Fix independent headphone no sound issue
  ALSA: hda - VIA: Fix stereo mixer recording no sound issue
  ALSA: hda - Set EAPD for Realtek ALC665
  ALSA: usb - Remove trailing spaces from USB card name strings
  sound: read i_size with i_size_read()
  ASoC: Remove bogus check for register validity in debugfs write
  ASoC: mini2440: Fix uda134x codec problem.
2011-03-23 07:58:09 -07:00
Lydia Wang
11890956e9 ALSA: hda - VIA: Add support for VT1802
Add support for VT1802 codec, which is similiar with VT2002P
except VT1802 has no Class-D and has some different pin widget
id.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 11:49:51 +01:00
Lydia Wang
bc92df7fe5 ALSA: hda - VIA: Add support for VT1705
Add support for VT1705 codec, which is similiar with VT1708S
except it has 6 channels output.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 11:49:33 +01:00
Lydia Wang
3e95b9aba5 ALSA: hda - VIA: Add new power management function.
Use set_widgets_power_state() function to seperately control different
codecs' power management actions and to replace the original large
function. Also fix some wrong widgets power up sequence which caused
no sound issue under Smart5.1 mode and Independent HP mode.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 09:53:23 +01:00
David Henningsson
5a8826463c ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side
Similar to commit 7e59e097c0, this patch
avoids unnecessary volume control indices for more
Realtek auto-parsers, e g the ALC66x family, on the "Surround" and "Side"
controls.
These indices cause these volume controls to be ignored by PulseAudio and
vmaster and should be removed whenever possible.

Cc: stable@kernel.org
Reported-by: Jan Losinski <losinski@wh2.tu-dresden.de>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 09:22:02 +01:00
Lydia Wang
ee3c35c082 ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
Since VT1708 didn't support the control of getting connection number,
building of headphone control will fail in via_hp_build() function.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:56:06 +01:00
Lydia Wang
970f630f5a ALSA: hda - VIA: Correct stream names for VT1818S
Correct stream names of analog playback and capture streams
for VT1818S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:56:01 +01:00
Lydia Wang
0341ccd755 ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
Add get_codec_type() in via_new_spec() function to make sure getting
correct codec type before building mixer controls.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:54:32 +01:00