summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: rtctimer.c needs module.hRandy Dunlap2011-07-301-1/+1
| | | | | | | | rtctimer.c uses interfaces from linux/module.h, so it should include that file. This fixes build errors. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add firmware revision 0xcc for RME MADIAdrian Knoth2011-07-291-0/+2
| | | | | | | | | Apparently, there are multiple old firmware revisions in the wild for the PCI RME MADI cards. Just add them to the list of supported devices and treat them like their modern counterparts. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIfaceAdrian Knoth2011-07-291-0/+16
| | | | | | | | | | | | | | | In slave mode, the card can only detect the base frequency (32..48kHz) on the MADI link (exception: 96k frames), so the real external sample rate is this base frequency multiplied by 1, 2 or 4 depending on the speed mode. This patch enables 64..192kHz sample rates in clock slave mode, which failed before due to an alleged sample rate mismatch between the MADI link (e.g., 48kHz) and the application in DS/QS mode (e.g., 96kHz, 192kHz). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIfaceAdrian Knoth2011-07-291-2/+89
| | | | | | | | | | When running in slave mode (no clock master), there is no way to determine the real wirespeed on the MADI link (single/double/quad speed). Like physical gear, simply provide the user with a tristate switch to select the appropriate format. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/core/pcm_compat.c: adjust array indexJulia Lawall2011-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { <... ar[ - e2 + e1 ] ...> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: oss: rename local change_bits to avoid powerpc bitsops.h definitionAndy Whitcroft2011-07-272-6/+6
| | | | | | | | This collides with powerpc exported functions from bitops.h. Rename the local copy in the oss soundblaster mixer and ad1848 driver. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix duplicated DAC assignments for RealtekTakashi Iwai2011-07-271-2/+5
| | | | | | | | | Copying hp_pins and speaker_pins from line_out_pins may confuse the parser, and it can lead to duplicated initializations for the same pin with a wrong DAC assignment. The problem appears in 3.0 kernel code. Cc: <stable@kernel.org> (for 3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - off by one in asihpi_hpi_ioctl()Dan Carpenter2011-07-271-1/+1
| | | | | | | | | | | | "adapter" is used as an array index in the adapters[] array so the off by one would make us read past the end. 1c073b67979 "ALSA: asihpi - Remove spurious adapter index check" reverted Dan Rosenberg's check that would have prevented the overflow here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix Oops with Realtek quirks with NULL adc_nidsTakashi Iwai2011-07-271-11/+11
| | | | | | | | | | Somce quirk models don't set adc_nids but let the parser filling it. But the recent code has unnecessary NULL-checks of spec->input_mux, and it resulted in NULL dereferences. This patch fixes that regression. Reported-and-tested-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - bug fix pa use before init.Eliot Blennerhassett2011-07-271-7/+4
| | | | | | | | Fixes bug introduced by 1c073b67. Also declare pa local to block in which it is used. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support for vref-out based mute LED control on IDT codecsVitaliy Kulikov2011-07-271-43/+156
| | | | | | | | | | This patch also registers all necessary callbacks to support mute LED only when such control is enabled. And it keeps codec AFG in D0 or D1 state all the time when aggressive power managemnt is enabled for vref-out control (and mute LED) work correctly. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/asoc' into for-linusTakashi Iwai2011-07-267-47/+86
|\
| * ASoC: Revert "ASoC: SAMSUNG: Add I2S0 internal dma driver"Mark Brown2011-07-243-481/+0
| | | | | | | | | | | | | | | | | | This reverts commit d7c3e9525ac8e898f1156a1f3a7c5038f6560186 as it does not currently build due to missing dependencies in the Samsung tree. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
| * ASoC: dapm - Add methods to retrieve snd_card and soc_card from dapm context.Liam Girdwood2011-07-201-0/+30
| | | | | | | | | | | | | | | | | | | | In preparation for ASoC Dynamic PCM (AKA DSP) support. Provide convenience methods to retrieve the soc_card or snd_card from a DAPM context. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: SAMSUNG: Add I2S0 internal dma driverSangbeom Kim2011-07-203-0/+481
| | | | | | | | | | | | | | | | | | | | | | | | I2S in Exynos4 and S5PC110(S5PV210) has a internal dma. It can be used low power audio mode and 2nd channel transfer. This patch can support idma. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: SAMSUNG: Modify I2S driver to support idmaSangbeom Kim2011-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | Previously, I2S driver only can support system dma. In this patch, i2s driver can support internal dma too. IDMA h/w configuration is initialized on idma.c Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Liam Girdwood <lrg@ti.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: davinci: add missing break statementRajashekhara, Sudhakar2011-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | In davinci_vcif_trigger() function, a break() statement was missing causing the davinci_vcif_stop() function to be called as a fallback after calling davinci_vcif_start(). Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
| * ASoC: davinci: fix codec start and stop functionsRajashekhara, Sudhakar2011-07-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to DM365 voice codec data sheet at [1], before starting recording or playback, ADC/DAC modules should follow a reset and enable cycle. Writing a 1 to the ADC/DAC bit in the register resets the module and clearing the bit to 0 will enable the module. But the driver seems to be doing the reverse of it. [1] http://focus.ti.com/lit/ug/sprufi9b/sprufi9b.pdf Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
| * ASoC: dapm - add DAPM macro for external enum widgetsLiam Girdwood2011-07-201-0/+6
| | | | | | | | | | | | | | Add a convenience macro for external enumerated widgets. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: Acknowledge WM8962 interrupts before acting on themMark Brown2011-07-201-3/+3
| | | | | | | | | | | | | | | | | | This closes the small race between a status being read in response to an interrupt and clearing the interrupt, meaning that if the status changes between those periods we might not get a reassertion of the interrupt. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
| * ASoC: sgtl5000: guide user when regulator support is neededWolfram Sang2011-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | Print a hint when the user has a setup where CONFIG_REGULATOR is really needed to make the driver work. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Dong Aisheng <b29396@freescale.com> Tested-by: Shawn Guo <shawn.guo@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: sgtl5000: refactor registering internal ldoWolfram Sang2011-07-191-38/+31
| | | | | | | | | | | | | | | | | | | | | | The code for registering the internal ldo was present twice. Turn it into a function instead. Also, inform the user if LDO is used now. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Dong Aisheng <b29396@freescale.com> Tested-by: Shawn Guo <shawn.guo@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: core: make comments fit the codeWolfram Sang2011-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | In one comment, cpu_dai was mentioned although codec_dai was used in the code. Also, fix the name for the card dai list which has no seperation into card_dai and codec_dai. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: Mark cache as dirty when suspendingMark Brown2011-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since quite a few drivers are not managing to flag the cache as needing to be resynced after suspend and it's a reasonable thing to do flag the cache as needing sync automatically when suspending. The expectation is that systems will mainly only keep the CODEC powered when doing audio through the CODEC so we won't actually suspend the device anyway; drivers which want to can override this behaviour when they resume. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
* | ALSA: hda - Cirrus Logic CS421x supportTim Howe2011-07-261-34/+709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update includes the changes necessary for supporting the CS421x family of codecs. Previously this file only supported the CS420x family of codecs. This file also contains init verbs to correct several issues in the CS421x hardware. Behavior between the CS421x and CS420x codec families is similar, so several functions have been reused with "if" statements to determine which codec family (CS421x or CS420x) is present. Also, this file will be updated sometime in the near future in order to add support for a system using CS421x that requires mono mix on the speaker output only. [Fix const usages and adaption for new APIs by tiwai] Signed-off-by: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Make pcm.h self-containedTakashi Iwai2011-07-262-12/+27
| | | | | | | | | | | | | | | | | | | | | | Move the macros depending on snd_mask_min() and co out of pcm.h into pcm_params.h. Otherwise using some params_*() macros will give comiple errors without inclusion of pcm_params.h. Also use hw_param_interval_c() and hw_param_mask_c() for const pointer. Reported-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Allow codec-specific set_power_state opsTakashi Iwai2011-07-263-41/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The procedure for codec D-state change may have exceptional cases depending on the codec chip, such as a longer delay or suppressing D3. This patch adds a new codec ops, set_power_state() to override the system default function. For ease of porting, snd_hda_codec_set_power_to_all() helper function is extracted from the default set_power_state() function. As an example, the Conexant codec-specific delay is removed from the default routine but moved to patch_conexant.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add post_suspend patch opsTakashi Iwai2011-07-262-10/+9
| | | | | | | | | | | | | | | | | | Add a new ops, post_suspend(), which is called after suspend() ops is performed. This is called only in the case of the real PM suspend, and the codec driver can use this for further changing of D-state or clearing the LED, etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PMTakashi Iwai2011-07-268-30/+25
| | | | | | | | | | | | | | | | It makes little sense to enable power-saving without PM. This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM in all places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Make sure mute led reflects master mute stateVitaliy Kulikov2011-07-261-18/+35
| | | | | | | | | | | | | | | | | | | | This patch adds checking of mute state on all outputs besides just speakers to calculate the master mute state for mute led support. It also renames and splits the function that does it for better code clarity. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix invalid mute led state on resume of IDT codecsVitaliy Kulikov2011-07-263-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Codec state is not restored immediately on resume but on the first access when power-save is enabled. That leads to an invalid mute led state after resume until either sound is played or some control is changed. This patch adds a possibility for a vendor specific patch to restore codec state immediately after resume if required. And it adds code to restore IDT codecs state immediately on resume on HP systems with mute led support. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add support of the 4 internal speakers on certain HP laptopsVitaliy Kulikov2011-07-241-1/+50
| | | | | | | | | | Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Make snd_pcm_debug_name usable outside pcm_libEliot Blennerhassett2011-07-243-26/+20
| | | | | | | | | | | | | | | | | | | | Formatting a PCM name is useful for module debug too. Add snd_prefix when making function public. [minor coding-style fixes by tiwai] Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parserTakashi Iwai2011-07-231-1/+4
| | | | | | | | | | | | | | | | Fix a regression in the DAC filling code in patch_realtek.c. The already filled DACs in multiout.dac_nids[] were ignored because of num_dacs=0, thus always pointed to the first DAC. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/hda' into for-linusTakashi Iwai2011-07-2230-21220/+18696
|\ \
| * | ALSA: hda - Remove a superfluous argument of via_auto_init_output()Takashi Iwai2011-07-211-14/+10
| | | | | | | | | | | | | | | | | | "force" argument is always true, so let's strip it off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix indep-HP path (de-)activation for VT1708* codecsTakashi Iwai2011-07-211-40/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes non-working indep-HP control on VT1708* codecs. The problems are that via_independent_hp_put() wasn't fixed to follow the recent change of three HP paths, and hp_indep_path didn't contain the amp nids of mixer elements. Together with the fixes, a few code clean-ups are done. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add documentation for codec-specific mixer controlsTakashi Iwai2011-07-191-0/+100
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Switch HP DAC dynamically with indep-HP switch for VIATakashi Iwai2011-07-181-34/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the behavior of independent-HP enum switch. Now instead of returning a busy error, the driver switches dynamically the stream of the HP (and shared) DACs according to the current mode. The logic is similar like the dual-mic ADC switch, but a bit more complicated because of the presence of shared DAC. Together with the change, a mutex is introduced to protect against the possible races for the indep-HP mode setting. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Implement dynamic loopback control for VIA codecsTakashi Iwai2011-07-181-140/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the dynamic control of analog-loopback for VIA codecs. When the loopback is enabled, the inputs from line-ins and mics are mixed with the front DAC, and sent to the front outputs. The very same input is routed to the headhpones and speakers in loopback mode. However, since the loopback mix can't take other than the front DAC, there is no longer individual volume controls for headphones and speakers. Once when the loopback control is off, these volumes take effect. Since the individual volumes are more desired in general use caess, the loopback mode is set to off as default for now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecsTakashi Iwai2011-07-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the rewrite, the check of spec->need_dac_fix and the corresponding num_dacs change was dropped from the channel-mode control. This patch re-adds it, and also enables need_dac_fix for ALC880 as default, as this feature was originally introduced to fix h/w bugs of this chip. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - fix up typos in Kconfig help for default buffer size introduced ↵Paul Menzel2011-07-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in acfa634f This commit is a fix up for commit acfa634f. commit acfa634f7e199193ec28282e82a5a6dd8edebcb7 Author: Takashi Iwai <tiwai@suse.de> Date: Tue Jul 12 17:27:46 2011 +0200 ALSA: hda - Add Kconfig for the default buffer size Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add Kconfig for the default buffer sizeTakashi Iwai2011-07-122-1/+20
| | | | | | | | | | | | | | | | | | | | | Add a Kconfig entry to specify the default buffer size. Distros using PulseAudio can choose a larger value here. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Expose secret DAC-AA connection of some VIA codecsTakashi Iwai2011-07-121-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VT1718S and co have a secret connection from DAC to AA-mix, which doesn't appear in the connection list obtained from the h/w. Currently the driver fixes the connection index locally at init, but now we can expose it statically via snd_hda_override_connections() so that this conection can be checked better by the parser in future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Always read raw connections for proc outputTakashi Iwai2011-07-123-7/+17
| | | | | | | | | | | | | | | | | | | | | In the codec proc outputs, read the raw connections instead of the cached connection list, i.e. proc files contain only raw values. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add snd_hda_override_conn_list() helper functionTakashi Iwai2011-07-122-30/+71
| | | | | | | | | | | | | | | | | | | | | Add a function to add/modify the connection-list cache entry. It'll be useful to fix a buggy hardware result. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Turn on extra EAPDs on Conexant codecsTakashi Iwai2011-07-111-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some machines seem to use EAPD control of the unused pin for controlling the overall EAPD. Since the driver currently doesn't check the EAPD of unused pins, the EAPD isn't enabled. For avoiding such a problem, turn all extra EAPDs on as default. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Preserve input pin-ctl bits in HP-automute for VIA codecTakashi Iwai2011-07-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | For smart51 pins, we need to preserve the input pin-control bits at auto-mute controls instead of overwriting zero or pin-out-only. Otherwise the VREF won't be set properly when smart51 is disabled again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Set line-out pin-ctls properly when indep-HP mode changesTakashi Iwai2011-07-111-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | When Independent-HP mode is changed for VIA, the driver needs to re-issue the auto-mute check so that the line-out pins are set properly without influence of HP pin state. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Via Fix speaker-mute checks in VIA driverTakashi Iwai2011-07-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the line-jack is plugged/unplugged, the driver must check also the headphone jack state in addition to the line-out jack. Currently it checks only the line-out state and ignores the headphone. Signed-off-by: Takashi Iwai <tiwai@suse.de>