summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-25 07:53:47 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-25 12:12:54 +0100
commit13aeaf68019d297be79c99f828c2a9d6affef06b (patch)
treeb3f2946b2f335fa4f7c13c68e199d980279d1e5b /sound/pci/hda/hda_intel.c
parent2565c89908850337940d1f55dd015f229788de1e (diff)
ALSA: hda - Create own device struct for each codec
As the HD-audio is treated individually in each codec driver, it's more convenient to assign an own struct device to each codec object. Then we'll be able to use dev_err() more easily for each codec, for example. For achieving it, this patch just creates an object "hdaudioCxDy". It belongs to sound class instead of creating a new bus, just for simplicity, at this stage. No pm ops is implemented in the device struct level but currently it's merely a container. The PCM and hwdep devices are now children of this codec device. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 0870f5f3ed1c..459f54da8d6b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2663,6 +2663,8 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
snd_dma_pci_data(chip->pci),
size, MAX_PREALLOC_SIZE);
+ /* link to codec */
+ pcm->dev = &codec->dev;
return 0;
}