diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 23 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 6 | ||||
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 4 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-saif.c | 35 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.c | 66 | ||||
-rw-r--r-- | sound/soc/samsung/s3c-i2s-v2.c | 4 | ||||
-rw-r--r-- | sound/usb/card.c | 22 | ||||
-rw-r--r-- | sound/usb/mixer.c | 1 |
8 files changed, 92 insertions, 69 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index bd8d46cca2b3..cccaf9c7a7bb 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -58,6 +58,7 @@ enum { | |||
58 | CS420X_GPIO_23, | 58 | CS420X_GPIO_23, |
59 | CS420X_MBP101, | 59 | CS420X_MBP101, |
60 | CS420X_MBP81, | 60 | CS420X_MBP81, |
61 | CS420X_MBA42, | ||
61 | CS420X_AUTO, | 62 | CS420X_AUTO, |
62 | /* aliases */ | 63 | /* aliases */ |
63 | CS420X_IMAC27_122 = CS420X_GPIO_23, | 64 | CS420X_IMAC27_122 = CS420X_GPIO_23, |
@@ -346,6 +347,7 @@ static const struct hda_model_fixup cs420x_models[] = { | |||
346 | { .id = CS420X_APPLE, .name = "apple" }, | 347 | { .id = CS420X_APPLE, .name = "apple" }, |
347 | { .id = CS420X_MBP101, .name = "mbp101" }, | 348 | { .id = CS420X_MBP101, .name = "mbp101" }, |
348 | { .id = CS420X_MBP81, .name = "mbp81" }, | 349 | { .id = CS420X_MBP81, .name = "mbp81" }, |
350 | { .id = CS420X_MBA42, .name = "mba42" }, | ||
349 | {} | 351 | {} |
350 | }; | 352 | }; |
351 | 353 | ||
@@ -361,6 +363,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = { | |||
361 | SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), | 363 | SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), |
362 | SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), | 364 | SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), |
363 | SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), | 365 | SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), |
366 | SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42), | ||
364 | SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), | 367 | SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), |
365 | {} /* terminator */ | 368 | {} /* terminator */ |
366 | }; | 369 | }; |
@@ -414,6 +417,20 @@ static const struct hda_pintbl mbp101_pincfgs[] = { | |||
414 | {} /* terminator */ | 417 | {} /* terminator */ |
415 | }; | 418 | }; |
416 | 419 | ||
420 | static const struct hda_pintbl mba42_pincfgs[] = { | ||
421 | { 0x09, 0x012b4030 }, /* HP */ | ||
422 | { 0x0a, 0x400000f0 }, | ||
423 | { 0x0b, 0x90100120 }, /* speaker */ | ||
424 | { 0x0c, 0x400000f0 }, | ||
425 | { 0x0d, 0x90a00110 }, /* mic */ | ||
426 | { 0x0e, 0x400000f0 }, | ||
427 | { 0x0f, 0x400000f0 }, | ||
428 | { 0x10, 0x400000f0 }, | ||
429 | { 0x12, 0x400000f0 }, | ||
430 | { 0x15, 0x400000f0 }, | ||
431 | {} /* terminator */ | ||
432 | }; | ||
433 | |||
417 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, | 434 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, |
418 | const struct hda_fixup *fix, int action) | 435 | const struct hda_fixup *fix, int action) |
419 | { | 436 | { |
@@ -482,6 +499,12 @@ static const struct hda_fixup cs420x_fixups[] = { | |||
482 | .chained = true, | 499 | .chained = true, |
483 | .chain_id = CS420X_GPIO_13, | 500 | .chain_id = CS420X_GPIO_13, |
484 | }, | 501 | }, |
502 | [CS420X_MBA42] = { | ||
503 | .type = HDA_FIXUP_PINS, | ||
504 | .v.pins = mba42_pincfgs, | ||
505 | .chained = true, | ||
506 | .chain_id = CS420X_GPIO_13, | ||
507 | }, | ||
485 | }; | 508 | }; |
486 | 509 | ||
487 | static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid) | 510 | static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid) |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 02e22b4458d2..403010c9e82e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3483,6 +3483,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3483 | SND_PCI_QUIRK(0x1028, 0x05ca, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3483 | SND_PCI_QUIRK(0x1028, 0x05ca, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3484 | SND_PCI_QUIRK(0x1028, 0x05cb, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3484 | SND_PCI_QUIRK(0x1028, 0x05cb, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3485 | SND_PCI_QUIRK(0x1028, 0x05de, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3485 | SND_PCI_QUIRK(0x1028, 0x05de, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3486 | SND_PCI_QUIRK(0x1028, 0x05e0, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | ||
3486 | SND_PCI_QUIRK(0x1028, 0x05e9, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3487 | SND_PCI_QUIRK(0x1028, 0x05e9, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3487 | SND_PCI_QUIRK(0x1028, 0x05ea, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3488 | SND_PCI_QUIRK(0x1028, 0x05ea, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3488 | SND_PCI_QUIRK(0x1028, 0x05eb, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3489 | SND_PCI_QUIRK(0x1028, 0x05eb, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
@@ -3494,6 +3495,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3494 | SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3495 | SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3495 | SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3496 | SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3496 | SND_PCI_QUIRK(0x1028, 0x05f8, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3497 | SND_PCI_QUIRK(0x1028, 0x05f8, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3498 | SND_PCI_QUIRK(0x1028, 0x0606, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
3499 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
3497 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3500 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3498 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 3501 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
3499 | SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), | 3502 | SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), |
@@ -3596,6 +3599,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
3596 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 3599 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
3597 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, | 3600 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, |
3598 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 3601 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
3602 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | ||
3603 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, | ||
3599 | {} | 3604 | {} |
3600 | }; | 3605 | }; |
3601 | 3606 | ||
@@ -4275,6 +4280,7 @@ static const struct hda_model_fixup alc662_fixup_models[] = { | |||
4275 | {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"}, | 4280 | {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"}, |
4276 | {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"}, | 4281 | {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"}, |
4277 | {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 4282 | {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
4283 | {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | ||
4278 | {} | 4284 | {} |
4279 | }; | 4285 | }; |
4280 | 4286 | ||
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 7a8bc1220b2e..3f726e4f88db 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c | |||
@@ -113,13 +113,13 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
113 | ssi_pdev = of_find_device_by_node(ssi_np); | 113 | ssi_pdev = of_find_device_by_node(ssi_np); |
114 | if (!ssi_pdev) { | 114 | if (!ssi_pdev) { |
115 | dev_err(&pdev->dev, "failed to find SSI platform device\n"); | 115 | dev_err(&pdev->dev, "failed to find SSI platform device\n"); |
116 | ret = -EINVAL; | 116 | ret = -EPROBE_DEFER; |
117 | goto fail; | 117 | goto fail; |
118 | } | 118 | } |
119 | codec_dev = of_find_i2c_device_by_node(codec_np); | 119 | codec_dev = of_find_i2c_device_by_node(codec_np); |
120 | if (!codec_dev) { | 120 | if (!codec_dev) { |
121 | dev_err(&pdev->dev, "failed to find codec platform device\n"); | 121 | dev_err(&pdev->dev, "failed to find codec platform device\n"); |
122 | return -EINVAL; | 122 | return -EPROBE_DEFER; |
123 | } | 123 | } |
124 | 124 | ||
125 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); | 125 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 49d870034bc3..54511c5e6a7c 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/clk-provider.h> | ||
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | #include <linux/time.h> | 29 | #include <linux/time.h> |
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
@@ -658,6 +659,33 @@ static irqreturn_t mxs_saif_irq(int irq, void *dev_id) | |||
658 | return IRQ_HANDLED; | 659 | return IRQ_HANDLED; |
659 | } | 660 | } |
660 | 661 | ||
662 | static int mxs_saif_mclk_init(struct platform_device *pdev) | ||
663 | { | ||
664 | struct mxs_saif *saif = platform_get_drvdata(pdev); | ||
665 | struct device_node *np = pdev->dev.of_node; | ||
666 | struct clk *clk; | ||
667 | int ret; | ||
668 | |||
669 | clk = clk_register_divider(&pdev->dev, "mxs_saif_mclk", | ||
670 | __clk_get_name(saif->clk), 0, | ||
671 | saif->base + SAIF_CTRL, | ||
672 | BP_SAIF_CTRL_BITCLK_MULT_RATE, 3, | ||
673 | 0, NULL); | ||
674 | if (IS_ERR(clk)) { | ||
675 | ret = PTR_ERR(clk); | ||
676 | if (ret == -EEXIST) | ||
677 | return 0; | ||
678 | dev_err(&pdev->dev, "failed to register mclk: %d\n", ret); | ||
679 | return PTR_ERR(clk); | ||
680 | } | ||
681 | |||
682 | ret = of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
683 | if (ret) | ||
684 | return ret; | ||
685 | |||
686 | return 0; | ||
687 | } | ||
688 | |||
661 | static int mxs_saif_probe(struct platform_device *pdev) | 689 | static int mxs_saif_probe(struct platform_device *pdev) |
662 | { | 690 | { |
663 | struct device_node *np = pdev->dev.of_node; | 691 | struct device_node *np = pdev->dev.of_node; |
@@ -734,6 +762,13 @@ static int mxs_saif_probe(struct platform_device *pdev) | |||
734 | 762 | ||
735 | platform_set_drvdata(pdev, saif); | 763 | platform_set_drvdata(pdev, saif); |
736 | 764 | ||
765 | /* We only support saif0 being tx and clock master */ | ||
766 | if (saif->id == 0) { | ||
767 | ret = mxs_saif_mclk_init(pdev); | ||
768 | if (ret) | ||
769 | dev_warn(&pdev->dev, "failed to init clocks\n"); | ||
770 | } | ||
771 | |||
737 | ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component, | 772 | ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component, |
738 | &mxs_saif_dai, 1); | 773 | &mxs_saif_dai, 1); |
739 | if (ret) { | 774 | if (ret) { |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 82ebb1a51479..7a1734697434 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -1016,52 +1016,6 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | |||
1016 | return i2s; | 1016 | return i2s; |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | #ifdef CONFIG_OF | ||
1020 | static int samsung_i2s_parse_dt_gpio(struct i2s_dai *i2s) | ||
1021 | { | ||
1022 | struct device *dev = &i2s->pdev->dev; | ||
1023 | int index, gpio, ret; | ||
1024 | |||
1025 | for (index = 0; index < 7; index++) { | ||
1026 | gpio = of_get_gpio(dev->of_node, index); | ||
1027 | if (!gpio_is_valid(gpio)) { | ||
1028 | dev_err(dev, "invalid gpio[%d]: %d\n", index, gpio); | ||
1029 | goto free_gpio; | ||
1030 | } | ||
1031 | |||
1032 | ret = gpio_request(gpio, dev_name(dev)); | ||
1033 | if (ret) { | ||
1034 | dev_err(dev, "gpio [%d] request failed\n", gpio); | ||
1035 | goto free_gpio; | ||
1036 | } | ||
1037 | i2s->gpios[index] = gpio; | ||
1038 | } | ||
1039 | return 0; | ||
1040 | |||
1041 | free_gpio: | ||
1042 | while (--index >= 0) | ||
1043 | gpio_free(i2s->gpios[index]); | ||
1044 | return -EINVAL; | ||
1045 | } | ||
1046 | |||
1047 | static void samsung_i2s_dt_gpio_free(struct i2s_dai *i2s) | ||
1048 | { | ||
1049 | unsigned int index; | ||
1050 | for (index = 0; index < 7; index++) | ||
1051 | gpio_free(i2s->gpios[index]); | ||
1052 | } | ||
1053 | #else | ||
1054 | static int samsung_i2s_parse_dt_gpio(struct i2s_dai *dai) | ||
1055 | { | ||
1056 | return -EINVAL; | ||
1057 | } | ||
1058 | |||
1059 | static void samsung_i2s_dt_gpio_free(struct i2s_dai *dai) | ||
1060 | { | ||
1061 | } | ||
1062 | |||
1063 | #endif | ||
1064 | |||
1065 | static const struct of_device_id exynos_i2s_match[]; | 1019 | static const struct of_device_id exynos_i2s_match[]; |
1066 | 1020 | ||
1067 | static inline int samsung_i2s_get_driver_data(struct platform_device *pdev) | 1021 | static inline int samsung_i2s_get_driver_data(struct platform_device *pdev) |
@@ -1235,18 +1189,10 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1235 | pri_dai->sec_dai = sec_dai; | 1189 | pri_dai->sec_dai = sec_dai; |
1236 | } | 1190 | } |
1237 | 1191 | ||
1238 | if (np) { | 1192 | if (i2s_pdata && i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { |
1239 | if (samsung_i2s_parse_dt_gpio(pri_dai)) { | 1193 | dev_err(&pdev->dev, "Unable to configure gpio\n"); |
1240 | dev_err(&pdev->dev, "Unable to configure gpio\n"); | 1194 | ret = -EINVAL; |
1241 | ret = -EINVAL; | 1195 | goto err; |
1242 | goto err; | ||
1243 | } | ||
1244 | } else { | ||
1245 | if (i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { | ||
1246 | dev_err(&pdev->dev, "Unable to configure gpio\n"); | ||
1247 | ret = -EINVAL; | ||
1248 | goto err; | ||
1249 | } | ||
1250 | } | 1196 | } |
1251 | 1197 | ||
1252 | snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component, | 1198 | snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component, |
@@ -1267,14 +1213,10 @@ static int samsung_i2s_remove(struct platform_device *pdev) | |||
1267 | { | 1213 | { |
1268 | struct i2s_dai *i2s, *other; | 1214 | struct i2s_dai *i2s, *other; |
1269 | struct resource *res; | 1215 | struct resource *res; |
1270 | struct s3c_audio_pdata *i2s_pdata = pdev->dev.platform_data; | ||
1271 | 1216 | ||
1272 | i2s = dev_get_drvdata(&pdev->dev); | 1217 | i2s = dev_get_drvdata(&pdev->dev); |
1273 | other = i2s->pri_dai ? : i2s->sec_dai; | 1218 | other = i2s->pri_dai ? : i2s->sec_dai; |
1274 | 1219 | ||
1275 | if (!i2s_pdata->cfg_gpio && pdev->dev.of_node) | ||
1276 | samsung_i2s_dt_gpio_free(i2s->pri_dai); | ||
1277 | |||
1278 | if (other) { | 1220 | if (other) { |
1279 | other->pri_dai = NULL; | 1221 | other->pri_dai = NULL; |
1280 | other->sec_dai = NULL; | 1222 | other->sec_dai = NULL; |
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index 20e98d1dded2..e5e81b111001 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* sound/soc/samsung/s3c-i2c-v2.c | 1 | /* ALSA Soc Audio Layer - I2S core for newer Samsung SoCs. |
2 | * | ||
3 | * ALSA Soc Audio Layer - I2S core for newer Samsung SoCs. | ||
4 | * | 2 | * |
5 | * Copyright (c) 2006 Wolfson Microelectronics PLC. | 3 | * Copyright (c) 2006 Wolfson Microelectronics PLC. |
6 | * Graeme Gregory graeme.gregory@wolfsonmicro.com | 4 | * Graeme Gregory graeme.gregory@wolfsonmicro.com |
diff --git a/sound/usb/card.c b/sound/usb/card.c index 1a033177b83f..64952e2d3ed1 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -147,14 +147,32 @@ static int snd_usb_create_stream(struct snd_usb_audio *chip, int ctrlif, int int | |||
147 | return -EINVAL; | 147 | return -EINVAL; |
148 | } | 148 | } |
149 | 149 | ||
150 | alts = &iface->altsetting[0]; | ||
151 | altsd = get_iface_desc(alts); | ||
152 | |||
153 | /* | ||
154 | * Android with both accessory and audio interfaces enabled gets the | ||
155 | * interface numbers wrong. | ||
156 | */ | ||
157 | if ((chip->usb_id == USB_ID(0x18d1, 0x2d04) || | ||
158 | chip->usb_id == USB_ID(0x18d1, 0x2d05)) && | ||
159 | interface == 0 && | ||
160 | altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC && | ||
161 | altsd->bInterfaceSubClass == USB_SUBCLASS_VENDOR_SPEC) { | ||
162 | interface = 2; | ||
163 | iface = usb_ifnum_to_if(dev, interface); | ||
164 | if (!iface) | ||
165 | return -EINVAL; | ||
166 | alts = &iface->altsetting[0]; | ||
167 | altsd = get_iface_desc(alts); | ||
168 | } | ||
169 | |||
150 | if (usb_interface_claimed(iface)) { | 170 | if (usb_interface_claimed(iface)) { |
151 | snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n", | 171 | snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n", |
152 | dev->devnum, ctrlif, interface); | 172 | dev->devnum, ctrlif, interface); |
153 | return -EINVAL; | 173 | return -EINVAL; |
154 | } | 174 | } |
155 | 175 | ||
156 | alts = &iface->altsetting[0]; | ||
157 | altsd = get_iface_desc(alts); | ||
158 | if ((altsd->bInterfaceClass == USB_CLASS_AUDIO || | 176 | if ((altsd->bInterfaceClass == USB_CLASS_AUDIO || |
159 | altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC) && | 177 | altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC) && |
160 | altsd->bInterfaceSubClass == USB_SUBCLASS_MIDISTREAMING) { | 178 | altsd->bInterfaceSubClass == USB_SUBCLASS_MIDISTREAMING) { |
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index e5c7f9f20fdd..d5438083fd6a 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -885,6 +885,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, | |||
885 | 885 | ||
886 | case USB_ID(0x046d, 0x0808): | 886 | case USB_ID(0x046d, 0x0808): |
887 | case USB_ID(0x046d, 0x0809): | 887 | case USB_ID(0x046d, 0x0809): |
888 | case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */ | ||
888 | case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ | 889 | case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ |
889 | case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ | 890 | case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ |
890 | case USB_ID(0x046d, 0x0991): | 891 | case USB_ID(0x046d, 0x0991): |