aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: sis7019: Simplify dependenciesJean Delvare2014-03-111-1/+1
| | | | | | | | Kconfig symbol X86_32 was introduced in October 2005, it's about time to use it :-) Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cs5535audio: Also needed on MIPSJean Delvare2014-03-111-1/+1
| | | | | | | | | The CS5536 companion chipset is not only used on 32-bit x86 systems as I originally thought, it is also used on MIPS Loongson/Lemote 2 systems. So let the snd-cs5535audio driver be built on MIPS too. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - initialize audio InfoFrame to be all zeroMengdong Lin2014-03-111-0/+1
| | | | | | | | This patch initialized the local audio InfoFrame variable 'ai' to be all zero, thus the data bytes will indicate "Refer to Stream Header" by default. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Revert "ALSA: emu10k1: Fix warning: "CCR" redefined"Geert Uytterhoeven2014-03-111-2/+0
| | | | | | | | | | | This reverts commit 83fc3bc09518d42e8f5073e2a65884701dfadf19. sh-specific "CCR" and "CCR2" have been prefixed by "SH_" in commit a5f6ea29f9a918403629f8369ae55fac6b09cb53 ('sh: prefix sh-specific "CCR" and "CCR2" by "SH_"'). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cs553*: Fix dependenciesJean Delvare2014-03-111-1/+2
| | | | | | | | | | The CS5530, CS5535 and CS5536 chipsets are companions of the Geode series of processors, which are 32-bit x86 processors. So the snd-cs5530 and snd-cs5535audio drivers are only needed on this architecture, except for build testing purpose. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: emu10k1: Fix possible NULL dereferenceTakashi Iwai2014-03-051-4/+1
| | | | | | | | | | | The previous dev_err() conversion resulted in a code that may give NULL dereference in snd_emu10k1_ptr_write(). Since it's a sanity check, better to be replaced with a debug macro like other places in this driver. Fixes: 6f002b02166c ('ALSA: emu10k1: Use standard printk helpers') Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: echoaudio: use after free on errorDan Carpenter2014-03-051-4/+4
| | | | | | | | There are some places where we dereference "chip" in the error message but we've already freed it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: lola: NULL deref on allocation errorDan Carpenter2014-03-051-1/+0
| | | | | | | | "chip" is NULL here. We don't need a printk here because kmalloc() has it built in. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Add headset quirk for Dell DTKailang Yang2014-03-031-7/+41
| | | | | | | This quirk is needed for the headset microphone to work. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Mark reg op args as iomemDylan Reid2014-03-032-12/+12
| | | | | | | | The ops to read and write registers should take pointers labeled as __iomem. Thanks to the sparse bot for catching this. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Rename reg access ops in hda_controller_opsDylan Reid2014-03-032-24/+24
| | | | | | | | | | | | Using readl, writel, etc. resulted in some architectures, such as s390, expanding the member names into zpci_writel. Obviously not the intended result. Fixes s390 build breakage introduced by "4083081 - ALSA: hda - Allow different ops to read/write registers" Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make azx_attach_pcm_stream staticDylan Reid2014-03-031-2/+2
| | | | | | | It is only used in hda_controller.c now. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - remove PCI dependency in KconfigDylan Reid2014-03-013-20/+31
| | | | | | | | | Remove the dependency on CONFIG_PCI for building hda codec drivers so that platforms with HDA attach via means other than PCI can use them. This was as suggested by tiwai. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: core - Define snd_pci_quirk without CONFIG_PCIDylan Reid2014-03-011-1/+14
| | | | | | | | The hda codecs all use this struct and, with an HDA platform driver, will be able to be built without PCI. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move codec create to hda_controllerDylan Reid2014-03-013-248/+235
| | | | | | | | | Codec creation and stream initialization can be shared between hda_intel and hda platform drivers. Move it and the static functions it depends on to hda_controller.c. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move azx_interrupt to hda_controllerDylan Reid2014-03-013-68/+68
| | | | | | | | | This code will be reused by an hda_platform driver as it has no PCI dependencies. This allows update_rirb to be static as all users are now in hda_controller.c. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add position_check opDylan Reid2014-03-012-9/+23
| | | | | | | | | | This op will be used by hda_intel to do the position check. Takashi wisely suggested adding this before moving the interrupt handler to common HDA code. Having this callback prevents the need to move the hda_intel specific delayed interrupt handling with the irq. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move low level functions to hda_controllerDylan Reid2014-03-013-179/+180
| | | | | | | | | Share more code from hda_intel. This moves the link control and initialization to hda_controller. The code will also be used by an hda platform driver. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - move alloc_cmd_io to hda_controllerDylan Reid2014-03-013-6/+6
| | | | | | | | Combining the call to alloc_cmd_io with the allocate pages function removes an extra interface between hda_intel and hda_controller. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Relocate RIRB/CORB interface to hda_controllerDylan Reid2014-03-013-383/+396
| | | | | | | | | | This is done to allow an HDA platform driver to reuse the code. A few of the interfaces added to hda_controller will disappear in following commits as their users are also moved to hda_controller. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move the dsp loader to hda_controllerDylan Reid2014-03-013-152/+144
| | | | | | | | | | | | Moving the DSP loading functionality to hda_controller.c means that the dsp lock doesn't need to be shared in hda_intel and hda_controller. The forthcoming platform driver doesn't need the DSP loading code, but sharing it doesn't hurt. Tested on Chromebook Pixel's ca0132 that uses the DSP loader. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Pull pages allocation to hda_controllerDylan Reid2014-03-013-29/+52
| | | | | | | | | | Pull allocation from first_init to a new function in hda_controller.c. Short term this will allow the dsp loader to be moved as well. In later commits it will allow the same allocation to be used by the platform hda driver. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add hda_controller.c and move pcm ops from hda_intelDylan Reid2014-03-014-1000/+1078
| | | | | | | | | | | | | | Pull the pcm_ops and the functions they use into a new hda_controller file. This is done to allow for other hda implementations besides PCI to use the same ops. The hda_controller file will house functionality related to HDA but independent of the bus used to talk to the controller. This currently shares dsp locking across the two files. This will be remedied in a following commit. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add pcm_mmap_prepare op.Dylan Reid2014-03-012-6/+16
| | | | | | | | Adding this op allows the X86 specific mmap operation to help in hda_intel without needing a CONFIG_X86 in future non-PCI hda drivers. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move snd page allocation to opsDylan Reid2014-03-012-54/+98
| | | | | | | | | | | Break out the allocation of pages for DMA and PCM buffers to ops in the chip structure. This is done to allow for architecture specific work-arounds to be added. Currently mark_pages_wc is used by hda_intel. This avoids needing to move that x86-specific code to a common area shared with hda platform drivers. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Pass max_slots and power_save to codec_createDylan Reid2014-03-011-11/+17
| | | | | | | | | | Passing the max slots and power save arguments to codec_create will allow for its reuse by an hda_platform driver. It makes the function independent of the module params in hda_intel and ready to move to hda_shared in a following commit. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add jackpoll_ms to struct azxDylan Reid2014-03-012-1/+8
| | | | | | | | | | | Keeping a pointer to the jackpoll_ms array in the chip will allow azx_codec_create to be shared between hda_intel and hda_platform drivers. Also modify get_jackpoll_ms to make the jackpoll_ms member optional, this way a platform driver can leave it out if it's not needed. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - remove unused clear of STATESTSDylan Reid2014-03-011-5/+0
| | | | | | | | | Although the code was updated last year the "#if 0" surrounding it dates back to the original git commit. The function will be moved to a new file, no need to carry the dead code. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add function pointer for disabling MSIDylan Reid2014-03-012-5/+22
| | | | | | | | | This is a PCI-only feature, but adding a callback for it in the chip structure breaks the PCI dependency in the RIRB code allowing the logic there to be re-used by the platform HDA driver. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use device pointer from the card instead of pciDylan Reid2014-03-011-13/+14
| | | | | | | | This removes calls to get the device via PCI from other parts of the code that will be able to be re-used by the platform driver. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Keep pointer to bdl_pos_fix in chip structDylan Reid2014-03-012-4/+9
| | | | | | | | | This will allow for a platform hda driver to use it as well. It removes the dependency on the module param from hda_intel, which will allow for azx_setup_periods to be shared. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Allow different ops to read/write registersDylan Reid2014-03-012-70/+138
| | | | | | | | | | | | | | | The forthcoming platform hda driver needs to override the way registers are read and written. In preparation for that, introduce a reg_ops struct that can be implemented differently by the new driver. Change the existing macros to use the new structure, and move them to hda_priv.h where they will be accessible to both PCI and platform drivers. Start with register access, but later commits will add more ops that differ between PCI and platform. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move some definitions to new hda_priv.hDylan Reid2014-03-012-365/+399
| | | | | | | | | | | | Later commits adding support for hda platform drivers will want to use the same defines and structures. Put them in a place reachable by both hda_intel and the new platform driver. This is a mostly a direct copy with a few whitespace and comment changes to make checkpatch happy. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix CORB reset to follow specificationDavid Henningsson2014-02-281-1/+23
| | | | | | | | | | | | | | | | According to the HDA spec, we must write 1 to bit 15 on a CORBRP reset, read back 1, then write 0, then read back 0. This must be done while the DMA is not running. We accidentaly ended up writing back the 0 by using a writel instead of a writew to CORBWP. This caused occasional controller failure on Bay Trail hardware. [replaced error messages with dev_err() by tiwai] Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix registration of beep input deviceTakashi Iwai2014-02-285-13/+39
| | | | | | | | | | | | | | | | | | The beep input device is registered via input_register_device(), but this is called in snd_hda_attach_beep_device() where the sound devices aren't registered yet. This leads to the binding to non-existing object, thus results in failure. And, even if the binding worked (against the PCI object), it's still racy; the input device appears before the sound objects. For fixing this, register the input device properly at dev_register ops of the codec object it's bound with. Also, call snd_hda_detach_beep_device() at dev_disconnection so that it's detached at the right timing. As a bonus, since it's called in the codec's ops, we can get rid of the further call from the other codec drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/cvt-dev-prints' into for-nextTakashi Iwai2014-02-28107-2117/+2520
|\ | | | | | | | | This merges the bunch of changes over pci and usb sound drivers to convert to dev_err() and co.
| * ALSA: 6fire: Use standard printk helpersTakashi Iwai2014-02-266-72/+86
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: Use standard printk helpersTakashi Iwai2014-02-2611-254/+325
| | | | | | | | | | | | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. As there are too deep indirections (e.g. ep->chip->dev->dev), a few new local macros, usb_audio_err() & co, are introduced. Also, the device numbers in some messages are dropped, as they are shown in the prefix automatically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: ymfpci: Use standard printk helpersTakashi Iwai2014-02-262-18/+30
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: vx222: Use standard printk helpersTakashi Iwai2014-02-262-13/+13
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: trident: Use standard printk helpersTakashi Iwai2014-02-261-41/+48
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: rme9652: Use standard printk helpersTakashi Iwai2014-02-261-6/+13
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdspm: Use standard printk helpersTakashi Iwai2014-02-261-56/+69
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hdsp: Use standard printk helpersTakashi Iwai2014-02-261-49/+79
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr: Use standard printk helpersTakashi Iwai2014-02-265-98/+131
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: oxygen: Use standard printk helpersTakashi Iwai2014-02-264-12/+12
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: nm256: Use standard printk helpersTakashi Iwai2014-02-261-32/+43
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: mixart: Use standard printk helpersTakashi Iwai2014-02-264-85/+163
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: lx6464es: Use standard printk helpersTakashi Iwai2014-02-262-117/+129
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: lola: Use standard printk helpersTakashi Iwai2014-02-264-49/+55
| | | | | | | | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>