summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-28 23:41:18 (GMT)
committerTakashi Iwai <tiwai@suse.de>2014-03-01 10:21:29 (GMT)
commit749ee287fc937d8026fb459b7574d39745c0cbb9 (patch)
treed8f3737c55e424a2e5ac1f65d60b6b9812e6d480 /sound/pci/hda/hda_intel.c
parentf563bf65d9028c58bb0ecea9c8d40d5a57e64b3f (diff)
downloadlinux-749ee287fc937d8026fb459b7574d39745c0cbb9.tar.xz
ALSA: hda - Add jackpoll_ms to struct azx
Keeping a pointer to the jackpoll_ms array in the chip will allow azx_codec_create to be shared between hda_intel and hda_platform drivers. Also modify get_jackpoll_ms to make the jackpoll_ms member optional, this way a platform driver can leave it out if it's not needed. Signed-off-by: Dylan Reid <dgreid@chromium.org> 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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7cdb4dd..1e7d3f3 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1324,8 +1324,13 @@ static void azx_bus_reset(struct hda_bus *bus)
static int get_jackpoll_interval(struct azx *chip)
{
- int i = jackpoll_ms[chip->dev_index];
+ int i;
unsigned int j;
+
+ if (!chip->jackpoll_ms)
+ return 0;
+
+ i = chip->jackpoll_ms[chip->dev_index];
if (i == 0)
return 0;
if (i < 50 || i > 60000)
@@ -3172,6 +3177,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
chip->driver_type = driver_caps & 0xff;
check_msi(chip);
chip->dev_index = dev;
+ chip->jackpoll_ms = jackpoll_ms;
INIT_WORK(&chip->irq_pending_work, azx_irq_pending_work);
INIT_LIST_HEAD(&chip->pcm_list);
INIT_LIST_HEAD(&chip->list);