diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-01-28 11:08:53 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-01-28 11:08:53 -0500 |
commit | c89362225152fc6f2247f65371bfe3ccced3203b (patch) | |
tree | a4b07e2ab1d6b85771ab4c8eba13c681fd8b076f /sound/pci/hda/hda_intel.c | |
parent | 7b36ea967cc5b5088a57fe225f1f72a3c160058b (diff) |
ALSA: hda - Define max number of PCM devices in hda_codec.h
Define the constant rather in the common header file.
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.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 170126c28abd..12230a2ed4f1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -260,8 +260,6 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
260 | #define AZX_MAX_FRAG 32 | 260 | #define AZX_MAX_FRAG 32 |
261 | /* max buffer size - no h/w limit, you can increase as you like */ | 261 | /* max buffer size - no h/w limit, you can increase as you like */ |
262 | #define AZX_MAX_BUF_SIZE (1024*1024*1024) | 262 | #define AZX_MAX_BUF_SIZE (1024*1024*1024) |
263 | /* max number of PCM devics per card */ | ||
264 | #define AZX_MAX_PCMS 10 | ||
265 | 263 | ||
266 | /* RIRB int mask: overrun[2], response[0] */ | 264 | /* RIRB int mask: overrun[2], response[0] */ |
267 | #define RIRB_INT_RESPONSE 0x01 | 265 | #define RIRB_INT_RESPONSE 0x01 |
@@ -409,7 +407,7 @@ struct azx { | |||
409 | struct azx_dev *azx_dev; | 407 | struct azx_dev *azx_dev; |
410 | 408 | ||
411 | /* PCM */ | 409 | /* PCM */ |
412 | struct snd_pcm *pcm[AZX_MAX_PCMS]; | 410 | struct snd_pcm *pcm[HDA_MAX_PCMS]; |
413 | 411 | ||
414 | /* HD codec */ | 412 | /* HD codec */ |
415 | unsigned short codec_mask; | 413 | unsigned short codec_mask; |
@@ -1336,7 +1334,7 @@ static void azx_bus_reset(struct hda_bus *bus) | |||
1336 | if (chip->initialized) { | 1334 | if (chip->initialized) { |
1337 | int i; | 1335 | int i; |
1338 | 1336 | ||
1339 | for (i = 0; i < AZX_MAX_PCMS; i++) | 1337 | for (i = 0; i < HDA_MAX_PCMS; i++) |
1340 | snd_pcm_suspend_all(chip->pcm[i]); | 1338 | snd_pcm_suspend_all(chip->pcm[i]); |
1341 | snd_hda_suspend(chip->bus); | 1339 | snd_hda_suspend(chip->bus); |
1342 | snd_hda_resume(chip->bus); | 1340 | snd_hda_resume(chip->bus); |
@@ -1966,7 +1964,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec, | |||
1966 | int pcm_dev = cpcm->device; | 1964 | int pcm_dev = cpcm->device; |
1967 | int s, err; | 1965 | int s, err; |
1968 | 1966 | ||
1969 | if (pcm_dev >= AZX_MAX_PCMS) { | 1967 | if (pcm_dev >= HDA_MAX_PCMS) { |
1970 | snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n", | 1968 | snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n", |
1971 | pcm_dev); | 1969 | pcm_dev); |
1972 | return -EINVAL; | 1970 | return -EINVAL; |
@@ -2122,7 +2120,7 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state) | |||
2122 | 2120 | ||
2123 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 2121 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
2124 | azx_clear_irq_pending(chip); | 2122 | azx_clear_irq_pending(chip); |
2125 | for (i = 0; i < AZX_MAX_PCMS; i++) | 2123 | for (i = 0; i < HDA_MAX_PCMS; i++) |
2126 | snd_pcm_suspend_all(chip->pcm[i]); | 2124 | snd_pcm_suspend_all(chip->pcm[i]); |
2127 | if (chip->initialized) | 2125 | if (chip->initialized) |
2128 | snd_hda_suspend(chip->bus); | 2126 | snd_hda_suspend(chip->bus); |