summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai2018-08-30 07:58:50 +0200
committerTakashi Iwai2018-08-30 08:05:58 +0200
commit3a182c848946584a241b4ae220359888bb2f5936 (patch)
tree66666f675149a0cebb8706b50d72936fb202f466 /sound/pci/hda/hda_intel.c
parentALSA: intel_hdmi: Use the new non-cached allocation (diff)
downloadkernel-qcow2-linux-3a182c848946584a241b4ae220359888bb2f5936.tar.gz
kernel-qcow2-linux-3a182c848946584a241b4ae220359888bb2f5936.tar.xz
kernel-qcow2-linux-3a182c848946584a241b4ae220359888bb2f5936.zip
ALSA: hda - Clean up jackpoll_ms option handling
Currently the jackpoll_ms option value is passed indirectly by referring to an array in chip->jackpoll_ms although each card needs to see only the assigned value. Also, the sanity check is done at each time in get_jackpoll_interval() although basically jackpoll_ms option is a read-only, hence we need to evaluate only once at probe time. This patch is the code simplification about the above points: the jack polling interval is directly set to chip->jackpoll_interval so that it can be simply copied to each codec. No functional change but only code reduction. 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 0a3ce9c60f50..12647de19381 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1676,7 +1676,8 @@ 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;
+ if (jackpoll_ms[dev] >= 50 && jackpoll_ms[dev] <= 60000)
+ chip->jackpoll_interval = msecs_to_jiffies(jackpoll_ms[dev]);
INIT_LIST_HEAD(&chip->pcm_list);
INIT_WORK(&hda->irq_pending_work, azx_irq_pending_work);
INIT_LIST_HEAD(&hda->list);