diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-21 09:59:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-21 09:59:02 -0400 |
commit | 79058c4b9ed82415d0690ce6d520252741653486 (patch) | |
tree | b7857545498725b321306dbaa27c80bb35ccc41a | |
parent | 47c08f3107270e5a439bc0106a308f7c48c9621d (diff) | |
parent | de75577c8c3ab733f808c65e1a9d55882efde68e (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
ALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.c
ALSA: hda - Don't spew too many ELD errors
ALSA: usb-audio - Fix missing mixer dB information
ALSA: hda - Add "PCM" volume to vmaster slave list
ALSA: hda - Fix duplicated capture-volume creation for ALC268 models
ALSA: ac97: Add HP Compaq dc5100 SFF(PT003AW) to Headphone Jack Sense whitelist
ALSA: snd_usb_caiaq: track submitted output urbs
-rw-r--r-- | sound/aoa/fabrics/layout.c | 2 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/alc268_quirks.c | 36 | ||||
-rw-r--r-- | sound/pci/hda/hda_eld.c | 31 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 | ||||
-rw-r--r-- | sound/usb/caiaq/audio.c | 31 | ||||
-rw-r--r-- | sound/usb/caiaq/device.h | 1 | ||||
-rw-r--r-- | sound/usb/mixer.c | 3 |
9 files changed, 76 insertions, 39 deletions
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 3fd1a7e24928..552b97afbca5 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c | |||
@@ -1073,10 +1073,10 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) | |||
1073 | sdev->pcmid = -1; | 1073 | sdev->pcmid = -1; |
1074 | list_del(&ldev->list); | 1074 | list_del(&ldev->list); |
1075 | layouts_list_items--; | 1075 | layouts_list_items--; |
1076 | kfree(ldev); | ||
1076 | outnodev: | 1077 | outnodev: |
1077 | of_node_put(sound); | 1078 | of_node_put(sound); |
1078 | layout_device = NULL; | 1079 | layout_device = NULL; |
1079 | kfree(ldev); | ||
1080 | return -ENODEV; | 1080 | return -ENODEV; |
1081 | } | 1081 | } |
1082 | 1082 | ||
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 200c9a1d48b7..a872d0a82976 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1909,6 +1909,7 @@ static unsigned int ad1981_jacks_whitelist[] = { | |||
1909 | 0x103c0944, /* HP nc6220 */ | 1909 | 0x103c0944, /* HP nc6220 */ |
1910 | 0x103c0934, /* HP nc8220 */ | 1910 | 0x103c0934, /* HP nc8220 */ |
1911 | 0x103c006d, /* HP nx9105 */ | 1911 | 0x103c006d, /* HP nx9105 */ |
1912 | 0x103c300d, /* HP Compaq dc5100 SFF(PT003AW) */ | ||
1912 | 0x17340088, /* FSC Scenic-W */ | 1913 | 0x17340088, /* FSC Scenic-W */ |
1913 | 0 /* end */ | 1914 | 0 /* end */ |
1914 | }; | 1915 | }; |
diff --git a/sound/pci/hda/alc268_quirks.c b/sound/pci/hda/alc268_quirks.c index be58bf2f3aec..2e5876ce71fe 100644 --- a/sound/pci/hda/alc268_quirks.c +++ b/sound/pci/hda/alc268_quirks.c | |||
@@ -476,8 +476,8 @@ static const struct snd_pci_quirk alc268_ssid_cfg_tbl[] = { | |||
476 | 476 | ||
477 | static const struct alc_config_preset alc268_presets[] = { | 477 | static const struct alc_config_preset alc268_presets[] = { |
478 | [ALC267_QUANTA_IL1] = { | 478 | [ALC267_QUANTA_IL1] = { |
479 | .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer, | 479 | .mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer }, |
480 | alc268_capture_nosrc_mixer }, | 480 | .cap_mixer = alc268_capture_nosrc_mixer, |
481 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 481 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
482 | alc267_quanta_il1_verbs }, | 482 | alc267_quanta_il1_verbs }, |
483 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 483 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -492,8 +492,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
492 | .init_hook = alc_inithook, | 492 | .init_hook = alc_inithook, |
493 | }, | 493 | }, |
494 | [ALC268_3ST] = { | 494 | [ALC268_3ST] = { |
495 | .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, | 495 | .mixers = { alc268_base_mixer, alc268_beep_mixer }, |
496 | alc268_beep_mixer }, | 496 | .cap_mixer = alc268_capture_alt_mixer, |
497 | .init_verbs = { alc268_base_init_verbs }, | 497 | .init_verbs = { alc268_base_init_verbs }, |
498 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 498 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
499 | .dac_nids = alc268_dac_nids, | 499 | .dac_nids = alc268_dac_nids, |
@@ -507,8 +507,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
507 | .input_mux = &alc268_capture_source, | 507 | .input_mux = &alc268_capture_source, |
508 | }, | 508 | }, |
509 | [ALC268_TOSHIBA] = { | 509 | [ALC268_TOSHIBA] = { |
510 | .mixers = { alc268_toshiba_mixer, alc268_capture_alt_mixer, | 510 | .mixers = { alc268_toshiba_mixer, alc268_beep_mixer }, |
511 | alc268_beep_mixer }, | 511 | .cap_mixer = alc268_capture_alt_mixer, |
512 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 512 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
513 | alc268_toshiba_verbs }, | 513 | alc268_toshiba_verbs }, |
514 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 514 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -525,8 +525,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
525 | .init_hook = alc_inithook, | 525 | .init_hook = alc_inithook, |
526 | }, | 526 | }, |
527 | [ALC268_ACER] = { | 527 | [ALC268_ACER] = { |
528 | .mixers = { alc268_acer_mixer, alc268_capture_alt_mixer, | 528 | .mixers = { alc268_acer_mixer, alc268_beep_mixer }, |
529 | alc268_beep_mixer }, | 529 | .cap_mixer = alc268_capture_alt_mixer, |
530 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 530 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
531 | alc268_acer_verbs }, | 531 | alc268_acer_verbs }, |
532 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 532 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -543,8 +543,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
543 | .init_hook = alc_inithook, | 543 | .init_hook = alc_inithook, |
544 | }, | 544 | }, |
545 | [ALC268_ACER_DMIC] = { | 545 | [ALC268_ACER_DMIC] = { |
546 | .mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer, | 546 | .mixers = { alc268_acer_dmic_mixer, alc268_beep_mixer }, |
547 | alc268_beep_mixer }, | 547 | .cap_mixer = alc268_capture_alt_mixer, |
548 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 548 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
549 | alc268_acer_verbs }, | 549 | alc268_acer_verbs }, |
550 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 550 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -561,9 +561,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
561 | .init_hook = alc_inithook, | 561 | .init_hook = alc_inithook, |
562 | }, | 562 | }, |
563 | [ALC268_ACER_ASPIRE_ONE] = { | 563 | [ALC268_ACER_ASPIRE_ONE] = { |
564 | .mixers = { alc268_acer_aspire_one_mixer, | 564 | .mixers = { alc268_acer_aspire_one_mixer, alc268_beep_mixer}, |
565 | alc268_beep_mixer, | 565 | .cap_mixer = alc268_capture_nosrc_mixer, |
566 | alc268_capture_nosrc_mixer }, | ||
567 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 566 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
568 | alc268_acer_aspire_one_verbs }, | 567 | alc268_acer_aspire_one_verbs }, |
569 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 568 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -579,8 +578,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
579 | .init_hook = alc_inithook, | 578 | .init_hook = alc_inithook, |
580 | }, | 579 | }, |
581 | [ALC268_DELL] = { | 580 | [ALC268_DELL] = { |
582 | .mixers = { alc268_dell_mixer, alc268_beep_mixer, | 581 | .mixers = { alc268_dell_mixer, alc268_beep_mixer}, |
583 | alc268_capture_nosrc_mixer }, | 582 | .cap_mixer = alc268_capture_nosrc_mixer, |
584 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 583 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
585 | alc268_dell_verbs }, | 584 | alc268_dell_verbs }, |
586 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 585 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -596,8 +595,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
596 | .init_hook = alc_inithook, | 595 | .init_hook = alc_inithook, |
597 | }, | 596 | }, |
598 | [ALC268_ZEPTO] = { | 597 | [ALC268_ZEPTO] = { |
599 | .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, | 598 | .mixers = { alc268_base_mixer, alc268_beep_mixer }, |
600 | alc268_beep_mixer }, | 599 | .cap_mixer = alc268_capture_alt_mixer, |
601 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 600 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
602 | alc268_toshiba_verbs }, | 601 | alc268_toshiba_verbs }, |
603 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | 602 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), |
@@ -616,7 +615,8 @@ static const struct alc_config_preset alc268_presets[] = { | |||
616 | }, | 615 | }, |
617 | #ifdef CONFIG_SND_DEBUG | 616 | #ifdef CONFIG_SND_DEBUG |
618 | [ALC268_TEST] = { | 617 | [ALC268_TEST] = { |
619 | .mixers = { alc268_test_mixer, alc268_capture_mixer }, | 618 | .mixers = { alc268_test_mixer }, |
619 | .cap_mixer = alc268_capture_mixer, | ||
620 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | 620 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, |
621 | alc268_volume_init_verbs, | 621 | alc268_volume_init_verbs, |
622 | alc268_beep_init_verbs }, | 622 | alc268_beep_init_verbs }, |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 28ce17d09c33..c34f730f4815 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -144,25 +144,17 @@ static int cea_sampling_frequencies[8] = { | |||
144 | SNDRV_PCM_RATE_192000, /* 7: 192000Hz */ | 144 | SNDRV_PCM_RATE_192000, /* 7: 192000Hz */ |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static unsigned char hdmi_get_eld_byte(struct hda_codec *codec, hda_nid_t nid, | 147 | static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, |
148 | int byte_index) | 148 | int byte_index) |
149 | { | 149 | { |
150 | unsigned int val; | 150 | unsigned int val; |
151 | 151 | ||
152 | val = snd_hda_codec_read(codec, nid, 0, | 152 | val = snd_hda_codec_read(codec, nid, 0, |
153 | AC_VERB_GET_HDMI_ELDD, byte_index); | 153 | AC_VERB_GET_HDMI_ELDD, byte_index); |
154 | |||
155 | #ifdef BE_PARANOID | 154 | #ifdef BE_PARANOID |
156 | printk(KERN_INFO "HDMI: ELD data byte %d: 0x%x\n", byte_index, val); | 155 | printk(KERN_INFO "HDMI: ELD data byte %d: 0x%x\n", byte_index, val); |
157 | #endif | 156 | #endif |
158 | 157 | return val; | |
159 | if ((val & AC_ELDD_ELD_VALID) == 0) { | ||
160 | snd_printd(KERN_INFO "HDMI: invalid ELD data byte %d\n", | ||
161 | byte_index); | ||
162 | val = 0; | ||
163 | } | ||
164 | |||
165 | return val & AC_ELDD_ELD_DATA; | ||
166 | } | 158 | } |
167 | 159 | ||
168 | #define GRAB_BITS(buf, byte, lowbit, bits) \ | 160 | #define GRAB_BITS(buf, byte, lowbit, bits) \ |
@@ -344,11 +336,26 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, | |||
344 | if (!buf) | 336 | if (!buf) |
345 | return -ENOMEM; | 337 | return -ENOMEM; |
346 | 338 | ||
347 | for (i = 0; i < size; i++) | 339 | for (i = 0; i < size; i++) { |
348 | buf[i] = hdmi_get_eld_byte(codec, nid, i); | 340 | unsigned int val = hdmi_get_eld_data(codec, nid, i); |
341 | if (!(val & AC_ELDD_ELD_VALID)) { | ||
342 | if (!i) { | ||
343 | snd_printd(KERN_INFO | ||
344 | "HDMI: invalid ELD data\n"); | ||
345 | ret = -EINVAL; | ||
346 | goto error; | ||
347 | } | ||
348 | snd_printd(KERN_INFO | ||
349 | "HDMI: invalid ELD data byte %d\n", i); | ||
350 | val = 0; | ||
351 | } else | ||
352 | val &= AC_ELDD_ELD_DATA; | ||
353 | buf[i] = val; | ||
354 | } | ||
349 | 355 | ||
350 | ret = hdmi_update_eld(eld, buf, size); | 356 | ret = hdmi_update_eld(eld, buf, size); |
351 | 357 | ||
358 | error: | ||
352 | kfree(buf); | 359 | kfree(buf); |
353 | return ret; | 360 | return ret; |
354 | } | 361 | } |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 47d6ffc9b5b5..d6c93d92b550 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -375,7 +375,7 @@ static int is_ext_mic(struct hda_codec *codec, unsigned int idx) | |||
375 | static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, | 375 | static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, |
376 | unsigned int *idxp) | 376 | unsigned int *idxp) |
377 | { | 377 | { |
378 | int i; | 378 | int i, idx; |
379 | hda_nid_t nid; | 379 | hda_nid_t nid; |
380 | 380 | ||
381 | nid = codec->start_nid; | 381 | nid = codec->start_nid; |
@@ -384,9 +384,11 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, | |||
384 | type = get_wcaps_type(get_wcaps(codec, nid)); | 384 | type = get_wcaps_type(get_wcaps(codec, nid)); |
385 | if (type != AC_WID_AUD_IN) | 385 | if (type != AC_WID_AUD_IN) |
386 | continue; | 386 | continue; |
387 | *idxp = snd_hda_get_conn_index(codec, nid, pin, false); | 387 | idx = snd_hda_get_conn_index(codec, nid, pin, false); |
388 | if (*idxp >= 0) | 388 | if (idx >= 0) { |
389 | *idxp = idx; | ||
389 | return nid; | 390 | return nid; |
391 | } | ||
390 | } | 392 | } |
391 | return 0; | 393 | return 0; |
392 | } | 394 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9a1aa09f47fe..fcb11af9ad24 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1784,6 +1784,7 @@ static const char * const alc_slave_vols[] = { | |||
1784 | "Speaker Playback Volume", | 1784 | "Speaker Playback Volume", |
1785 | "Mono Playback Volume", | 1785 | "Mono Playback Volume", |
1786 | "Line-Out Playback Volume", | 1786 | "Line-Out Playback Volume", |
1787 | "PCM Playback Volume", | ||
1787 | NULL, | 1788 | NULL, |
1788 | }; | 1789 | }; |
1789 | 1790 | ||
@@ -1798,6 +1799,7 @@ static const char * const alc_slave_sws[] = { | |||
1798 | "Mono Playback Switch", | 1799 | "Mono Playback Switch", |
1799 | "IEC958 Playback Switch", | 1800 | "IEC958 Playback Switch", |
1800 | "Line-Out Playback Switch", | 1801 | "Line-Out Playback Switch", |
1802 | "PCM Playback Switch", | ||
1801 | NULL, | 1803 | NULL, |
1802 | }; | 1804 | }; |
1803 | 1805 | ||
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index aa52b3e13bb5..2cf87f5afed4 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -139,8 +139,12 @@ static void stream_stop(struct snd_usb_caiaqdev *dev) | |||
139 | 139 | ||
140 | for (i = 0; i < N_URBS; i++) { | 140 | for (i = 0; i < N_URBS; i++) { |
141 | usb_kill_urb(dev->data_urbs_in[i]); | 141 | usb_kill_urb(dev->data_urbs_in[i]); |
142 | usb_kill_urb(dev->data_urbs_out[i]); | 142 | |
143 | if (test_bit(i, &dev->outurb_active_mask)) | ||
144 | usb_kill_urb(dev->data_urbs_out[i]); | ||
143 | } | 145 | } |
146 | |||
147 | dev->outurb_active_mask = 0; | ||
144 | } | 148 | } |
145 | 149 | ||
146 | static int snd_usb_caiaq_substream_open(struct snd_pcm_substream *substream) | 150 | static int snd_usb_caiaq_substream_open(struct snd_pcm_substream *substream) |
@@ -612,8 +616,8 @@ static void read_completed(struct urb *urb) | |||
612 | { | 616 | { |
613 | struct snd_usb_caiaq_cb_info *info = urb->context; | 617 | struct snd_usb_caiaq_cb_info *info = urb->context; |
614 | struct snd_usb_caiaqdev *dev; | 618 | struct snd_usb_caiaqdev *dev; |
615 | struct urb *out; | 619 | struct urb *out = NULL; |
616 | int frame, len, send_it = 0, outframe = 0; | 620 | int i, frame, len, send_it = 0, outframe = 0; |
617 | size_t offset = 0; | 621 | size_t offset = 0; |
618 | 622 | ||
619 | if (urb->status || !info) | 623 | if (urb->status || !info) |
@@ -624,7 +628,17 @@ static void read_completed(struct urb *urb) | |||
624 | if (!dev->streaming) | 628 | if (!dev->streaming) |
625 | return; | 629 | return; |
626 | 630 | ||
627 | out = dev->data_urbs_out[info->index]; | 631 | /* find an unused output urb that is unused */ |
632 | for (i = 0; i < N_URBS; i++) | ||
633 | if (test_and_set_bit(i, &dev->outurb_active_mask) == 0) { | ||
634 | out = dev->data_urbs_out[i]; | ||
635 | break; | ||
636 | } | ||
637 | |||
638 | if (!out) { | ||
639 | log("Unable to find an output urb to use\n"); | ||
640 | goto requeue; | ||
641 | } | ||
628 | 642 | ||
629 | /* read the recently received packet and send back one which has | 643 | /* read the recently received packet and send back one which has |
630 | * the same layout */ | 644 | * the same layout */ |
@@ -655,8 +669,12 @@ static void read_completed(struct urb *urb) | |||
655 | out->number_of_packets = outframe; | 669 | out->number_of_packets = outframe; |
656 | out->transfer_flags = URB_ISO_ASAP; | 670 | out->transfer_flags = URB_ISO_ASAP; |
657 | usb_submit_urb(out, GFP_ATOMIC); | 671 | usb_submit_urb(out, GFP_ATOMIC); |
672 | } else { | ||
673 | struct snd_usb_caiaq_cb_info *oinfo = out->context; | ||
674 | clear_bit(oinfo->index, &dev->outurb_active_mask); | ||
658 | } | 675 | } |
659 | 676 | ||
677 | requeue: | ||
660 | /* re-submit inbound urb */ | 678 | /* re-submit inbound urb */ |
661 | for (frame = 0; frame < FRAMES_PER_URB; frame++) { | 679 | for (frame = 0; frame < FRAMES_PER_URB; frame++) { |
662 | urb->iso_frame_desc[frame].offset = BYTES_PER_FRAME * frame; | 680 | urb->iso_frame_desc[frame].offset = BYTES_PER_FRAME * frame; |
@@ -678,6 +696,8 @@ static void write_completed(struct urb *urb) | |||
678 | dev->output_running = 1; | 696 | dev->output_running = 1; |
679 | wake_up(&dev->prepare_wait_queue); | 697 | wake_up(&dev->prepare_wait_queue); |
680 | } | 698 | } |
699 | |||
700 | clear_bit(info->index, &dev->outurb_active_mask); | ||
681 | } | 701 | } |
682 | 702 | ||
683 | static struct urb **alloc_urbs(struct snd_usb_caiaqdev *dev, int dir, int *ret) | 703 | static struct urb **alloc_urbs(struct snd_usb_caiaqdev *dev, int dir, int *ret) |
@@ -829,6 +849,9 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev) | |||
829 | if (!dev->data_cb_info) | 849 | if (!dev->data_cb_info) |
830 | return -ENOMEM; | 850 | return -ENOMEM; |
831 | 851 | ||
852 | dev->outurb_active_mask = 0; | ||
853 | BUILD_BUG_ON(N_URBS > (sizeof(dev->outurb_active_mask) * 8)); | ||
854 | |||
832 | for (i = 0; i < N_URBS; i++) { | 855 | for (i = 0; i < N_URBS; i++) { |
833 | dev->data_cb_info[i].dev = dev; | 856 | dev->data_cb_info[i].dev = dev; |
834 | dev->data_cb_info[i].index = i; | 857 | dev->data_cb_info[i].index = i; |
diff --git a/sound/usb/caiaq/device.h b/sound/usb/caiaq/device.h index b2b310194ffa..3f9c6339ae90 100644 --- a/sound/usb/caiaq/device.h +++ b/sound/usb/caiaq/device.h | |||
@@ -96,6 +96,7 @@ struct snd_usb_caiaqdev { | |||
96 | int input_panic, output_panic, warned; | 96 | int input_panic, output_panic, warned; |
97 | char *audio_in_buf, *audio_out_buf; | 97 | char *audio_in_buf, *audio_out_buf; |
98 | unsigned int samplerates, bpp; | 98 | unsigned int samplerates, bpp; |
99 | unsigned long outurb_active_mask; | ||
99 | 100 | ||
100 | struct snd_pcm_substream *sub_playback[MAX_STREAMS]; | 101 | struct snd_pcm_substream *sub_playback[MAX_STREAMS]; |
101 | struct snd_pcm_substream *sub_capture[MAX_STREAMS]; | 102 | struct snd_pcm_substream *sub_capture[MAX_STREAMS]; |
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index c04d7c71ac88..cdd19d7fe500 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -152,6 +152,7 @@ static inline void check_mapped_dB(const struct usbmix_name_map *p, | |||
152 | if (p && p->dB) { | 152 | if (p && p->dB) { |
153 | cval->dBmin = p->dB->min; | 153 | cval->dBmin = p->dB->min; |
154 | cval->dBmax = p->dB->max; | 154 | cval->dBmax = p->dB->max; |
155 | cval->initialized = 1; | ||
155 | } | 156 | } |
156 | } | 157 | } |
157 | 158 | ||
@@ -1092,7 +1093,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc, | |||
1092 | " Switch" : " Volume"); | 1093 | " Switch" : " Volume"); |
1093 | if (control == UAC_FU_VOLUME) { | 1094 | if (control == UAC_FU_VOLUME) { |
1094 | check_mapped_dB(map, cval); | 1095 | check_mapped_dB(map, cval); |
1095 | if (cval->dBmin < cval->dBmax) { | 1096 | if (cval->dBmin < cval->dBmax || !cval->initialized) { |
1096 | kctl->tlv.c = mixer_vol_tlv; | 1097 | kctl->tlv.c = mixer_vol_tlv; |
1097 | kctl->vd[0].access |= | 1098 | kctl->vd[0].access |= |
1098 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | | 1099 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | |