summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_controller.h
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - Drop unused AZX_DCAPS_REVERSE_ASSIGNTakashi Iwai2015-12-171-1/+1
| | | | | | | AZX_DCAPS_REVERSE_ASSIGN is no longer referred by any code. Let's drop it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Drop AZX_DCAPS_POSFIX_VIA bitTakashi Iwai2015-12-171-1/+1
| | | | | | | AZX_DCAPS_POSFIX_VIA is coupled always with AZX_DRIVER_VIA type, so we don't have to keep this bit in dcaps. Save one more! Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top driversTakashi Iwai2015-12-171-1/+1
| | | | | | | | | | AZX_DCAPS_RIRB_DELAY is dedicated only for Nvidia and its purpose is just to set a flag in bus. So it's better to be set in the toplevel driver, either hda_intel.c or hda_tegra.c, instead of the common hda_controller.c. This also allows us to strip this flag from dcaps, so save one more bit there. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Merge RIRB_PRE_DELAY into CTX_WORKAROUND capsTakashi Iwai2015-12-171-1/+1
| | | | | | | | AZX_DCAPS_RIRB_PRE_DELAY is always tied with AZX_DCAPS_CTX_WORKAROUND, which is Creative's XFi specific. So, we can replace it and reduce one more bit free for DCAPS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Clean up the code to check bdl_pos_adj optionTakashi Iwai2015-12-151-1/+1
| | | | | | | | | Just a minor cleanup; instead of passing an array, pass the assigned bdl_pos_adj option value directory in struct azx. Also split the code to get the default bdl_pos_adj value for the change that will follow after this. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't try to bind i915 unless CONFIG_SND_HDA_I915 is setTakashi Iwai2015-12-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | snd-hda-intel driver tries to bind with i915 audio component always when AZX_DCAPS_I915_POWERWELL is set in the driver caps. This was mostly OK in the past, as the flag was applied only to a limited set of devices, namely, Haswell and Broadwell. On these machines, i915 graphics is almost mandatory as long as HDMI/DP is concerned. Recently the application of i915 binding was widened to more Intel chips. On these chips, the chance of a kernel without i915 graphics is much higher, and such user would hit an error like: snd_hda_intel 0000:00:1b.0: failed to add i915 component master (-19) Although the error itself is harmless, it's certainly superfluous even to try binding with i915, if we already know that there isn't any. This patch fixes it by simply defining AZX_DCAPS_I915_POWERWELL as 0 in the case without i915. Then all codes referring to this flag will be optimized out by the compiler. Fixes: 6603249dcdbb ('ALSA: hda - Enable audio component for old Intel PCH devices') Reported-by: kernel test robot <ying.huang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Spell vga_switcheroo consistentlyLukas Wunner2015-10-191-1/+1
| | | | | | | | | | | | | | Currently everyone and their dog has their own favourite spelling for vga_switcheroo. This makes it hard to grep dmesg for log entries relating to vga_switcheroo. It also makes it hard to find related source files in the tree. vga_switcheroo.c uses pr_fmt "vga_switcheroo". Use that everywhere. Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/9b0175319ce78d831acfcf11e4c6c760f826b0e3.1444663039.git.lukas@wunner.de Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Merge branch 'topic/hda' into for-nextTakashi Iwai2015-04-291-0/+2
|\
| * ALSA: hda - implement link_power ops for i915 display power controlMengdong Lin2015-04-291-0/+2
| | | | | | | | | | | | | | | | | | This patch implements the bus link_power ops to request/release i915 display power well. It can be used by the display codec which shares this power well with GPU on Intel platforms. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/hda' into for-4.2Takashi Iwai2015-04-271-242/+28Star
|\|
| * ALSA: hda - Move prepared flag into struct hdac_streamTakashi Iwai2015-04-171-1/+0Star
| | | | | | | | | | | | This flag seems used commonly, so deserves to be located there. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Drop azx_sd_read*/write*() macrosTakashi Iwai2015-04-161-13/+0Star
| | | | | | | | | | | | | | They are no longer used (only one place which can be replaced with a proper helper function). Let's drop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Embed bus into controller objectTakashi Iwai2015-04-161-45/+20Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and replace with the existing hda-core helper codes. This reduces lots of lines, finally. Since struct hda_bus is now embedded into struct azx, snd_hda_bus_new() is moved and expanded from hda_codec.c to hda_controller.c, accordingly. Also private_free bus ops and private_data field are removed because we no longer need to point azx object from bus (we can use container_of()) The spin locks are consolidated into the single one, bus->reg_lock. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Migrate hdac_stream into legacy driverTakashi Iwai2015-04-161-49/+12Star
| | | | | | | | | | | | | | | | | | | | | | Embed hdac_stream object into azx_dev, and use a few basic helper functions. The most of helper codes for hdac_stream aren't still used yet. Also this commit disables the tracepoints temporarily due to build problems. It'll be enabled again later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Pass bus io_ops directly from the top-level driverTakashi Iwai2015-04-161-25/+15Star
| | | | | | | | | | | | | | | | | | One less redirection again. This also requires the change of the call order in the toplevel divers. Namely, the bus has to be created at first before other initializations since the memory allocation ops are called through bus object now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add the controller helper codes to hda-core moduleTakashi Iwai2015-04-161-130/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the controller helper codes to hda-core library. The I/O access ops are added to the bus ops. The CORB/RIRB, the basic attributes like irq# and iomap address, some locks and the list of streams are added to the bus object, together with the stream object and its helpers. Currently the codes are just copied from the legacy driver, so you can find duplicated codes in both directories. Only constants are removed from the original hda_controller.h. More integration work will follow in the later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - simplify azx_has_pm_runtimeDavid Henningsson2015-04-161-1/+1
|/ | | | | | | | Because AZX_DCAPS_PM_RUNTIME is always defined as non-zero, the initial part of the expression can be skipped. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use shutdown driver ops instead of reboot notifierTakashi Iwai2015-03-131-6/+0Star
| | | | | | | | | The driver shutdown ops is simpler than registering reboot notifier manually. There should be no functional change by this -- the codec driver calls its own callback while the bus driver just calls azx_stop() like before. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Clear pcm pointer assigned to hda_pcm at device removalTakashi Iwai2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | We leave the pcm field of struct hda_pcm at removal of each device, so far. This hasn't been a problem since unbinding the codec driver isn't supposed to happen and another route via snd_hda_codec_reset() clears all the once. However, for a proper unbind implementation, we need to care about it. This patch does the thing above properly: - Include struct hda_pcm pointer instead of struct hda_pcm_stream pointers in struct azx_dev. This allows us to point the hda_pcm object at dev_free callback. - Introduce to_hda_pcm_stream() macro for better readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Drop power_save value indirection in hda_busTakashi Iwai2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | We used to pass the power_save option value to hda_bus via a given pointer. This was needed to refer to the value from the HD-audio core side. However, after the transition to the runtime PM, this is no longer needed. This patch drops the power_save value indirection in hda_bus above, and let the controller driver reprograms the autosuspend value explicitly by a new helper, snd_hda_set_power_save(). Without this call, the HD-audio core doesn't set up the autosuspend and flip the runtime PM. (User may still be able to set up via sysfs, though.) Along with this change, the pointer argument of azx_bus_create() is dropped as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Split azx_codec_create() to two phasesTakashi Iwai2015-02-191-3/+2Star
| | | | | | | | azx_create_codec() function does actually two things: create a bus and probe codecs. For the future work, split this to two logical functions, azx_bus_create() and azx_probe_codecs(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Drop azx_mixer_create()Takashi Iwai2015-02-191-1/+0Star
| | | | | | | It's just an indirection, so let the caller directly calling snd_hda_build_controls(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fold hda_priv.h into hda_controller.hTakashi Iwai2015-02-191-1/+390
| | | | | | There is no big reason to keep them separately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Use common reboot notifierTakashi Iwai2014-06-261-0/+3
| | | | | | | The very same notifier code is used in both hda_intel.c and hda_tegra.c. Move it to the generic code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make position_fix as generic callbackTakashi Iwai2014-06-261-3/+3
| | | | | | | | | | | | ... and move most parts into hda_intel.c from the generic controller code. This is a clean up, and there should be no functional change by this patch. Now, struct azx obtains the generic callbacks for getting the position and the delay. As default NULL, posbuf is read. These replace the old position_fix[], and each is implemented as a callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make full_reset booleanThierry Reding2014-04-091-1/+1
| | | | | | | | The full_reset argument to azx_init_chip() carries boolean rather than numerical information, so update the type to reflect that. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Move codec create to hda_controllerDylan Reid2014-03-011-18/+8Star
| | | | | | | | | 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-011-1/+1
| | | | | | | | | 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 - Move low level functions to hda_controllerDylan Reid2014-03-011-2/+5
| | | | | | | | | 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-011-1/+0Star
| | | | | | | | 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-011-0/+11
| | | | | | | | | | 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-011-17/+6Star
| | | | | | | | | | | | 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-011-0/+4
| | | | | | | | | | 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-011-0/+57
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>