[1/1,SRU,X/Z/A] ALSA: usb-audio: Add sample rate quirk for Plantronics C310/C520-M

Message ID 20171020081312.16537-2-kai.heng.feng@canonical.com
State New
Headers show
Series
  • [1/1,SRU,X/Z/A] ALSA: usb-audio: Add sample rate quirk for Plantronics C310/C520-M
Related show

Commit Message

Kai Heng Feng Oct. 20, 2017, 8:13 a.m.
BugLink: https://bugs.launchpad.net/bugs/1708499
BugLink: https://bugs.launchpad.net/bugs/1709282

Like other Plantronics devices, C310 and C520-M do not support sample
rate reading. Add them to the sample rate quirk accordingly.

BugLink: https://bugs.launchpad.net/bugs/1708499
BugLink: https://bugs.launchpad.net/bugs/1709282
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 0dcd020b7abbff238f188d4db8f02389dc849553)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/usb/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marcelo Henrique Cerri Oct. 20, 2017, 12:17 p.m. | #1
Hi, Kai.

The fix looks good.

Is there any reason for having two bugs for the same issue? Is it
possible to mark one as duplicate of the other?

Also it's not necessary to duplicate the BugLink tags at the end of the
commit message.
Kleber Souza Oct. 23, 2017, 10:04 a.m. | #2
On 10/20/17 10:13, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1708499
> BugLink: https://bugs.launchpad.net/bugs/1709282
>

As Marcelo pointed out, as the BugLink's are already on the body of the
original commit, we don't need to duplicate them here, the tools will
find the links even if they are not at the beginning. However, this can
be fixed when applying the patch.

IMO it would also make more sense to have a single BugLink for this
issue, but since both links are already on the upstream commit it's
easier for us to just keep them.

> Like other Plantronics devices, C310 and C520-M do not support sample
> rate reading. Add them to the sample rate quirk accordingly.
> 
> BugLink: https://bugs.launchpad.net/bugs/1708499
> BugLink: https://bugs.launchpad.net/bugs/1709282
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit 0dcd020b7abbff238f188d4db8f02389dc849553)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>  sound/usb/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
> index 5d2a63248b1d..c0b86f77755c 100644
> --- a/sound/usb/quirks.c
> +++ b/sound/usb/quirks.c
> @@ -1138,6 +1138,8 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
>  	case USB_ID(0x047F, 0x02F7): /* Plantronics BT-600 */
>  	case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
>  	case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
> +	case USB_ID(0x047F, 0xC022): /* Plantronics C310 */
> +	case USB_ID(0x047F, 0xC036): /* Plantronics C520-M */
>  	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
>  	case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */
>  	case USB_ID(0x05A3, 0x9420): /* ELP HD USB Camera */
>
Kleber Souza Oct. 30, 2017, 4:50 p.m. | #3
Applied to xenial/master-next, zesty/master-next and artful/master-next
branches. Thanks.

Patch

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 5d2a63248b1d..c0b86f77755c 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1138,6 +1138,8 @@  bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
 	case USB_ID(0x047F, 0x02F7): /* Plantronics BT-600 */
 	case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
 	case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
+	case USB_ID(0x047F, 0xC022): /* Plantronics C310 */
+	case USB_ID(0x047F, 0xC036): /* Plantronics C520-M */
 	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
 	case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */
 	case USB_ID(0x05A3, 0x9420): /* ELP HD USB Camera */