summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_tegra.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-14 18:13:13 +0200
committerTakashi Iwai <tiwai@suse.de>2015-04-16 07:36:16 +0200
commit7833c3f85b88561c245a9cb1e42eafec9dca7154 (patch)
tree6cf7c9a21ccd9e474800452fc621f29edd5efa09 /sound/pci/hda/hda_tegra.c
parentALSA: hda - Pass bus io_ops directly from the top-level driver (diff)
downloadlinux-7833c3f85b88561c245a9cb1e42eafec9dca7154.tar.xz
linux-7833c3f85b88561c245a9cb1e42eafec9dca7154.zip
ALSA: hda - Migrate hdac_stream into legacy driver
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>
Diffstat (limited to 'sound/pci/hda/hda_tegra.c')
-rw-r--r--sound/pci/hda/hda_tegra.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index b150cb50961c..e25e0df7f067 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -104,9 +104,9 @@ static int substream_alloc_pages(struct azx *chip,
{
struct azx_dev *azx_dev = get_azx_dev(substream);
- azx_dev->bufsize = 0;
- azx_dev->period_bytes = 0;
- azx_dev->format_val = 0;
+ azx_dev->core.bufsize = 0;
+ azx_dev->core.period_bytes = 0;
+ azx_dev->core.format_val = 0;
return snd_pcm_lib_malloc_pages(substream, size);
}
@@ -290,12 +290,10 @@ static const struct dev_pm_ops hda_tegra_pm = {
*/
static int hda_tegra_dev_free(struct snd_device *device)
{
- int i;
struct azx *chip = device->device_data;
if (chip->initialized) {
- for (i = 0; i < chip->num_streams; i++)
- azx_stream_stop(chip, &chip->azx_dev[i]);
+ azx_stop_all_streams(chip);
azx_stop_chip(chip);
}
@@ -377,10 +375,6 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
chip->capture_index_offset = 0;
chip->playback_index_offset = chip->capture_streams;
chip->num_streams = chip->playback_streams + chip->capture_streams;
- chip->azx_dev = devm_kcalloc(card->dev, chip->num_streams,
- sizeof(*chip->azx_dev), GFP_KERNEL);
- if (!chip->azx_dev)
- return -ENOMEM;
err = azx_alloc_stream_pages(chip);
if (err < 0)