From 7833c3f85b88561c245a9cb1e42eafec9dca7154 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 14 Apr 2015 18:13:13 +0200 Subject: 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 --- sound/pci/hda/hda_tegra.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'sound/pci/hda/hda_tegra.c') 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) -- cgit v1.2.3-59-g8ed1b