summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_tegra.c
AgeCommit message (Collapse)AuthorFilesLines
2015-04-16ALSA: hda/tegra - Fix build error and warningTakashi Iwai1-3/+1
I seem to have failed to run the build test properly... sound/pci/hda/hda_tegra.c: In function 'hda_tegra_dev_free': sound/pci/hda/hda_tegra.c:310:20: error: 'bus' undeclared (first use in this function) snd_hdac_bus_exit(bus); Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - Minor refactoringTakashi Iwai1-3/+0
Move the small portion of the common sequence in hda_intel.c and hda_tegra.c into hda_controller.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - Embed bus into controller objectTakashi Iwai1-16/+27
... 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>
2015-04-16ALSA: hda - Migrate more hdac_stream codesTakashi Iwai1-0/+1
... including dsp loader helpers. Lots of codes removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - Migrate hdac_stream into legacy driverTakashi Iwai1-10/+4
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>
2015-04-16ALSA: hda - Pass bus io_ops directly from the top-level driverTakashi Iwai1-11/+14
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>
2015-03-13ALSA: hda - Use shutdown driver ops instead of reboot notifierTakashi Iwai1-3/+13
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>
2015-03-03ALSA: hda - Build PCMs and controls at codec driver probeTakashi Iwai1-10/+0
This makes the code flow easier -- instead of the controller driver calling snd_hda_build_pcms() and snd_hda_build_controls() explicitly, the codec driver itself builds PCMs and controls at probe time. Then the controller driver only needs to call snd_card_register(). Also, this allows us the full bind/unbind control, too. Even when a codec driver is bound later, it automatically registers the new PCM and controls by itself. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-26ALSA: hda - Power down codec automatically at registrationTakashi Iwai1-12/+0
So far, we let the controller driver power down the all codecs at the end of probe. But this can be done better in the codec's dev_register callback. This results in the reduction of duplicated codes in each control driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-26ALSA: hda - Drop power_save value indirection in hda_busTakashi Iwai1-2/+3
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>
2015-02-23ALSA: hda - Move codec suspend/resume to codec driverTakashi Iwai1-6/+0
This patch moves the suspend/resume mechanisms down to each codec driver level, as we have a proper codec driver bound on the bus now. Then we get the asynchronous PM gratis without fiddling much in the driver level. As a soft-landing transition, implement the common suspend/resume pm ops for hda_codec_driver and keep the each codec driver intact. Only the callers of suspend/resume in the controller side (azx_suspend() and azx_resume()) are removed. Another involved place is azx_bus_reset() calling the temporary suspend and resume as a hackish method of bus reset. The HD-audio core provide a helper function snd_hda_bus_reset() instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-19ALSA: hda - Split azx_codec_create() to two phasesTakashi Iwai1-1/+5
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>
2015-02-19ALSA: hda - Drop azx_mixer_create()Takashi Iwai1-1/+1
It's just an indirection, so let the caller directly calling snd_hda_build_controls(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-19ALSA: hda - Fold hda_priv.h into hda_controller.hTakashi Iwai1-1/+0
There is no big reason to keep them separately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-14ALSA: hda/tegra check correct return value from ioremap_resourceEliot Blennerhassett1-2/+2
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+1
Since init_failed flag was moved to struct hda_intel, its access in the commit [4da63c6f: ALSA: hda - Fix broken PM due to incomplete i915 initialization] is also replaced with hda->init_failed appropriately.
2014-07-07ALSA: hda: Fix build warningThierry Reding1-1/+1
The hda_tegra_disable_clocks() function is only used by the suspend and resume code, so it needs to be included in the #ifdef CONFIG_PM_SLEEP block to prevent the following warning: CC sound/pci/hda/hda_tegra.o sound/pci/hda/hda_tegra.c:238:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function] static void hda_tegra_disable_clocks(struct hda_tegra *data) ^ Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01ALSA: hda: Remove unused variableSachin Kamat1-4/+0
'status' is not used in the function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Tested-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01ALSA: hda - Fix build error in hda_tegra.cTakashi Iwai1-1/+0
The "list" field has been omitted from struct azx, but its initialization remained mistakenly in hda_tegra.c, which leads to a compile error: sound/pci/hda/hda_tegra.c: In function 'hda_tegra_create': sound/pci/hda/hda_tegra.c:481:22: error: 'struct azx' has no member named 'list' Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 9a34af4a3327 ('ALSA: hda - Move more PCI-controller-specific stuff from generic code') Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26ALSA: hda - Use common reboot notifierTakashi Iwai1-27/+2
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>
2014-06-26ALSA: hda - Make position_fix as generic callbackTakashi Iwai1-2/+0
... 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>
2014-05-27ALSA: hda: fix tegra buildArnd Bergmann1-0/+4
When CONFIG_PM is disabled, the CONFIG_SND_HDA_POWER_SAVE_DEFAULT symbol does not get defined, which causes a build error for the hda-tegra driver: hda/hda_tegra.c:80:25: error: 'CONFIG_SND_HDA_POWER_SAVE_DEFAULT' undeclared here (not in a function) static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; ^ /git/arm-soc/sound/pci/hda/hda_tegra.c:235:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function] static void hda_tegra_disable_clocks(struct hda_tegra *data) ^ This works around the problem by not referencing that macro when CONFIG_PM is disabled. Instead, we assume that it's disabled unconditionally and cannot be enabled at runtime. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Dylan Reid <dgreid@chromium.org> Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-20ALSA: hda/tegra - Fix MODULE_DEVICE_TABLE typo.Dylan Reid1-1/+1
I missed a rename during the review process. Fix the MODULE_DEVICE_TABLE to match the structure. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-20ALSA: hda - Add driver for Tegra SoC HDADylan Reid1-0/+584
This adds a driver for the HDA block in Tegra SoCs. The HDA bus is used to communicate with the HDMI codec on Tegra124. Most of the code is re-used from the Intel/PCI HDA driver. It brings over only two of the module params, power_save and probe_mask. Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>