summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FSTakashi Iwai2015-05-298-38/+1Star
| | | | | | | The compiler can optimize the unused code away, so we can drop ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FSTakashi Iwai2015-05-295-12/+9Star
| | | | | | | | | Build emux_proc.o and drop the unneeded ifdefs. Replace the left CONFIG_PROC with the new CONFIG_SND_PROC_FS. Along with this, fix the build of emux_oss.o in Makefile, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FSTakashi Iwai2015-05-293-4/+3Star
| | | | | | | Build emuproc.o conditionally and drop the unneeded ifdefs. Some are replaced with the new CONFIG_SND_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cs46xx: Fix old ifdef CONFIG_PROC_FSTakashi Iwai2015-05-294-9/+9
| | | | | | Replaced with the new CONFIG_SND_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FSTakashi Iwai2015-05-293-6/+3Star
| | | | | | | Build ca0106_proc.o conditionally to drop unneeded ifdef. Some are replaced with the new CONFIG_SND_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ac97: Fix ifdef CONFIG_PROC_FSTakashi Iwai2015-05-292-2/+2
| | | | | | Replaced with the new CONFIG_SND_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FSTakashi Iwai2015-05-291-4/+0Star
| | | | | | The compiler can optimize it away if not needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FSTakashi Iwai2015-05-294-11/+7Star
| | | | | | | Some are replaced with the new ifdef CONFIG_SND_PROC_FS. Some are removed by building opl4_proc.o conditionally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FSTakashi Iwai2015-05-291-2/+2
| | | | | | | Although there shouldn't be a problem in practice (the compiler should handle well), it's better to follow to the new Kconfig. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FSTakashi Iwai2015-05-291-8/+0Star
| | | | | | | Since the compiler can optimize away the unused code, we can reduce the messy ifdef. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: core: Fix randconfig build wrt CONFIG_PROC_FSTakashi Iwai2015-05-292-3/+3
| | | | | | | | | There are a few leftover CONFIG_PROC_FS forgotten to replace with CONFIG_SND_PROC_FS. Fixes: cd6a65036f0e ('ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS') Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Drop unused fields from struct hda_codec_presetTakashi Iwai2015-05-282-13/+1Star
| | | | | | | It's very unlikely that we'd need these fields out of sudden. Let's drop them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FSJie Yang2015-05-2724-52/+52
| | | | | | | | | | | | | We may disable proc fs only for sound part, to reduce ALSA memory footprint. So add CONFIG_SND_PROC_FS and replace the old CONFIG_PROC_FSs in alsa code. With sound proc fs disabled, we can save about 9KB memory size on X86_64 platform. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Kconfig: add config item SND_PROC_FS for expertJie Yang2015-05-271-1/+10
| | | | | | | | | | | | | For some embedded devices, we need reduce code size and data footprint as much as possible, e.g. disabling procfs, hw/sw params refinement, mmap, dpcm, dapm, compressed API... Here add SND_PROC_FS item for expert, we can unselect it to disable sound proc FS and reduce memory footprint. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: fix buffer-over-run when detecting packet discontinuityTakashi Sakamoto2015-05-271-16/+16
| | | | | | | | | | | | | | | | | | | | | When detecting packet discontinuity, handle_in_packet() returns minus value and this value is assigned to unsigned int variable, then the variable has huge value. As a result, the variable causes buffer-over-run in handle_out_packet(). This brings invalid page request and system hangup. This commit fixes the bug to add a new argument into handle_in_packet() and the number of handled data blocks is assignd to it. The function return value is just used to check error. I also considered to change the type of local variable to 'int' in in_stream_callback(). This idea is based on type-conversion in C standard, while it may cause future problems when adding more works. Thus, I dropped this idea. Fixes: 6fc6b9ce41c6('ALSA: firewire-lib: pass the number of data blocks in incoming packets to outgoing packets') Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: sound_firmware: Fix invalid use of vfs_read()Takashi Iwai2015-05-261-3/+1Star
| | | | | | | It should use kernel_read() instead of vfs_read() to load a firmware binary onto the kernel pages. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bcd2000: Make local data staticTakashi Iwai2015-05-261-1/+1
| | | | | | | Spotted by sparse: sound/usb/bcd2000/bcd2000.c:73:1: warning: symbol 'devices_used' was not declared. Should it be static? Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: lx6464es: Use NULL for pointersTakashi Iwai2015-05-261-2/+2
| | | | | | | | Spotted by sparse: sound/pci/lx6464es/lx6464es.c:415:47: warning: Using plain integer as NULL pointer sound/pci/lx6464es/lx6464es.c:417:48: warning: Using plain integer as NULL pointer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: lx6464es: Fix duplicated SSID entriesTakashi Iwai2015-05-261-6/+6
| | | | | | | | | | | | | | PCI_DEVICE() macro itself defines SSID entries while we override them after that. Replace with a more appropriate macro, PCI_DEVICE_SUB() to define all ID values properly. Spotted by sparse: sound/pci/lx6464es/lx6464es.c:60:11: warning: Initializer entry defined twice sound/pci/lx6464es/lx6464es.c:61:12: also defined here sound/pci/lx6464es/lx6464es.c:64:11: warning: Initializer entry defined twice sound/pci/lx6464es/lx6464es.c:65:12: also defined here Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dummy: make local data staticTakashi Iwai2015-05-261-7/+7
| | | | | | | | | | | Add missing prefix to make some local data static. Spotted by sparse: sound/drivers/dummy.c:159:20: warning: symbol 'model_emu10k1' was not declared. Should it be static? sound/drivers/dummy.c:165:20: warning: symbol 'model_rme9652' was not declared. Should it be static? .... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bebob: add Digidesign Mbox 2 Pro supportTakashi Sakamoto2015-05-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is based on DM1000E, and BeBoB version 1 firmware is installed. $ cat /proc/asound/cards 0 [Pro ]: BeBoB - Mbox 2 Pro DIGIDESIGN Mbox 2 Pro (id:1, rev:1), GUID 00a07e0100a90000 at fw1.0, S400 $ cat /proc/asound/Pro/firewire/firmware Manufacturer: bridgeCo Protocol Ver: 1 Build Ver: 0 GUID: 0x00A07E0100A90000 Model ID: 0x01 Model Rev: 1 Firmware Date: 20071031 Firmware Time: 034402 Firmware ID: 0xA9 Firmware Ver: 16777215 Base Addr: 0x20080000 Max Size: 1572864 Loader Date: 20051207 Loader Time: 205554 With this patch, ALSA BeBoB driver can start packet streaming to/from this model, while as a default, internal multiplexer of this model is not initialized and generates no sound even if the driver transfers any packets with PCM samples. To hear any sounds from this model, userspace applications should be developed to set parameters to the internal multiplexer. You can see raw information in FFADO website: http://subversion.ffado.org/wiki/AvcModels/DigiDesignMboxPro2 Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: use protocol error when detecting wrong value in CIP headerTakashi Sakamoto2015-05-241-1/+1
| | | | | | | | | | | | | When detecting zero in 'dbs' field of CIP header, this packet streaming should be aborted because of avoiding division-by-zero. This is an error in an aspect of IEC 61883-1, thus protocol error. This commit use EPROTO instead of EIO. Actually, the returned value is not used for userspace and this commit has no effect. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: use dev_err() when detecting incoming streaming errorTakashi Sakamoto2015-05-241-4/+4
| | | | | | | | | | | | | | | When detecting invalid value in 'dbs' field of CIP header or packet discontinuity, current implementation reports the status by err_info(). In most cases this state is caused by model-specific issue due to vendor's customization and should be reported to developers. This commit use dev_err() instead of dev_info() for this purpose. In the cases, packet streaming is aborted, thus no message floading occurs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: macro arrangement for code cleanupTakashi Sakamoto2015-05-241-14/+20
| | | | | | | | | | | Some macros include my misunderstanding for IEC 61883-1 or -6. Additionally, some fixed values appear on codes. This commit replaces these with macros with proper names. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: rename local functions for code cleanupTakashi Sakamoto2015-05-241-30/+30
| | | | | | | | | The naming rule for local functions was inconsistent. This commit rename them with a consistent manner. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: remove restriction for non-blocking modeTakashi Sakamoto2015-05-231-1/+1
| | | | | | | | Former patches allow non-blocking streams to synchronize with timestamp. This patch removes the restriction. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: set streaming error outside of packetizationTakashi Sakamoto2015-05-231-15/+24
| | | | | | | | | | In previous commit, error handling for incoming packet processing is outside of packetization. This is nice for reading the codes. This commit applies this idea for outgoing packet processing, too. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: pass the number of data blocks in incoming packets to ↵Takashi Sakamoto2015-05-231-24/+30
| | | | | | | | | | | | | | | | | outgoing packets Current implementation reuses the value of syt field in incoming packet to outgoing packet for full duplex timestamp synchronization, while the number of data blocks in outgoing packets refers to hard-coded table and the synchronization cannot be applied to non-blocking stream. This commit passes the number of data blocks from incoming packet processing to outgoing packet processing for the synchronization. For normal mode, isochronous callback handler is changed to generate the values of syt and data blocks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: simplify function to calculate the number of data blocksTakashi Sakamoto2015-05-231-22/+27
| | | | | | | | | | | This function is called according to conditions between the value of syt and streaming mode(blocking or non-blocking). To simplify caller's work, this commit push these conditions to the function. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: add buffer-over-run protection at receiving more data ↵Takashi Sakamoto2015-05-233-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blocks than expected In IEC 61883-6, the number of data blocks in a packet is limited up to the value of SYT_INTERVAL. Current implementation is compliant to the limitation, while it can cause buffer-over-run when the value of dbs field in received packet is illegally large. This commit adds a validator to detect such illegal packets to prevent the buffer-over-run. Actually, the buffer is aligned to the size of memory page, thus this issue hardly causes system errors due to the room to page alignment, as long as a few packets includes such jumbo payload; i.e. a packet to several received packets. Here, Behringer F-Control Audio 202 (based on OXFW 960) has a quirk to postpone transferring isochronous packet till finish handling any asynchronous packets. In this case, this model is lazy, transfers no packets according to several cycle-start packets. After finishing, this model pushes required data in next isochronous packet. As a result, the packet include more data blocks than IEC 61883-6 defines. To continue to support this model, this commit adds a new flag to extend the length of calculated payload. This flag allows the size of payload 5 times as large as IEC 61883-6 defines. As a result, packets from this model passed the validator successfully. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/hdmi' into for-nextTakashi Iwai2015-05-226-0/+217
|\
| * ALSA: pcm: add IEC958 channel status helperRussell King2015-05-224-0/+108
| | | | | | | | | | | | | | | | | | | | Add a helper to create the IEC958 channel status from an ALSA snd_pcm_runtime structure, taking account of the sample rate and sample size. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviwed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcm: add DRM ELD helperRussell King2015-05-224-0/+109
| | | | | | | | | | | | | | | | | | | | Add a helper for the EDID like data structure, which is typically passed from a HDMI adapter to its associated audio driver. This informs the audio driver of the capabilities of the attached HDMI sink. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: jack: Remove MODULE_*() macrosTakashi Iwai2015-05-211-4/+0Star
| | | | | | | | | | | | | | The jack interface is statically included in sound core. Having doubly module information is rather confusing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hdaMengdong Lin2015-05-2011-280/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file is moved to hda core and renamed to hdac_i915.c, so can be used by both legacy HDA driver and new Skylake audio driver. - Add snd_hdac_ prefix to the public APIs. - The i915 audio component is moved to core bus and dynamically allocated. - A static pointer hdac_acomp is used to help bind/unbind callbacks to get this component, because the sound card's private_data is used by the azx chip pointer, which is a legacy structure. It could be removed if private _data changes to some core structure which can be extended to find the bus. - snd_hdac_get_display_clk() is added to get the display core clock for HSW/BDW. - haswell_set_bclk() is moved to hda_intel.c because it needs to write the controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW. - Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have different layout for the extended mode registers. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix NULL dereference from CA0132 DSP loaderTakashi Iwai2015-05-191-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The CA0132 DSP loader leads to NULL deference since the recent transition to HDA core code, as it unconditionally accesses hdac_stream->substream->runtime. For DSP loading, the substream shouldn't be assigned. This patch addresses the NULL dereference above in addition to assure the substream is cleared while DSP loading. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98151 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Sync HD-Audio-Models.txt for Realtek codecsTakashi Iwai2015-05-191-2/+10
| | | | | | | | | | | | Added missing model entries and updated the codec names. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add headset-mode* model options for ALC269 & coTakashi Iwai2015-05-192-0/+4
| | | | | | | | | | | | | | | | Modern machines tend to have only one headset jack nowadays, and they often need these quirks. Let's allow them applicable via model option for ease of debugging. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/ca0132: support for Alienware 15 Creative Sound Core3D-EXGabriele Martino2015-05-191-26/+92
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds quirks detection to the Creative CA0132 codec, and the quirk for Alienware 15 (2015). Some quirks may need different pin configuration, so the relevant compile-time configuration has been removed. The pin configuration and related initialization verbs are generated at runtime instead, in ca0132_config() and ca0132_prepare_verbs(). Signed-off-by: Gabriele Martino <g.martino@gmx.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ppc: keywest: drop using attach adapterWolfram Sang2015-05-181-4/+19
| | | | | | | | | | | | | | | | | | | | As we now have deferred probing, we can use a custom mechanism and finally get rid of this legacy interface from the i2c core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Dan DeVoto <dand1972@yahoo.com> Tested-by: Mark Elliott <txlitebeer@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | sound: oss: fix build warningSudip Mukherjee2015-05-181-0/+2
| | | | | | | | | | | | | | | | | | while building with allyesconfig it was giving a build warning about unused variable. declare the variable only if the driver is built as a module. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - add hda_intel_trace.hLibin Yang2015-05-183-0/+63
| | | | | | | | | | | | | | | | This patch creates hda_intel_trace.h to add some pm trace functions used in hda_intel.c Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - rename hda_intel_trace.h to hda_controller_trace.hLibin Yang2015-05-183-63/+103
| | | | | | | | | | | | | | | | | | | | | | | | This patch does: 1. Rename the hda_intel_trace.h to hda_controller_trace.h as this trace is used in hda_controller.c 2. Add some trace function for pcm flow. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - add hdac stream traceLibin Yang2015-05-182-0/+32
| | | | | | | | | | | | | | Add the trace of snd_hdac_stream_start and snd_hdac_stream_stop. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi - Add Tegra210 supportThierry Reding2015-05-181-0/+1
| | | | | | | | | | | | | | | | Tegra210 contains a similar codec as Tegra124 and can be supported using the same patch function. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi - Add Tegra114 supportThierry Reding2015-05-181-0/+1
| | | | | | | | | | | | | | | | Tegra114 contains the same codec as Tegra124 and can be supported using the same patch function. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi - Add Tegra30 supportThierry Reding2015-05-181-0/+1
| | | | | | | | | | | | | | | | Tegra30 contains the same codec as Tegra124 and can be supported using the same patch function. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/tegra - Improve error reportingThierry Reding2015-05-181-6/+19
| | | | | | | | | | | | | | | | When probing, provide accurate error messages to help with debugging failures. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi - Implement Tegra-specific patchThierry Reding2015-05-181-1/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HDMI codec on NVIDIA Tegra SoCs has a feature that doesn't exist on the MCP or GPU variants. The highest bit in the vendor-defined scratch registers can be used to trigger an interrupt in the HDMI codec, which is signalled to the HDMI driver. This can be used to pass information, such as the HDA format, to the HDMI driver so that it can reconfigure itself accordingly. While at it, change the name of the codec to Tegra124 since there are no other SoCs in the Tegra12x family. There isn't really a Tegra12x family. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/tegra - Set CORBRP self-clear flagThierry Reding2015-05-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | This is set for the MCP variants of the NVIDIA HDA controller, which the Tegra variant was derived from. This fixes the following warning at boot time: [ 2.486610] tegra-hda 70030000.hda: CORB reset timeout#1, CORBRP = 0 Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>