summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - hdmi: Re-setup pin and infoframe on plug-in on all codecsAnssi Hannula2013-10-251-4/+5
| | | | | | | | | | | | | | | | | | | | hdmi_setup_audio_infoframe() does not set up pin and infoframe if there is no connected sink. If a sink is connected while audio playback is already in progress, the pin and infoframe will not be properly set up, causing no audio or wrongly mapped audio. On Intel Haswell codecs the hdmi_setup_audio_infoframe() is already called again from hdmi_present_sense() when an ELD appears because transcoder:port mapping may have changed. Make the call non-Haswell-specific so that audio will be properly set up if the playback was started before a sink was connected. Tested on non-Haswell Intel HDMI codec by plugging sink in during playback. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Disable ramp-up/down for non-PCM on AMD codecsAnssi Hannula2013-10-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent AMD HDMI codecs (revision ID 3 and later, 0x100300 as reported by procfs codec#0) have a configurable ramp-up/down functionality. The documentation ( http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf ) specifies that 180 ("180/256 =~ 0.7") is recommended for PCM and 0 for non-PCM. Apply the recommended values according to provided S/PDIF AES0 settings since ramp-up/down does not make sense for non-PCM. v2: adapted to hdmi_ops infrastructure * More note from Anssi: actually, re-reading mails reveals that Olivier didn't find the expected difference with this setting, except for "maybe slightly slower startup with AES0=6" (i.e. value 0, which is unexpected). So maybe a) it makes too unnoticiable a difference, or b) only affects certain hardware (card and/or sink), or c) ramp-up/down is only triggered with the MUTE bit of ATI_VERB_SET_MULTICHANNEL_xx which is also rev3+ specific, but is not presently used by the driver, or something else. So there's a significant chance setting ramp rate is useless for us ATM, but probably does not do actual harm either. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Olivier Langlois <olivier@trillion01.com> # v1 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Add HBR bitstreaming support for ATI/AMD HDMI codecsAnssi Hannula2013-10-241-0/+35
| | | | | | | | | | | | | | | | | ATI/AMD HDMI codecs do not include standard HDA HDMI HBR support (which is required for bitstreaming DTS-HD and Dolby TrueHD), instead they have custom verbs for checking and enabling it. Add support for the ATI/AMD HDMI HBR verbs. The specification is available at: http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf v2: adapted to hdmi_ops infrastructure Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Peter Frühberger <fritsch@xbmc.org> # v1 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecsAnssi Hannula2013-10-243-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data) support. In place of providing access to an ELD buffer, various vendor-specific verbs are provided to provide the relevant information. Revision ID 3 and later (0x100300 as reported by procfs codec#X) have support for providing more information than the previous revisions (but only if supported by the display driver). Generate ELD from the information provided by the vendor-specific verbs on ATI/AMD codecs. The specification is available at: http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf v2: moved code to hda_eld.c and cleaned it up v3: adapted to hdmi_ops infrastructure Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2 Tested-by: Olivier Langlois <olivier@trillion01.com> # v2 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Add ATI/AMD multi-channel audio supportAnssi Hannula2013-10-241-29/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATI/AMD codecs do not support all the standard HDA HDMI/DP functions, instead various vendor-specific verbs are provided. This commit addresses these missing functions: - standard channel mapping support - standard infoframe configuration support ATI/AMD provides their own verbs that allow the following: - setting CA for infoframe - setting down-mix information for infoframe - channel pair remapping - individual channel remapping (revision ID 3+, 0x100300+) The documentation for the verbs has now been released by AMD: http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf Add support for the ATI/AMD specific verbs and use them instead of the generic methods on ATI/AMD codecs. This allows multi-channel PCM audio to work. Channel remapping is restricted to pairwise mapping on codecs with revision ID 2 (0x100200 as reported by procfs codec#X) or lower. This means cards up to Radeon HD7670 as far as I know. This will not affect standard multi-channel modes since these codecs support automatic FC-LFE swapping for HDMI. ATI/AMD codecs do not advertise all of their supported rates, formats and channel counts, therefore that information is forced accordingly so that all HDMI 1.x PCM parameters are marked as supported. Support for multiple ports is also added to patch_atihdmi so that 0x1002aa01 codecs with multiple ports will work properly when switched back to that patch. v2: splitted ELD emulation to a separate patch, tlv fixes v3: adapted to the new hdmi_ops infrastructure, fixed rev3+ vendor id Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2 Tested-by: Olivier Langlois <olivier@trillion01.com> # v2+rev3fix Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - hdmi: Allow HDA patches to customize more operationsAnssi Hannula2013-10-241-80/+195
| | | | | | | | | | | | | Upcoming AMD multichannel support requires many customized operations (channel mapping, ELD, HBR) but can otherwise share most of its code with the generic patch. Add a local struct hdmi_ops containing customizable HDMI-specific callbacks and move the current code to those callbacks. Functionality is unaltered. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Raise the delay for alc283_shutupKailang Yang2013-10-241-2/+2
| | | | | | | | Some machine with 85ms delay might be happen pop noise when codec enter to D3. Raise up to 100ms delay will be match for more machine. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: compress: fix drain calls blocking other compress functionsVinod Koul2013-10-242-3/+50
| | | | | | | | | | | | | | | | The drain and drain_notify callback were blocked by low level driver untill the draining was complete. Due to this being invoked with big fat mutex held, others ops like reading timestamp, calling pause, drop were blocked. So to fix this we add a new snd_compr_drain_notify() API. This would be required to be invoked by low level driver when drain or partial drain has been completed by the DSP. Thus we make the drain and partial_drain callback as non blocking and driver returns immediately after notifying DSP. The waiting is done while relasing the lock so that other ops can go ahead. Signed-off-by: Vinod Koul <vinod.koul@intel.com> CC: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Add ifdef CONFIG_GENERIC_ALLOCATOR for SNDRV_DMA_TYPE_IRAM codeTakashi Iwai2013-10-243-0/+10
| | | | | | | | | | | It turned out that we can't use gen_pool_*() functions on archs without CONFIG_GENERIC_ALLOCATOR (resulting in missing symbols), since linux/genalloc.h doesn't provide dummy functions for all. We'd be able to fix linux/genalloc.h size, but I take an easier path for now... Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix mute LED on HP laptops in runtime suspendTakashi Iwai2013-10-243-2/+6
| | | | | | | | | | | When HP laptops with mute and mic-record LEDs go to runtime suspend, these LEDs are turned on forcibly no matter whether GPIO pis are on or off. This strange behavior seems triggered by resetting the HD-audio bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to avoid the link reset at runtime suspend and set it for these HP machines. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support of ALC285 / ALC293 codecsKailang Yang2013-10-241-0/+8
| | | | | | | Yet another variants of ALC269. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add support of ALC255 codecsKailang Yang2013-10-241-0/+6
| | | | | | | | It's just another variant of ALC269 & co. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove OOM message after input_allocate_deviceJoe Perches2013-10-241-3/+1
| | | | | | | | Emitting an OOM message isn't necessary after input_allocate_device as there's a generic OOM and a dump_stack already done. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Add SoC on-chip internal ram support for DMA buffer allocationNicolin Chen2013-10-243-0/+59
| | | | | | | | | | | | | Now it's quite common that an SoC contains its on-chip internal RAM. By using this RAM space for DMA buffer during audio playback/record, we can shutdown the voltage for external RAM to save power. So add new DEV type with iram malloc()/free() and accordingly modify current default mmap() for the iram circumstance. Signed-off-by: Nicolin Chen <b42378@freescale.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'dice-driver-playback-only' of ↵Takashi Iwai2013-10-2217-151/+2192
|\ | | | | | | git://git.alsa-project.org/alsa-kprivate into for-next
| * ALSA: dice: restrict the driver to playback-only devicesClemens Ladisch2013-10-202-4/+15
| | | | | | | | | | | | | | | | At the moment, this driver supports only playback, while FFADO supports (only) full-duplex devices. So, prevent conflicts by not claiming devices that would be better handled by FFADO. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: fix detection of Weiss devicesClemens Ladisch2013-10-201-5/+12
| | | | | | | | | | | | | | | | While most DICE devices keep TCAT's default category ID of 0x04, Weiss devices identify themselves with 0x00. Reported-by: Rolf Anderegg <rolf.anderegg@weiss.ch> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: dice_proc_read: remove wrong typecastClemens Ladisch2013-10-201-2/+1
| | | | | | | | | | | | Remove a wrong typecast that resulted from a copy-and-paste error. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: document quadlet alignmentClemens Ladisch2013-10-201-3/+3
| | | | | | | | | | | | | | | | Doing accesses without quadlet alignment is a bad idea because the firmware's byte-swapping would garble the data; clarify this in the documentation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: add a proc file to show device informationClemens Ladisch2013-10-201-0/+246
| | | | | | | | | | | | | | For easier debugging, add a proc file to show the device's capabilities and current status. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: check clock change timeoutClemens Ladisch2013-10-201-2/+3
| | | | | | | | | | | | | | Output a warning if the wait for the clock change notification times out. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: dynamic sample rate selectionClemens Ladisch2013-10-201-35/+102
| | | | | | | | | | | | | | Instead of relying of some control panel application to configure some fixed sample rate, allow applications to set it automatically. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: get rate-dependent parametersClemens Ladisch2013-10-201-2/+90
| | | | | | | | | | | | | | In preparation for sample rate selection support, read the stream parameters that might change when running at different sample rates. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: allow notifications during initializationClemens Ladisch2013-10-201-11/+11
| | | | | | | | | | | | | | Reorganize the initialization order so that the driver can receive notifications earlier. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: get clock capabilitiesClemens Ladisch2013-10-201-2/+21
| | | | | | | | | | | | | | In preparation for sample rate selection support, ensure that the driver knows about the device's clock capabilities. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: make amdtp_rates[] constClemens Ladisch2013-10-202-2/+2
| | | | | | | | Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: fix lockingStefan Richter2013-10-201-4/+4
| | | | | | | | | | | | | | Avoid a lock inversion between dice->mutex and pcm->open_mutex. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: remove superfluous fieldClemens Ladisch2013-10-201-3/+1
| | | | | | | | | | | | The pcm field was not actually used. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: remove 10s period length limitClemens Ladisch2013-10-201-1/+1
| | | | | | | | | | | | | | Since commit f2b3614cefb6 (Don't check DMA time-out too shortly), we need no longer to restrict the period length to less than 10 s. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: avoid superflous write at bus resetClemens Ladisch2013-10-201-0/+5
| | | | | | | | | | | | | | When a bus reset happens, the enable register is automatically cleared, so we do not need to clear it manually when stopping the stream. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: firewire: extend snd_fw_transaction()Clemens Ladisch2013-10-208-206/+137
| | | | | | | | | | | | | | | | | | | | | | Add a flag to snd_fw_transaction() to allow it to abort when a bus reset happens. This removes most of the duplicated error handling loops that were required around calls to the low-level fw_run_transaction(). Also add a flag to suppress error messages; errors are expected when we attempt to clean up after the device was unplugged. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: optimize reading of consecutive registersClemens Ladisch2013-10-201-16/+11
| | | | | | | | | | | | | | Instead of reading two consecutive register with two quadlet requests, use one block read request. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: support dual-wire stream format at 192 kHzClemens Ladisch2013-10-204-67/+164
| | | | | | | | | | | | | | Change the AMDTP streaming code to handle the non-standard stream format that DICE devices use at sample rates greater than 96 kHz. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: fix device detection for other vendorsClemens Ladisch2013-10-201-18/+84
| | | | | | | | | | | | | | | | | | DICE devices do not have a unique specifier ID in their unit directory (it's always the same as the device vendor's ID), so rely on just the version ID for driver loading, and use a heuristic in the probe callback to detect actual DICE devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: reorganize interface definitionsClemens Ladisch2013-10-202-207/+373
| | | | | | | | | | | | | | Move the DICE interface symbols into a separate header file, and add more documentation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: firewire: introduce amdtp_out_stream_running()Clemens Ladisch2013-10-204-23/+18
| | | | | | | | | | | | | | | | Introduce the helper function amdtp_out_stream_running(). This makes many checks in amdtp.c clearer and frees the device drivers from having to track this with a separate variable. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: clear device lock when closing hwdep deviceClemens Ladisch2013-10-201-0/+13
| | | | | | | | | | | | | | Ensure that misbehaving or aborted userspace programs do not accidentally keep the lock. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: implement hwdep deviceClemens Ladisch2013-10-201-22/+203
| | | | | | | | | | | | Implement the hwdep locking and notification mechanisms. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: fix hang when unplugging a running deviceClemens Ladisch2013-10-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | When aborting a PCM stream, the xrun is signaled only if the stream is running. When disconnecting a PCM stream, calling snd_card_disconnect() too early would change the stream into a non-running state and thus prevent the xrun from being noticed by user space. To prevent this, move the snd_card_disconnect() call after the xrun. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice, firewire-lib: add blocking modeClemens Ladisch2013-10-203-27/+36
| | | | | | | | | | | | | | | | | | Allow AMDTP output streams to use blocking mode. Use it for DICE devices, because the old DICE-II chip will in some cases not be able to lock to non-blocking streams (erratum E7). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: reduce noisy loggingClemens Ladisch2013-10-201-2/+2
| | | | | | | | | | | | | | The notification bits are not of general interest; log them only when debugging. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: allow all sample ratesClemens Ladisch2013-10-201-13/+42
| | | | | | | | | | | | | | | | | | | | Instead of forcing a constant 44.1 kHz, read the current sample rate from the device when opening the PCM device. Actually changing the sample rate requires some separate controller application. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: dice: optimize bus reset handlingClemens Ladisch2013-10-201-55/+93
| | | | | | | | | | | | | | After a bus reset, do not stop the stream completely to avoid having to reconfigure the device when restarting the stream. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * ALSA: add DICE driverClemens Ladisch2013-10-177-1/+1078
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As a start point for further development, this is an incomplete driver for DICE devices: - only playback (so no clock source except the bus clock) - only 44.1 kHz - no MIDI - recovery after bus reset is slow - hwdep device is created, but not actually implemented Contains compilation fixes by Stefan Richter. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* | ALSA: hda - Fix typos in patch_hdmi.cTakashi Iwai2013-10-211-3/+3
| | | | | | | | | | | | | | | | ... which was introduced by the previous commit a4e9a38b, causing build errors without CONFIG_PROC_FS. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - add codec ID for Valleyview2 display codecMengdong Lin2013-10-211-0/+2
| | | | | | | | | | | | | | | | This patch adds codec ID (0x80862882) and module alias for Valleyview2 display codec. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: emu10k1: code refactoringGeyslan G. Bem2013-10-181-31/+45
| | | | | | | | | | | | | | | | | | | | | | Partially restructures _snd_emu10k1_audigy_init_efx() and _snd_emu10k1_init_efx() functions. Be noted that the cast is demanded to use '__user'. So, in these cases, avoid patches based on the coccinelle 'drop_kmalloc_cast' semantic patch. Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Move mutex from hda_eld to per_pin in HDMI codec driverTakashi Iwai2013-10-173-81/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the lock is used primarily in patch_hdmi.c, it's better to move it in the local struct instead of exporting in hda_eld. The only functions requiring the lock in hda_eld.c are proc accessors. So in this patch, the proc entry and its creation/deletion/accessors are moved into patch_hdmi.c, together with the mutex lock to pin_spec struct. The former proc info functions are exported so that they can be called from patch_hdmi.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix possible races in HDMI driverTakashi Iwai2013-10-171-3/+11
| | | | | | | | | | | | | | | | | | | | Some per_pin fields and ELD contents might be changed dynamically in multiple ways where the concurrent accesses are still opened in the current code. This patch fixes such possible races by using eld->lock in appropriate places. Reported-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Treat zero connection as non-errorTakashi Iwai2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The zero-length connection list happens so often on Haswell HDMI, and it results in warning messages like ALSA: hda_codec: invalid CONNECT_LIST verb 5[1]:0 at each time the codec resumes from the power-save, which is fairly annoying. Since this is no real error, make it shown only in the verbose debug mode. Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud