Commit graph

63 commits

Author SHA1 Message Date
Takashi Iwai
96d2bd6e3c ALSA: hda - Split azx_codec_create() to two phases
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-19 21:41:40 +01:00
Takashi Iwai
b8f28d5364 ALSA: hda - Drop azx_mixer_create()
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-19 21:41:32 +01:00
Takashi Iwai
89a93fea61 ALSA: hda - Fold hda_priv.h into hda_controller.h
There is no big reason to keep them separately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-19 21:41:25 +01:00
Eliot Blennerhassett
93ceaa303b ALSA: hda/tegra check correct return value from ioremap_resource
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-14 08:57:15 +01:00
Takashi Iwai
1618e84aa8 Merge branch 'for-linus' into for-next
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-15 15:28:43 +02:00
Thierry Reding
525549d734 ALSA: hda: Fix build warning
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-07 15:15:10 +02:00
Sachin Kamat
d5471e6722 ALSA: hda: Remove unused variable
'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-01 17:55:25 +02:00
Takashi Iwai
178942b69f ALSA: hda - Fix build error in hda_tegra.c
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: 9a34af4a33 ('ALSA: hda - Move more PCI-controller-specific stuff from generic code')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 14:02:02 +02:00
Takashi Iwai
703c759f38 ALSA: hda - Use common reboot notifier
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-26 18:00:01 +02:00
Takashi Iwai
b6050ef664 ALSA: hda - Make position_fix as generic callback
... 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-06-26 18:00:01 +02:00
Arnd Bergmann
16c2395203 ALSA: hda: fix tegra build
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-27 07:36:18 +02:00
Dylan Reid
f73387cb6b ALSA: hda/tegra - Fix MODULE_DEVICE_TABLE typo.
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-20 20:56:49 +02:00
Dylan Reid
3c320f3f56 ALSA: hda - Add driver for Tegra SoC HDA
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>
2014-05-20 09:38:38 +02:00