Skip to content

Commit

Permalink
ALSA: azt3328: cosmetics: use a helper variable for codec setup
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Andreas Mohr authored and Takashi Iwai committed Jan 2, 2011
1 parent 8d9a114 commit 9fd8d36
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 9fd8d36

Please sign in to comment.