diff options
author | Andreas Mohr <andi@lisas.de> | 2010-12-27 21:17:00 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-02 11:09:18 +0100 |
commit | 9fd8d36caabaf3102f14cf652d5ca012d775aaa8 (patch) | |
tree | cb2e908aebcd4a7ee6a595d3ad5a8fabbb16c394 /sound/pci/azt3328.c | |
parent | 8d9a114e6d4acabf6b23ca8bccf0e486c3bdf85c (diff) | |
download | op-kernel-dev-9fd8d36caabaf3102f14cf652d5ca012d775aaa8.zip op-kernel-dev-9fd8d36caabaf3102f14cf652d5ca012d775aaa8.tar.gz |
ALSA: azt3328: cosmetics: use a helper variable for codec setup
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/azt3328.c')
-rw-r--r-- | sound/pci/azt3328.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 3a9a4a1..0cb5499 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c @@ -2195,6 +2195,7 @@ snd_azf3328_create(struct snd_card *card, }; u8 dma_init; enum snd_azf3328_codec_type codec_type; + struct snd_azf3328_codec *codec_setup; *rchip = NULL; @@ -2232,15 +2233,17 @@ snd_azf3328_create(struct snd_card *card, chip->opl3_io = pci_resource_start(pci, 3); chip->mixer_io = pci_resource_start(pci, 4); - chip->codecs[AZF_CODEC_PLAYBACK].io_base = - chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK; - chip->codecs[AZF_CODEC_PLAYBACK].name = "PLAYBACK"; - chip->codecs[AZF_CODEC_CAPTURE].io_base = - chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE; - chip->codecs[AZF_CODEC_CAPTURE].name = "CAPTURE"; - chip->codecs[AZF_CODEC_I2S_OUT].io_base = - chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT; - chip->codecs[AZF_CODEC_I2S_OUT].name = "I2S_OUT"; + codec_setup = &chip->codecs[AZF_CODEC_PLAYBACK]; + codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK; + codec_setup->name = "PLAYBACK"; + + codec_setup = &chip->codecs[AZF_CODEC_CAPTURE]; + codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE; + codec_setup->name = "CAPTURE"; + + codec_setup = &chip->codecs[AZF_CODEC_I2S_OUT]; + codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT; + codec_setup->name = "I2S_OUT"; if (request_irq(pci->irq, snd_azf3328_interrupt, IRQF_SHARED, card->shortname, chip)) { |