Merge branch 'topic/timer-api' into for-next
authorTakashi Iwai <tiwai@suse.de>
Thu, 5 Oct 2017 13:08:57 +0000 (15:08 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Oct 2017 13:08:57 +0000 (15:08 +0200)
sound/core/hrtimer.c
sound/core/hwdep.c
sound/pci/oxygen/xonar_dg.h
sound/pci/oxygen/xonar_dg_mixer.c
sound/usb/line6/capture.c
sound/usb/line6/capture.h
sound/usb/line6/playback.c
sound/usb/line6/playback.h
sound/usb/line6/podhd.c

index 1ac0c42..5603e49 100644 (file)
@@ -127,7 +127,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
        return 0;
 }
 
-static struct snd_timer_hardware hrtimer_hw = {
+static const struct snd_timer_hardware hrtimer_hw __initconst = {
        .flags =        SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
        .open =         snd_hrtimer_open,
        .close =        snd_hrtimer_close,
index a73baa1..8faae3d 100644 (file)
@@ -228,6 +228,8 @@ static int snd_hwdep_dsp_load(struct snd_hwdep *hw,
        memset(&info, 0, sizeof(info));
        if (copy_from_user(&info, _info, sizeof(info)))
                return -EFAULT;
+       if (info.index >= 32)
+               return -EINVAL;
        /* check whether the dsp was already loaded */
        if (hw->dsp_loaded & (1 << info.index))
                return -EBUSY;
index d461df3..5a07cda 100644 (file)
@@ -51,6 +51,6 @@ void dg_suspend(struct oxygen *chip);
 void dg_resume(struct oxygen *chip);
 void dg_cleanup(struct oxygen *chip);
 
-extern struct oxygen_model model_xonar_dg;
+extern const struct oxygen_model model_xonar_dg;
 
 #endif
index b885dac..d22fbe8 100644 (file)
@@ -449,7 +449,7 @@ static int dg_mixer_init(struct oxygen *chip)
        return 0;
 }
 
-struct oxygen_model model_xonar_dg = {
+const struct oxygen_model model_xonar_dg = {
        .longname = "C-Media Oxygen HD Audio",
        .chip = "CMI8786",
        .init = dg_init,
index 7c81256..947d616 100644 (file)
@@ -248,7 +248,7 @@ static int snd_line6_capture_close(struct snd_pcm_substream *substream)
 }
 
 /* capture operators */
-struct snd_pcm_ops snd_line6_capture_ops = {
+const struct snd_pcm_ops snd_line6_capture_ops = {
        .open = snd_line6_capture_open,
        .close = snd_line6_capture_close,
        .ioctl = snd_pcm_lib_ioctl,
index 890b21b..b67ccc3 100644 (file)
@@ -17,7 +17,7 @@
 #include "driver.h"
 #include "pcm.h"
 
-extern struct snd_pcm_ops snd_line6_capture_ops;
+extern const struct snd_pcm_ops snd_line6_capture_ops;
 
 extern void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf,
                               int fsize);
index 812d181..819e9b2 100644 (file)
@@ -393,7 +393,7 @@ static int snd_line6_playback_close(struct snd_pcm_substream *substream)
 }
 
 /* playback operators */
-struct snd_pcm_ops snd_line6_playback_ops = {
+const struct snd_pcm_ops snd_line6_playback_ops = {
        .open = snd_line6_playback_open,
        .close = snd_line6_playback_close,
        .ioctl = snd_pcm_lib_ioctl,
index 51fce29..d8d3b8a 100644 (file)
@@ -27,7 +27,7 @@
  */
 #define USE_CLEAR_BUFFER_WORKAROUND 1
 
-extern struct snd_pcm_ops snd_line6_playback_ops;
+extern const struct snd_pcm_ops snd_line6_playback_ops;
 
 extern int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm);
 extern int line6_submit_audio_out_all_urbs(struct snd_line6_pcm *line6pcm);
index 956f847..acb2170 100644 (file)
@@ -39,7 +39,8 @@ enum {
        LINE6_PODHD500_1,
        LINE6_PODX3,
        LINE6_PODX3LIVE,
-       LINE6_PODHD500X
+       LINE6_PODHD500X,
+       LINE6_PODHDDESKTOP
 };
 
 struct usb_line6_podhd {
@@ -377,6 +378,7 @@ static const struct usb_device_id podhd_id_table[] = {
        { LINE6_IF_NUM(0x414A, 0), .driver_info = LINE6_PODX3 },
        { LINE6_IF_NUM(0x414B, 0), .driver_info = LINE6_PODX3LIVE },
        { LINE6_IF_NUM(0x4159, 0), .driver_info = LINE6_PODHD500X },
+       { LINE6_IF_NUM(0x4156, 0), .driver_info = LINE6_PODHDDESKTOP },
        {}
 };
 
@@ -463,6 +465,18 @@ static const struct line6_properties podhd_properties_table[] = {
                .ep_audio_r = 0x86,
                .ep_audio_w = 0x02,
        },
+       [LINE6_PODHDDESKTOP] = {
+               .id = "PODHDDESKTOP",
+               .name = "POD HDDESKTOP",
+               .capabilities    = LINE6_CAP_CONTROL
+                       | LINE6_CAP_PCM | LINE6_CAP_HWMON,
+               .altsetting = 1,
+               .ep_ctrl_r = 0x81,
+               .ep_ctrl_w = 0x01,
+               .ctrl_if = 1,
+               .ep_audio_r = 0x86,
+               .ep_audio_w = 0x02,
+       },
 };
 
 /*