summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - remove SND_HDA_POWER_SAVE protection of struct hda_loopback_checkStephen Rothwell2011-06-281-2/+0
| | | | | | | to fix build problems when it is disabled. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - More volume-init fixes for ALC267 codecTakashi Iwai2011-06-271-3/+13
| | | | | | | | | | | | More similar fixes like previous commits: handle the exceptional case like ALC267 where no volume amp is found in ADC widget but in the capsrc widget instead. Also minor checks for avoiding possible erros: no connection-select when the pin has a single selection, and add beep verbs only when the 0x1d is used for beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix volume-init for ALC259 with invalid widget capsTakashi Iwai2011-06-271-9/+7
| | | | | | | | | | | | | ALC259 seems to provide an invalid widget capability for the input-src selector widget. The widget shows the input-amp while it's a selector, and this confuses the current ALC882 initialization code that is used for ALC259, too. For fixing this, check the amp capability and handle the connection selection individually. Also, ALC259 has no mute bit in DAC volume, so we need to initialize it as ZERO instead of MUTE. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix volume-init of ALC299 & coTakashi Iwai2011-06-271-9/+20
| | | | | | | | ALC269 and compatible codecs have the output volume in DACs, thus we can't use the ALC880's code as is. Fixed by checking the amp caps and picking up the right widget for initialization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Simplify EAPD control in patch_realtek.cTakashi Iwai2011-06-271-23/+7
| | | | | | | | | | Look through the known NIDs that may have EAPD capabilities and turn on/off them appropriately instead of checking the individual vendor ids. This will also avoid the forgotten entries of newly added codec ids in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix auto-init of output volumes of Realtek codecsTakashi Iwai2011-06-271-33/+31
| | | | | | | | | | | | | | | Fix the regression introduced by the commit 1f0f4b8036b1fe1347cb4f1f199601b87de9be46 ALSA: hda - Reduce static init verbs for Realtek auto-parsers The input amps of mixer widgets should be unmuted as default (as usually they have no assigned mixer switches). More fixes in this commit are, however, for ALC260: ALC260 codec can have multiple output mixers connnected to a single DAC althouh the driver didn't pick up them properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/via-cleanup' into topic/hdaTakashi Iwai2011-06-271-4246/+1510
|\
| * ALSA: hda - Implement dynamic-ADC switching for VIA codecsTakashi Iwai2011-06-221-125/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some VIA codecs like VT1702 provide the input-route only to specific ADCs such as digital-mic inputs. These routes aren't covered by the normal primary ADC, and for now, user had to open the capture stream assigned to that special ADC manually for using such inputs. This patch implements a way to switch the current ADC dynamically per the input-source selection in such a case. When this workaround is activated, the driver provides only one capture stream and one input- source control but with the full possible inputs. The driver switches the ADC to be used (or being used) according to the input-source on the fly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Auto-mute smart51 surround pins for VIA codecsTakashi Iwai2011-06-211-23/+8
| | | | | | | | | | | | | | | | When smart51 mode is enabled, auto-mute these surround outputs as well as the primary line-out. Also this patch includes minor clean-ups. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Remove redundant VT1709 and VT1708B codesTakashi Iwai2011-06-211-67/+19
| | | | | | | | | | | | | | Unify the VT1709 10ch and 6ch parsers, as well as VT1708B 8ch and 4ch parsers. They have no difference now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - VT1708 independent HP routing fixTakashi Iwai2011-06-211-100/+122
| | | | | | | | | | | | | | The codecs like VT1708 needs more complicated routing using the mixer widget rather than the simple selector widgets. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix surround-volume parsing for VT1708B codecsTakashi Iwai2011-06-211-3/+16
| | | | | | | | | | | | | | | | The surround/CLFE/side DACs on VT1708B and co have no amp but the connected selector widgets have the amp instead. Fix the parser to check these selector widgets for the possible mixer controls as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix the check of loopback-mixer element index in patch_via.cTakashi Iwai2011-06-211-2/+4
| | | | | | | | | | | | | | | | | | Fix the check of the multiple loopback-mixer, which gave sometimes a wrong index assigned to an element even for different names, e.g. Mic and Front Mic. Now check the label properly for avoid duplication. Reported-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Assign smart51 only in the same stack for VIA codecsTakashi Iwai2011-06-211-33/+30
| | | | | | | | | | | | | | | | The input jacks assigned as the smart51 outputs must be in the same stack, either rear, front or other. Also, prefer line-in as the surround to mic-in. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix re-routing of HP-independent mode in patch_via.cTakashi Iwai2011-06-211-41/+60
| | | | | | | | | | | | Re-route the whole output path when HP-independent mode is changed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix creations of playback volume controls in patch_via.cLydia Wang2011-06-211-1/+1
| | | | | | | | | | | | | | | | Fix a issue to create playback volume control if pin has amplifier capability but not DAC. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Revisit output_path parsing in patch_via.cTakashi Iwai2011-06-211-37/+50
| | | | | | | | | | | | | | | | | | | | | | Change the order of the output-path list in a way from the DAC to the target pin. Also now the list include the target pin, too. Together with this format change, simplify the arguments of parse_output_path() function, and fix the initialization in via_auto_init_output(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Use xxx Boost Volume for VIATakashi Iwai2011-06-211-1/+1
| | | | | | | | | | | | | | Drop "Capture" prefix from the mic-boost names. Otherwise some control names can overflow the max name length. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'fix/hda' into topic/via-cleanupTakashi Iwai2011-06-216-7/+5
| |\ | | | | | | | | | | | | Conflicts: sound/pci/hda/patch_via.c
| * | ALSA: hda - Simplify analog-low-current mode check for VIA codecsTakashi Iwai2011-06-201-82/+43
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Remove NID_MAPPING hacks in patch_via.cTakashi Iwai2011-06-201-16/+0
| | | | | | | | | | | | | | | | | | There is no longer virtual kmixer element for NID mapping. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Remove unused defines and struct fields in patch_via.cTakashi Iwai2011-06-201-25/+0
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Name the primary out as Speaker when needed for VIA codecsTakashi Iwai2011-06-201-1/+5
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Create loopback-list dynamically in patch_via.cTakashi Iwai2011-06-201-139/+25
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Fix smart51 handling againTakashi Iwai2011-06-201-83/+64
| | | | | | | | | | | | | | | | | | Fix the broken detection of smart51 and its handling. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Create virtual-master control for VIA codecsTakashi Iwai2011-06-201-0/+42
| | | | | | | | | | | | | | | | | | Now let's add the missing Master control to VIA codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Initialize unsol events dynamically in patch_via.cTakashi Iwai2011-06-201-346/+98
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Initialize input-path dynamically in patch_via.cTakashi Iwai2011-06-201-314/+49
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Initialize output path dynamically in patch_via.cTakashi Iwai2011-06-201-214/+135
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Replace with standard consts in patch_via.cTakashi Iwai2011-06-201-9/+2
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix independent-HP handling in patch_via.cTakashi Iwai2011-06-201-238/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Unify auto-parser in patch_via.cTakashi Iwai2011-06-201-374/+53
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Return error for invalid setup for VIATakashi Iwai2011-06-201-44/+9
| | | | | | | | | | | | | | | | | | | | | Instead of ignoring the invalid pin configuration, return the error. This will avoid unexpected crash, anyway. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Unify capture-mixer creations in patch_via.cTakashi Iwai2011-06-201-268/+73
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Assign HP-independent PCM to individual streamTakashi Iwai2011-06-201-53/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Unify PCM assignments in patch_via.cTakashi Iwai2011-06-201-454/+46
| | | | | | | | | | | | | | | | | | Unify PCM streams for all codecs by assigning the NID dynamically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Don't create secondary substream when no independent-hp is usedTakashi Iwai2011-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Re-implement smart51 detection for VIA codecsTakashi Iwai2011-06-201-42/+75
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Unify output-control parsing in patch_via.cTakashi Iwai2011-06-201-1186/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Unify input-volume creations in patch_via.cTakashi Iwai2011-06-201-92/+40
| | | | | | | | | | | | | | | | | | | | | Now storing the analog-mixer widget in spec, we can simplify the rest parts. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Auto-mute all LO and speakers in patch_via.cTakashi Iwai2011-06-201-32/+31
| | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Change pin-ctl for auto-muting in patch_via.cTakashi Iwai2011-06-201-39/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Generate PCM names dynamically in patch_via.cTakashi Iwai2011-06-201-57/+7
| | | | | | | | | | | | | | | | | | This reduces lots of static strings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Refactor ctl array handling in patch_via.cTakashi Iwai2011-06-201-21/+23
| | | | | | | | | | | | | | | | | | No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Defer mixer element creation to the right time in patch_via.cTakashi Iwai2011-06-201-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Fill ADCs dynamically for VIA codecsTakashi Iwai2011-06-201-164/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Add control to suppress the dynamic pin-power for VIATakashi Iwai2011-06-201-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Check hard-wired DACs at first for ALC662 & coTakashi Iwai2011-06-271-31/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Realtek codecs have the output pins hardwired with certain DACs. These DACs have to be assigned at first and assign the rest for multi-DAC pins so that all DACs can be assigned properly. Without such an optimization, speaker outputs may be assigned to the same DAC as the headphone or others. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Call proper DAC-filler function for Realtek auto-parserTakashi Iwai2011-06-271-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In alc_auto_add_multi_channel_mode(), when the primary HP workaround is enabled, it re-initializes the DAC list but calls alc662's function in a fixed way. This isn't pretty suitable for other codecs, of course. Now we call it with fill_dac function pointer so that the proper function can be called at that point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Reduce static init verbs for Realtek auto-parsersTakashi Iwai2011-06-271-361/+140
| | | | | | | | | | | | | | | | | | | | | Instead of using fixed init verbs, initialize DACs, ADCs and mixers more dynamically for Realtek auto-parsers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud