diff options
Diffstat (limited to 'sound')
38 files changed, 252 insertions, 99 deletions
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c index e6beb92c6933..b4590df07466 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c | |||
@@ -159,7 +159,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
159 | struct i2sbus_dev *dev; | 159 | struct i2sbus_dev *dev; |
160 | struct device_node *child = NULL, *sound = NULL; | 160 | struct device_node *child = NULL, *sound = NULL; |
161 | struct resource *r; | 161 | struct resource *r; |
162 | int i, layout = 0, rlen; | 162 | int i, layout = 0, rlen, ok = force; |
163 | static const char *rnames[] = { "i2sbus: %s (control)", | 163 | static const char *rnames[] = { "i2sbus: %s (control)", |
164 | "i2sbus: %s (tx)", | 164 | "i2sbus: %s (tx)", |
165 | "i2sbus: %s (rx)" }; | 165 | "i2sbus: %s (rx)" }; |
@@ -192,7 +192,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
192 | layout = *layout_id; | 192 | layout = *layout_id; |
193 | snprintf(dev->sound.modalias, 32, | 193 | snprintf(dev->sound.modalias, 32, |
194 | "sound-layout-%d", layout); | 194 | "sound-layout-%d", layout); |
195 | force = 1; | 195 | ok = 1; |
196 | } | 196 | } |
197 | } | 197 | } |
198 | /* for the time being, until we can handle non-layout-id | 198 | /* for the time being, until we can handle non-layout-id |
@@ -201,7 +201,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
201 | * When there are two i2s busses and only one has a layout-id, | 201 | * When there are two i2s busses and only one has a layout-id, |
202 | * then this depends on the order, but that isn't important | 202 | * then this depends on the order, but that isn't important |
203 | * either as the second one in that case is just a modem. */ | 203 | * either as the second one in that case is just a modem. */ |
204 | if (!force) { | 204 | if (!ok) { |
205 | kfree(dev); | 205 | kfree(dev); |
206 | return -ENODEV; | 206 | return -ENODEV; |
207 | } | 207 | } |
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 1c93eb77cb99..75a0d746fb60 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -194,7 +194,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | |||
194 | goto out; | 194 | goto out; |
195 | 195 | ||
196 | ret = -ENOMEM; | 196 | ret = -ENOMEM; |
197 | rtd = kmalloc(sizeof(*rtd), GFP_KERNEL); | 197 | rtd = kzalloc(sizeof(*rtd), GFP_KERNEL); |
198 | if (!rtd) | 198 | if (!rtd) |
199 | goto out; | 199 | goto out; |
200 | rtd->dma_desc_array = | 200 | rtd->dma_desc_array = |
diff --git a/sound/core/control.c b/sound/core/control.c index 6d71f9a7ccbb..b0bf42691047 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -225,8 +225,13 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, | |||
225 | kctl.id.iface = ncontrol->iface; | 225 | kctl.id.iface = ncontrol->iface; |
226 | kctl.id.device = ncontrol->device; | 226 | kctl.id.device = ncontrol->device; |
227 | kctl.id.subdevice = ncontrol->subdevice; | 227 | kctl.id.subdevice = ncontrol->subdevice; |
228 | if (ncontrol->name) | 228 | if (ncontrol->name) { |
229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); | 229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); |
230 | if (strcmp(ncontrol->name, kctl.id.name) != 0) | ||
231 | snd_printk(KERN_WARNING | ||
232 | "Control name '%s' truncated to '%s'\n", | ||
233 | ncontrol->name, kctl.id.name); | ||
234 | } | ||
230 | kctl.id.index = ncontrol->index; | 235 | kctl.id.index = ncontrol->index; |
231 | kctl.count = ncontrol->count ? ncontrol->count : 1; | 236 | kctl.count = ncontrol->count ? ncontrol->count : 1; |
232 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : | 237 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 1af62b8b86c6..e17836680f49 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2283,7 +2283,7 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
2283 | int idx, err; | 2283 | int idx, err; |
2284 | struct snd_pcm_oss_file *pcm_oss_file; | 2284 | struct snd_pcm_oss_file *pcm_oss_file; |
2285 | struct snd_pcm_substream *substream; | 2285 | struct snd_pcm_substream *substream; |
2286 | unsigned int f_mode = file->f_mode; | 2286 | fmode_t f_mode = file->f_mode; |
2287 | 2287 | ||
2288 | if (rpcm_oss_file) | 2288 | if (rpcm_oss_file) |
2289 | *rpcm_oss_file = NULL; | 2289 | *rpcm_oss_file = NULL; |
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index e341f3f83b6a..1f42e4063118 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c | |||
@@ -34,7 +34,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
34 | chip->thalf = 0; | 34 | chip->thalf = 0; |
35 | if (!atomic_read(&chip->timer_active)) | 35 | if (!atomic_read(&chip->timer_active)) |
36 | return HRTIMER_NORESTART; | 36 | return HRTIMER_NORESTART; |
37 | hrtimer_forward(&chip->timer, chip->timer.expires, | 37 | hrtimer_forward(&chip->timer, hrtimer_get_expires(&chip->timer), |
38 | ktime_set(0, chip->ns_rem)); | 38 | ktime_set(0, chip->ns_rem)); |
39 | return HRTIMER_RESTART; | 39 | return HRTIMER_RESTART; |
40 | } | 40 | } |
@@ -118,7 +118,8 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
118 | chip->ns_rem = PCSP_PERIOD_NS(); | 118 | chip->ns_rem = PCSP_PERIOD_NS(); |
119 | ns = (chip->thalf ? PCSP_CALC_NS(timer_cnt) : chip->ns_rem); | 119 | ns = (chip->thalf ? PCSP_CALC_NS(timer_cnt) : chip->ns_rem); |
120 | chip->ns_rem -= ns; | 120 | chip->ns_rem -= ns; |
121 | hrtimer_forward(&chip->timer, chip->timer.expires, ktime_set(0, ns)); | 121 | hrtimer_forward(&chip->timer, hrtimer_get_expires(&chip->timer), |
122 | ktime_set(0, ns)); | ||
122 | return HRTIMER_RESTART; | 123 | return HRTIMER_RESTART; |
123 | 124 | ||
124 | exit_nr_unlock2: | 125 | exit_nr_unlock2: |
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 23018a7c063a..81e1f443d094 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -93,7 +93,7 @@ static struct au1550_state { | |||
93 | spinlock_t lock; | 93 | spinlock_t lock; |
94 | struct mutex open_mutex; | 94 | struct mutex open_mutex; |
95 | struct mutex sem; | 95 | struct mutex sem; |
96 | mode_t open_mode; | 96 | fmode_t open_mode; |
97 | wait_queue_head_t open_wait; | 97 | wait_queue_head_t open_wait; |
98 | 98 | ||
99 | struct dmabuf { | 99 | struct dmabuf { |
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h index d978b0096564..1cb13fe56ec4 100644 --- a/sound/oss/dmasound/dmasound.h +++ b/sound/oss/dmasound/dmasound.h | |||
@@ -129,7 +129,7 @@ typedef struct { | |||
129 | int (*mixer_ioctl)(u_int, u_long); /* optional */ | 129 | int (*mixer_ioctl)(u_int, u_long); /* optional */ |
130 | int (*write_sq_setup)(void); /* optional */ | 130 | int (*write_sq_setup)(void); /* optional */ |
131 | int (*read_sq_setup)(void); /* optional */ | 131 | int (*read_sq_setup)(void); /* optional */ |
132 | int (*sq_open)(mode_t); /* optional */ | 132 | int (*sq_open)(fmode_t); /* optional */ |
133 | int (*state_info)(char *, size_t); /* optional */ | 133 | int (*state_info)(char *, size_t); /* optional */ |
134 | void (*abort_read)(void); /* optional */ | 134 | void (*abort_read)(void); /* optional */ |
135 | int min_dsp_speed; | 135 | int min_dsp_speed; |
@@ -235,7 +235,7 @@ struct sound_queue { | |||
235 | */ | 235 | */ |
236 | int active; | 236 | int active; |
237 | wait_queue_head_t action_queue, open_queue, sync_queue; | 237 | wait_queue_head_t action_queue, open_queue, sync_queue; |
238 | int open_mode; | 238 | fmode_t open_mode; |
239 | int busy, syncing, xruns, died; | 239 | int busy, syncing, xruns, died; |
240 | }; | 240 | }; |
241 | 241 | ||
diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 285239d64b82..4d45bd63718b 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c | |||
@@ -143,7 +143,7 @@ static int AtaMixerIoctl(u_int cmd, u_long arg); | |||
143 | static int TTMixerIoctl(u_int cmd, u_long arg); | 143 | static int TTMixerIoctl(u_int cmd, u_long arg); |
144 | static int FalconMixerIoctl(u_int cmd, u_long arg); | 144 | static int FalconMixerIoctl(u_int cmd, u_long arg); |
145 | static int AtaWriteSqSetup(void); | 145 | static int AtaWriteSqSetup(void); |
146 | static int AtaSqOpen(mode_t mode); | 146 | static int AtaSqOpen(fmode_t mode); |
147 | static int TTStateInfo(char *buffer, size_t space); | 147 | static int TTStateInfo(char *buffer, size_t space); |
148 | static int FalconStateInfo(char *buffer, size_t space); | 148 | static int FalconStateInfo(char *buffer, size_t space); |
149 | 149 | ||
@@ -1461,7 +1461,7 @@ static int AtaWriteSqSetup(void) | |||
1461 | return 0 ; | 1461 | return 0 ; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | static int AtaSqOpen(mode_t mode) | 1464 | static int AtaSqOpen(fmode_t mode) |
1465 | { | 1465 | { |
1466 | write_sq_ignore_int = 1; | 1466 | write_sq_ignore_int = 1; |
1467 | return 0 ; | 1467 | return 0 ; |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index 95fc5c681755..b8239f3168fb 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -212,7 +212,7 @@ static int irq_installed; | |||
212 | #endif /* MODULE */ | 212 | #endif /* MODULE */ |
213 | 213 | ||
214 | /* control over who can modify resources shared between play/record */ | 214 | /* control over who can modify resources shared between play/record */ |
215 | static mode_t shared_resource_owner; | 215 | static fmode_t shared_resource_owner; |
216 | static int shared_resources_initialised; | 216 | static int shared_resources_initialised; |
217 | 217 | ||
218 | /* | 218 | /* |
@@ -668,7 +668,7 @@ static inline void sq_init_waitqueue(struct sound_queue *sq) | |||
668 | 668 | ||
669 | #if 0 /* blocking open() */ | 669 | #if 0 /* blocking open() */ |
670 | static inline void sq_wake_up(struct sound_queue *sq, struct file *file, | 670 | static inline void sq_wake_up(struct sound_queue *sq, struct file *file, |
671 | mode_t mode) | 671 | fmode_t mode) |
672 | { | 672 | { |
673 | if (file->f_mode & mode) { | 673 | if (file->f_mode & mode) { |
674 | sq->busy = 0; /* CHECK: IS THIS OK??? */ | 674 | sq->busy = 0; /* CHECK: IS THIS OK??? */ |
@@ -677,7 +677,7 @@ static inline void sq_wake_up(struct sound_queue *sq, struct file *file, | |||
677 | } | 677 | } |
678 | #endif | 678 | #endif |
679 | 679 | ||
680 | static int sq_open2(struct sound_queue *sq, struct file *file, mode_t mode, | 680 | static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode, |
681 | int numbufs, int bufsize) | 681 | int numbufs, int bufsize) |
682 | { | 682 | { |
683 | int rc = 0; | 683 | int rc = 0; |
@@ -891,10 +891,10 @@ static int sq_release(struct inode *inode, struct file *file) | |||
891 | is the owner - if we have problems. | 891 | is the owner - if we have problems. |
892 | */ | 892 | */ |
893 | 893 | ||
894 | static int shared_resources_are_mine(mode_t md) | 894 | static int shared_resources_are_mine(fmode_t md) |
895 | { | 895 | { |
896 | if (shared_resource_owner) | 896 | if (shared_resource_owner) |
897 | return (shared_resource_owner & md ) ; | 897 | return (shared_resource_owner & md) != 0; |
898 | else { | 898 | else { |
899 | shared_resource_owner = md ; | 899 | shared_resource_owner = md ; |
900 | return 1 ; | 900 | return 1 ; |
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index eb9bc365530d..c180598f1710 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Initialisation code for Cyrix/NatSemi VSA1 softaudio | 2 | * Initialisation code for Cyrix/NatSemi VSA1 softaudio |
3 | * | 3 | * |
4 | * (C) Copyright 2003 Red Hat Inc <alan@redhat.com> | 4 | * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems. | 6 | * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems. |
7 | * The older version (VSA1) provides fairly good soundblaster emulation | 7 | * The older version (VSA1) provides fairly good soundblaster emulation |
diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h index 61b3955481c5..c8be47ec2b7e 100644 --- a/sound/oss/msnd.h +++ b/sound/oss/msnd.h | |||
@@ -211,7 +211,7 @@ typedef struct multisound_dev { | |||
211 | 211 | ||
212 | /* State variables */ | 212 | /* State variables */ |
213 | enum { msndClassic, msndPinnacle } type; | 213 | enum { msndClassic, msndPinnacle } type; |
214 | mode_t mode; | 214 | fmode_t mode; |
215 | unsigned long flags; | 215 | unsigned long flags; |
216 | #define F_RESETTING 0 | 216 | #define F_RESETTING 0 |
217 | #define F_HAVEDIGITAL 1 | 217 | #define F_HAVEDIGITAL 1 |
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h index 1a00a3210616..55271fbe7f49 100644 --- a/sound/oss/sound_config.h +++ b/sound/oss/sound_config.h | |||
@@ -110,24 +110,16 @@ struct channel_info { | |||
110 | #define OPEN_WRITE PCM_ENABLE_OUTPUT | 110 | #define OPEN_WRITE PCM_ENABLE_OUTPUT |
111 | #define OPEN_READWRITE (OPEN_READ|OPEN_WRITE) | 111 | #define OPEN_READWRITE (OPEN_READ|OPEN_WRITE) |
112 | 112 | ||
113 | #if OPEN_READ == FMODE_READ && OPEN_WRITE == FMODE_WRITE | ||
114 | |||
115 | static inline int translate_mode(struct file *file) | ||
116 | { | ||
117 | return file->f_mode; | ||
118 | } | ||
119 | |||
120 | #else | ||
121 | |||
122 | static inline int translate_mode(struct file *file) | 113 | static inline int translate_mode(struct file *file) |
123 | { | 114 | { |
124 | return ((file->f_mode & FMODE_READ) ? OPEN_READ : 0) | | 115 | if (OPEN_READ == (__force int)FMODE_READ && |
125 | ((file->f_mode & FMODE_WRITE) ? OPEN_WRITE : 0); | 116 | OPEN_WRITE == (__force int)FMODE_WRITE) |
117 | return (__force int)(file->f_mode & (FMODE_READ | FMODE_WRITE)); | ||
118 | else | ||
119 | return ((file->f_mode & FMODE_READ) ? OPEN_READ : 0) | | ||
120 | ((file->f_mode & FMODE_WRITE) ? OPEN_WRITE : 0); | ||
126 | } | 121 | } |
127 | 122 | ||
128 | #endif | ||
129 | |||
130 | |||
131 | #include "sound_calls.h" | 123 | #include "sound_calls.h" |
132 | #include "dev_table.h" | 124 | #include "dev_table.h" |
133 | 125 | ||
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 044453a4ee5b..41562ecde5bb 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
@@ -295,7 +295,7 @@ struct cs4297a_state { | |||
295 | struct mutex open_mutex; | 295 | struct mutex open_mutex; |
296 | struct mutex open_sem_adc; | 296 | struct mutex open_sem_adc; |
297 | struct mutex open_sem_dac; | 297 | struct mutex open_sem_dac; |
298 | mode_t open_mode; | 298 | fmode_t open_mode; |
299 | wait_queue_head_t open_wait; | 299 | wait_queue_head_t open_wait; |
300 | wait_queue_head_t open_wait_adc; | 300 | wait_queue_head_t open_wait_adc; |
301 | wait_queue_head_t open_wait_dac; | 301 | wait_queue_head_t open_wait_dac; |
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index dcbb3f739e61..78b8acc7c3b9 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
@@ -1509,7 +1509,7 @@ typedef struct vwsnd_dev { | |||
1509 | struct mutex open_mutex; | 1509 | struct mutex open_mutex; |
1510 | struct mutex io_mutex; | 1510 | struct mutex io_mutex; |
1511 | struct mutex mix_mutex; | 1511 | struct mutex mix_mutex; |
1512 | mode_t open_mode; | 1512 | fmode_t open_mode; |
1513 | wait_queue_head_t open_wait; | 1513 | wait_queue_head_t open_wait; |
1514 | 1514 | ||
1515 | lithium_t lith; | 1515 | lithium_t lith; |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 6704acbca8c0..bd510eceff1f 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device) | |||
1927 | ac97->dev.bus = &ac97_bus_type; | 1927 | ac97->dev.bus = &ac97_bus_type; |
1928 | ac97->dev.parent = ac97->bus->card->dev; | 1928 | ac97->dev.parent = ac97->bus->card->dev; |
1929 | ac97->dev.release = ac97_device_release; | 1929 | ac97->dev.release = ac97_device_release; |
1930 | snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s", | 1930 | dev_set_name(&ac97->dev, "%d-%d:%s", |
1931 | ac97->bus->card->number, ac97->num, | 1931 | ac97->bus->card->number, ac97->num, |
1932 | snd_ac97_get_short_name(ac97)); | 1932 | snd_ac97_get_short_name(ac97)); |
1933 | if ((err = device_register(&ac97->dev)) < 0) { | 1933 | if ((err = device_register(&ac97->dev)) < 0) { |
1934 | snd_printk(KERN_ERR "Can't register ac97 bus\n"); | 1934 | snd_printk(KERN_ERR "Can't register ac97 bus\n"); |
1935 | ac97->dev.bus = NULL; | 1935 | ac97->dev.bus = NULL; |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 92f3a976ef2e..a7f38e63303f 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card, | |||
932 | goto free_and_ret; | 932 | goto free_and_ret; |
933 | 933 | ||
934 | chip->bar = pci_resource_start(pci, 0); | 934 | chip->bar = pci_resource_start(pci, 0); |
935 | chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0)); | 935 | chip->iobase = pci_ioremap_bar(pci, 0); |
936 | if (chip->iobase == NULL) { | 936 | if (chip->iobase == NULL) { |
937 | printk(KERN_ERR PFX "unable to reserve region.\n"); | 937 | printk(KERN_ERR PFX "unable to reserve region.\n"); |
938 | err = -EBUSY; | 938 | err = -EBUSY; |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 085a52b8c807..226fe8237d31 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1609 | return err; | 1609 | return err; |
1610 | } | 1610 | } |
1611 | chip->addr = pci_resource_start(pci, 0); | 1611 | chip->addr = pci_resource_start(pci, 0); |
1612 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); | 1612 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
1613 | if (chip->remap_addr == NULL) { | 1613 | if (chip->remap_addr == NULL) { |
1614 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 1614 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); |
1615 | snd_atiixp_free(chip); | 1615 | snd_atiixp_free(chip); |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 2f106306c7fe..0e6e5cc1c501 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1252 | return err; | 1252 | return err; |
1253 | } | 1253 | } |
1254 | chip->addr = pci_resource_start(pci, 0); | 1254 | chip->addr = pci_resource_start(pci, 0); |
1255 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); | 1255 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
1256 | if (chip->remap_addr == NULL) { | 1256 | if (chip->remap_addr == NULL) { |
1257 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 1257 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); |
1258 | snd_atiixp_free(chip); | 1258 | snd_atiixp_free(chip); |
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 68368e490074..a36d4d1fd419 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -180,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
180 | if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) | 180 | if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0) |
181 | goto regions_out; | 181 | goto regions_out; |
182 | 182 | ||
183 | chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), | 183 | chip->mmio = pci_ioremap_bar(pci, 0); |
184 | pci_resource_len(pci, 0)); | ||
185 | if (!chip->mmio) { | 184 | if (!chip->mmio) { |
186 | printk(KERN_ERR "MMIO area remap failed.\n"); | 185 | printk(KERN_ERR "MMIO area remap failed.\n"); |
187 | err = -ENOMEM; | 186 | err = -ENOMEM; |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 3aa8d973540a..1aa1c0402540 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -749,8 +749,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, | |||
749 | pci_disable_device(pci); | 749 | pci_disable_device(pci); |
750 | return err; | 750 | return err; |
751 | } | 751 | } |
752 | chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), | 752 | chip->mmio = pci_ioremap_bar(pci, 0); |
753 | pci_resource_len(pci, 0)); | ||
754 | if (!chip->mmio) { | 753 | if (!chip->mmio) { |
755 | snd_printk(KERN_ERR "cannot remap io memory\n"); | 754 | snd_printk(KERN_ERR "cannot remap io memory\n"); |
756 | err = -ENOMEM; | 755 | err = -ENOMEM; |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index ef9308f7c45b..192e7842e181 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card, | |||
1382 | chip->ba0_addr = pci_resource_start(pci, 0); | 1382 | chip->ba0_addr = pci_resource_start(pci, 0); |
1383 | chip->ba1_addr = pci_resource_start(pci, 1); | 1383 | chip->ba1_addr = pci_resource_start(pci, 1); |
1384 | 1384 | ||
1385 | chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); | 1385 | chip->ba0 = pci_ioremap_bar(pci, 0); |
1386 | chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); | 1386 | chip->ba1 = pci_ioremap_bar(pci, 1); |
1387 | if (!chip->ba0 || !chip->ba1) { | 1387 | if (!chip->ba0 || !chip->ba1) { |
1388 | snd_cs4281_free(chip); | 1388 | snd_cs4281_free(chip); |
1389 | return -ENOMEM; | 1389 | return -ENOMEM; |
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c index 7ff8b68e997e..6dea5b5cc774 100644 --- a/sound/pci/cs5530.c +++ b/sound/pci/cs5530.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio | 2 | * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio |
3 | * | 3 | * |
4 | * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net> | 4 | * (C) Copyright 2007 Ash Willis <ashwillis@programmer.net> |
5 | * (C) Copyright 2003 Red Hat Inc <alan@redhat.com> | 5 | * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk> |
6 | * | 6 | * |
7 | * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did | 7 | * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did |
8 | * mess with it a bit. The chip seems to have to have trouble with full duplex | 8 | * mess with it a bit. The chip seems to have to have trouble with full duplex |
@@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card, | |||
132 | } | 132 | } |
133 | chip->pci_base = pci_resource_start(pci, 0); | 133 | chip->pci_base = pci_resource_start(pci, 0); |
134 | 134 | ||
135 | mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0)); | 135 | mem = pci_ioremap_bar(pci, 0); |
136 | if (mem == NULL) { | 136 | if (mem == NULL) { |
137 | kfree(chip); | 137 | kfree(chip); |
138 | pci_disable_device(pci); | 138 | pci_disable_device(pci); |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6447754ae56e..ba1ab737b55f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = { | |||
64 | { 0x14f1, "Conexant" }, | 64 | { 0x14f1, "Conexant" }, |
65 | { 0x17e8, "Chrontel" }, | 65 | { 0x17e8, "Chrontel" }, |
66 | { 0x1854, "LG" }, | 66 | { 0x1854, "LG" }, |
67 | { 0x1aec, "Wolfson Microelectronics" }, | ||
67 | { 0x434d, "C-Media" }, | 68 | { 0x434d, "C-Media" }, |
68 | { 0x8384, "SigmaTel" }, | 69 | { 0x8384, "SigmaTel" }, |
69 | {} /* terminator */ | 70 | {} /* terminator */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9f316c1b2790..35722ec920cb 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/reboot.h> | ||
48 | #include <sound/core.h> | 49 | #include <sound/core.h> |
49 | #include <sound/initval.h> | 50 | #include <sound/initval.h> |
50 | #include "hda_codec.h" | 51 | #include "hda_codec.h" |
@@ -397,6 +398,9 @@ struct azx { | |||
397 | 398 | ||
398 | /* for pending irqs */ | 399 | /* for pending irqs */ |
399 | struct work_struct irq_pending_work; | 400 | struct work_struct irq_pending_work; |
401 | |||
402 | /* reboot notifier (for mysterious hangup problem at power-down) */ | ||
403 | struct notifier_block reboot_notifier; | ||
400 | }; | 404 | }; |
401 | 405 | ||
402 | /* driver types */ | 406 | /* driver types */ |
@@ -1979,12 +1983,36 @@ static int azx_resume(struct pci_dev *pci) | |||
1979 | 1983 | ||
1980 | 1984 | ||
1981 | /* | 1985 | /* |
1986 | * reboot notifier for hang-up problem at power-down | ||
1987 | */ | ||
1988 | static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) | ||
1989 | { | ||
1990 | struct azx *chip = container_of(nb, struct azx, reboot_notifier); | ||
1991 | azx_stop_chip(chip); | ||
1992 | return NOTIFY_OK; | ||
1993 | } | ||
1994 | |||
1995 | static void azx_notifier_register(struct azx *chip) | ||
1996 | { | ||
1997 | chip->reboot_notifier.notifier_call = azx_halt; | ||
1998 | register_reboot_notifier(&chip->reboot_notifier); | ||
1999 | } | ||
2000 | |||
2001 | static void azx_notifier_unregister(struct azx *chip) | ||
2002 | { | ||
2003 | if (chip->reboot_notifier.notifier_call) | ||
2004 | unregister_reboot_notifier(&chip->reboot_notifier); | ||
2005 | } | ||
2006 | |||
2007 | /* | ||
1982 | * destructor | 2008 | * destructor |
1983 | */ | 2009 | */ |
1984 | static int azx_free(struct azx *chip) | 2010 | static int azx_free(struct azx *chip) |
1985 | { | 2011 | { |
1986 | int i; | 2012 | int i; |
1987 | 2013 | ||
2014 | azx_notifier_unregister(chip); | ||
2015 | |||
1988 | if (chip->initialized) { | 2016 | if (chip->initialized) { |
1989 | azx_clear_irq_pending(chip); | 2017 | azx_clear_irq_pending(chip); |
1990 | for (i = 0; i < chip->num_streams; i++) | 2018 | for (i = 0; i < chip->num_streams; i++) |
@@ -2158,7 +2186,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2158 | } | 2186 | } |
2159 | 2187 | ||
2160 | chip->addr = pci_resource_start(pci, 0); | 2188 | chip->addr = pci_resource_start(pci, 0); |
2161 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0)); | 2189 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
2162 | if (chip->remap_addr == NULL) { | 2190 | if (chip->remap_addr == NULL) { |
2163 | snd_printk(KERN_ERR SFX "ioremap error\n"); | 2191 | snd_printk(KERN_ERR SFX "ioremap error\n"); |
2164 | err = -ENXIO; | 2192 | err = -ENXIO; |
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
2348 | pci_set_drvdata(pci, card); | 2376 | pci_set_drvdata(pci, card); |
2349 | chip->running = 1; | 2377 | chip->running = 1; |
2350 | power_down_all_codecs(chip); | 2378 | power_down_all_codecs(chip); |
2379 | azx_notifier_register(chip); | ||
2351 | 2380 | ||
2352 | dev++; | 2381 | dev++; |
2353 | return err; | 2382 | return err; |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2b00c4afdf97..d3fd432cb3ea 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3860 | 3860 | ||
3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | ||
3863 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 3864 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
3864 | {} | 3865 | {} |
3865 | }; | 3866 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e72707cb60a3..4eceab9bd109 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -307,6 +307,13 @@ struct alc_spec { | |||
307 | /* for PLL fix */ | 307 | /* for PLL fix */ |
308 | hda_nid_t pll_nid; | 308 | hda_nid_t pll_nid; |
309 | unsigned int pll_coef_idx, pll_coef_bit; | 309 | unsigned int pll_coef_idx, pll_coef_bit; |
310 | |||
311 | #ifdef SND_HDA_NEEDS_RESUME | ||
312 | #define ALC_MAX_PINS 16 | ||
313 | unsigned int num_pins; | ||
314 | hda_nid_t pin_nids[ALC_MAX_PINS]; | ||
315 | unsigned int pin_cfgs[ALC_MAX_PINS]; | ||
316 | #endif | ||
310 | }; | 317 | }; |
311 | 318 | ||
312 | /* | 319 | /* |
@@ -2778,6 +2785,64 @@ static void alc_free(struct hda_codec *codec) | |||
2778 | codec->spec = NULL; /* to be sure */ | 2785 | codec->spec = NULL; /* to be sure */ |
2779 | } | 2786 | } |
2780 | 2787 | ||
2788 | #ifdef SND_HDA_NEEDS_RESUME | ||
2789 | static void store_pin_configs(struct hda_codec *codec) | ||
2790 | { | ||
2791 | struct alc_spec *spec = codec->spec; | ||
2792 | hda_nid_t nid, end_nid; | ||
2793 | |||
2794 | end_nid = codec->start_nid + codec->num_nodes; | ||
2795 | for (nid = codec->start_nid; nid < end_nid; nid++) { | ||
2796 | unsigned int wid_caps = get_wcaps(codec, nid); | ||
2797 | unsigned int wid_type = | ||
2798 | (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; | ||
2799 | if (wid_type != AC_WID_PIN) | ||
2800 | continue; | ||
2801 | if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids)) | ||
2802 | break; | ||
2803 | spec->pin_nids[spec->num_pins] = nid; | ||
2804 | spec->pin_cfgs[spec->num_pins] = | ||
2805 | snd_hda_codec_read(codec, nid, 0, | ||
2806 | AC_VERB_GET_CONFIG_DEFAULT, 0); | ||
2807 | spec->num_pins++; | ||
2808 | } | ||
2809 | } | ||
2810 | |||
2811 | static void resume_pin_configs(struct hda_codec *codec) | ||
2812 | { | ||
2813 | struct alc_spec *spec = codec->spec; | ||
2814 | int i; | ||
2815 | |||
2816 | for (i = 0; i < spec->num_pins; i++) { | ||
2817 | hda_nid_t pin_nid = spec->pin_nids[i]; | ||
2818 | unsigned int pin_config = spec->pin_cfgs[i]; | ||
2819 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2820 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_0, | ||
2821 | pin_config & 0x000000ff); | ||
2822 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2823 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, | ||
2824 | (pin_config & 0x0000ff00) >> 8); | ||
2825 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2826 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, | ||
2827 | (pin_config & 0x00ff0000) >> 16); | ||
2828 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2829 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, | ||
2830 | pin_config >> 24); | ||
2831 | } | ||
2832 | } | ||
2833 | |||
2834 | static int alc_resume(struct hda_codec *codec) | ||
2835 | { | ||
2836 | resume_pin_configs(codec); | ||
2837 | codec->patch_ops.init(codec); | ||
2838 | snd_hda_codec_resume_amp(codec); | ||
2839 | snd_hda_codec_resume_cache(codec); | ||
2840 | return 0; | ||
2841 | } | ||
2842 | #else | ||
2843 | #define store_pin_configs(codec) | ||
2844 | #endif | ||
2845 | |||
2781 | /* | 2846 | /* |
2782 | */ | 2847 | */ |
2783 | static struct hda_codec_ops alc_patch_ops = { | 2848 | static struct hda_codec_ops alc_patch_ops = { |
@@ -2786,6 +2851,9 @@ static struct hda_codec_ops alc_patch_ops = { | |||
2786 | .init = alc_init, | 2851 | .init = alc_init, |
2787 | .free = alc_free, | 2852 | .free = alc_free, |
2788 | .unsol_event = alc_unsol_event, | 2853 | .unsol_event = alc_unsol_event, |
2854 | #ifdef SND_HDA_NEEDS_RESUME | ||
2855 | .resume = alc_resume, | ||
2856 | #endif | ||
2789 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 2857 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
2790 | .check_power_status = alc_check_power_status, | 2858 | .check_power_status = alc_check_power_status, |
2791 | #endif | 2859 | #endif |
@@ -3832,6 +3900,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
3832 | spec->num_mux_defs = 1; | 3900 | spec->num_mux_defs = 1; |
3833 | spec->input_mux = &spec->private_imux; | 3901 | spec->input_mux = &spec->private_imux; |
3834 | 3902 | ||
3903 | store_pin_configs(codec); | ||
3835 | return 1; | 3904 | return 1; |
3836 | } | 3905 | } |
3837 | 3906 | ||
@@ -4996,7 +5065,7 @@ static struct hda_verb alc260_test_init_verbs[] = { | |||
4996 | */ | 5065 | */ |
4997 | 5066 | ||
4998 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | 5067 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, |
4999 | const char *pfx) | 5068 | const char *pfx, int *vol_bits) |
5000 | { | 5069 | { |
5001 | hda_nid_t nid_vol; | 5070 | hda_nid_t nid_vol; |
5002 | unsigned long vol_val, sw_val; | 5071 | unsigned long vol_val, sw_val; |
@@ -5018,10 +5087,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | |||
5018 | } else | 5087 | } else |
5019 | return 0; /* N/A */ | 5088 | return 0; /* N/A */ |
5020 | 5089 | ||
5021 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); | 5090 | if (!(*vol_bits & (1 << nid_vol))) { |
5022 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); | 5091 | /* first control for the volume widget */ |
5023 | if (err < 0) | 5092 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); |
5024 | return err; | 5093 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); |
5094 | if (err < 0) | ||
5095 | return err; | ||
5096 | *vol_bits |= (1 << nid_vol); | ||
5097 | } | ||
5025 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); | 5098 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); |
5026 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); | 5099 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); |
5027 | if (err < 0) | 5100 | if (err < 0) |
@@ -5035,6 +5108,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5035 | { | 5108 | { |
5036 | hda_nid_t nid; | 5109 | hda_nid_t nid; |
5037 | int err; | 5110 | int err; |
5111 | int vols = 0; | ||
5038 | 5112 | ||
5039 | spec->multiout.num_dacs = 1; | 5113 | spec->multiout.num_dacs = 1; |
5040 | spec->multiout.dac_nids = spec->private_dac_nids; | 5114 | spec->multiout.dac_nids = spec->private_dac_nids; |
@@ -5042,21 +5116,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5042 | 5116 | ||
5043 | nid = cfg->line_out_pins[0]; | 5117 | nid = cfg->line_out_pins[0]; |
5044 | if (nid) { | 5118 | if (nid) { |
5045 | err = alc260_add_playback_controls(spec, nid, "Front"); | 5119 | err = alc260_add_playback_controls(spec, nid, "Front", &vols); |
5046 | if (err < 0) | 5120 | if (err < 0) |
5047 | return err; | 5121 | return err; |
5048 | } | 5122 | } |
5049 | 5123 | ||
5050 | nid = cfg->speaker_pins[0]; | 5124 | nid = cfg->speaker_pins[0]; |
5051 | if (nid) { | 5125 | if (nid) { |
5052 | err = alc260_add_playback_controls(spec, nid, "Speaker"); | 5126 | err = alc260_add_playback_controls(spec, nid, "Speaker", &vols); |
5053 | if (err < 0) | 5127 | if (err < 0) |
5054 | return err; | 5128 | return err; |
5055 | } | 5129 | } |
5056 | 5130 | ||
5057 | nid = cfg->hp_pins[0]; | 5131 | nid = cfg->hp_pins[0]; |
5058 | if (nid) { | 5132 | if (nid) { |
5059 | err = alc260_add_playback_controls(spec, nid, "Headphone"); | 5133 | err = alc260_add_playback_controls(spec, nid, "Headphone", |
5134 | &vols); | ||
5060 | if (err < 0) | 5135 | if (err < 0) |
5061 | return err; | 5136 | return err; |
5062 | } | 5137 | } |
@@ -5244,6 +5319,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec) | |||
5244 | } | 5319 | } |
5245 | spec->num_mixers++; | 5320 | spec->num_mixers++; |
5246 | 5321 | ||
5322 | store_pin_configs(codec); | ||
5247 | return 1; | 5323 | return 1; |
5248 | } | 5324 | } |
5249 | 5325 | ||
@@ -10307,6 +10383,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
10307 | if (err < 0) | 10383 | if (err < 0) |
10308 | return err; | 10384 | return err; |
10309 | 10385 | ||
10386 | store_pin_configs(codec); | ||
10310 | return 1; | 10387 | return 1; |
10311 | } | 10388 | } |
10312 | 10389 | ||
@@ -11441,6 +11518,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec) | |||
11441 | if (err < 0) | 11518 | if (err < 0) |
11442 | return err; | 11519 | return err; |
11443 | 11520 | ||
11521 | store_pin_configs(codec); | ||
11444 | return 1; | 11522 | return 1; |
11445 | } | 11523 | } |
11446 | 11524 | ||
@@ -12224,6 +12302,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
12224 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; | 12302 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; |
12225 | spec->num_mixers++; | 12303 | spec->num_mixers++; |
12226 | 12304 | ||
12305 | store_pin_configs(codec); | ||
12227 | return 1; | 12306 | return 1; |
12228 | } | 12307 | } |
12229 | 12308 | ||
@@ -13310,6 +13389,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec) | |||
13310 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; | 13389 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; |
13311 | spec->num_mixers++; | 13390 | spec->num_mixers++; |
13312 | 13391 | ||
13392 | store_pin_configs(codec); | ||
13313 | return 1; | 13393 | return 1; |
13314 | } | 13394 | } |
13315 | 13395 | ||
@@ -14421,6 +14501,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec) | |||
14421 | if (err < 0) | 14501 | if (err < 0) |
14422 | return err; | 14502 | return err; |
14423 | 14503 | ||
14504 | store_pin_configs(codec); | ||
14424 | return 1; | 14505 | return 1; |
14425 | } | 14506 | } |
14426 | 14507 | ||
@@ -16252,6 +16333,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec) | |||
16252 | 16333 | ||
16253 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; | 16334 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; |
16254 | spec->num_mixers++; | 16335 | spec->num_mixers++; |
16336 | |||
16337 | store_pin_configs(codec); | ||
16255 | return 1; | 16338 | return 1; |
16256 | } | 16339 | } |
16257 | 16340 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index a2ac7205d45d..df9b0bc7f878 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -566,10 +566,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, | |||
566 | nid = codec->slave_dig_outs[smux_idx - 1]; | 566 | nid = codec->slave_dig_outs[smux_idx - 1]; |
567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) | 567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) |
568 | val = AMP_OUT_MUTE; | 568 | val = AMP_OUT_MUTE; |
569 | if (smux_idx == 0) | ||
570 | nid = spec->multiout.dig_out_nid; | ||
571 | else | 569 | else |
572 | nid = codec->slave_dig_outs[smux_idx - 1]; | 570 | val = AMP_OUT_UNMUTE; |
573 | /* un/mute SPDIF out */ | 571 | /* un/mute SPDIF out */ |
574 | snd_hda_codec_write_cache(codec, nid, 0, | 572 | snd_hda_codec_write_cache(codec, nid, 0, |
575 | AC_VERB_SET_AMP_GAIN_MUTE, val); | 573 | AC_VERB_SET_AMP_GAIN_MUTE, val); |
@@ -1282,7 +1280,7 @@ static int stac92xx_build_controls(struct hda_codec *codec) | |||
1282 | return err; | 1280 | return err; |
1283 | spec->multiout.share_spdif = 1; | 1281 | spec->multiout.share_spdif = 1; |
1284 | } | 1282 | } |
1285 | if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) { | 1283 | if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) { |
1286 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); | 1284 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); |
1287 | if (err < 0) | 1285 | if (err < 0) |
1288 | return err; | 1286 | return err; |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 5b442383fcda..58d7cda03de5 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -2688,12 +2688,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
2688 | return err; | 2688 | return err; |
2689 | } | 2689 | } |
2690 | 2690 | ||
2691 | if (ice_has_con_ac97(ice)) | 2691 | if (ice_has_con_ac97(ice)) { |
2692 | err = snd_ice1712_pcm(ice, pcm_dev++, NULL); | 2692 | err = snd_ice1712_pcm(ice, pcm_dev++, NULL); |
2693 | if (err < 0) { | 2693 | if (err < 0) { |
2694 | snd_card_free(card); | 2694 | snd_card_free(card); |
2695 | return err; | 2695 | return err; |
2696 | } | 2696 | } |
2697 | } | ||
2697 | 2698 | ||
2698 | err = snd_ice1712_ac97_mixer(ice); | 2699 | err = snd_ice1712_ac97_mixer(ice); |
2699 | if (err < 0) { | 2700 | if (err < 0) { |
@@ -2715,12 +2716,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, | |||
2715 | } | 2716 | } |
2716 | } | 2717 | } |
2717 | 2718 | ||
2718 | if (ice_has_con_ac97(ice)) | 2719 | if (ice_has_con_ac97(ice)) { |
2719 | err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); | 2720 | err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); |
2720 | if (err < 0) { | 2721 | if (err < 0) { |
2721 | snd_card_free(card); | 2722 | snd_card_free(card); |
2722 | return err; | 2723 | return err; |
2723 | } | 2724 | } |
2725 | } | ||
2724 | 2726 | ||
2725 | if (!c->no_mpu401) { | 2727 | if (!c->no_mpu401) { |
2726 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, | 2728 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index c88d1eace1c4..19d3391e229f 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2702,6 +2702,7 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = { | |||
2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), | 2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), |
2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), | 2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), |
2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), | 2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), |
2705 | SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000), | ||
2705 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), | 2706 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), |
2706 | { } /* terminator */ | 2707 | { } /* terminator */ |
2707 | }; | 2708 | }; |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 2d0dce649a64..ae7601f353a7 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1314,8 +1314,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, | |||
1314 | } | 1314 | } |
1315 | for (i = 0; i < 2; i++) { | 1315 | for (i = 0; i < 2; i++) { |
1316 | mgr->mem[i].phys = pci_resource_start(pci, i); | 1316 | mgr->mem[i].phys = pci_resource_start(pci, i); |
1317 | mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys, | 1317 | mgr->mem[i].virt = pci_ioremap_bar(pci, i); |
1318 | pci_resource_len(pci, i)); | ||
1319 | if (!mgr->mem[i].virt) { | 1318 | if (!mgr->mem[i].virt) { |
1320 | printk(KERN_ERR "unable to remap resource 0x%lx\n", | 1319 | printk(KERN_ERR "unable to remap resource 0x%lx\n", |
1321 | mgr->mem[i].phys); | 1320 | mgr->mem[i].phys); |
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index 827587f08180..e020c160ee44 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c | |||
@@ -70,12 +70,24 @@ static struct sport_param sport_params[2] = { | |||
70 | } | 70 | } |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static u16 sport_req[][7] = { | 73 | /* |
74 | { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | 74 | * Setting the TFS pin selector for SPORT 0 based on whether the selected |
75 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}, | 75 | * port id F or G. If the port is F then no conflict should exist for the |
76 | { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | 76 | * TFS. When Port G is selected and EMAC then there is a conflict between |
77 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}, | 77 | * the PHY interrupt line and TFS. Current settings prevent the conflict |
78 | }; | 78 | * by ignoring the TFS pin when Port G is selected. This allows both |
79 | * ssm2602 using Port G and EMAC concurrently. | ||
80 | */ | ||
81 | #ifdef CONFIG_BF527_SPORT0_PORTF | ||
82 | #define LOCAL_SPORT0_TFS (P_SPORT0_TFS) | ||
83 | #else | ||
84 | #define LOCAL_SPORT0_TFS (0) | ||
85 | #endif | ||
86 | |||
87 | static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
88 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0}, | ||
89 | {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI, | ||
90 | P_SPORT1_RSCLK, P_SPORT1_TFS, 0} }; | ||
79 | 91 | ||
80 | static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | 92 | static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, |
81 | unsigned int fmt) | 93 | unsigned int fmt) |
@@ -98,23 +110,21 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
98 | ret = -EINVAL; | 110 | ret = -EINVAL; |
99 | break; | 111 | break; |
100 | default: | 112 | default: |
113 | printk(KERN_ERR "%s: Unknown DAI format type\n", __func__); | ||
101 | ret = -EINVAL; | 114 | ret = -EINVAL; |
102 | break; | 115 | break; |
103 | } | 116 | } |
104 | 117 | ||
105 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 118 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
106 | case SND_SOC_DAIFMT_CBS_CFS: | ||
107 | ret = -EINVAL; | ||
108 | break; | ||
109 | case SND_SOC_DAIFMT_CBM_CFS: | ||
110 | ret = -EINVAL; | ||
111 | break; | ||
112 | case SND_SOC_DAIFMT_CBM_CFM: | 119 | case SND_SOC_DAIFMT_CBM_CFM: |
113 | break; | 120 | break; |
121 | case SND_SOC_DAIFMT_CBS_CFS: | ||
122 | case SND_SOC_DAIFMT_CBM_CFS: | ||
114 | case SND_SOC_DAIFMT_CBS_CFM: | 123 | case SND_SOC_DAIFMT_CBS_CFM: |
115 | ret = -EINVAL; | 124 | ret = -EINVAL; |
116 | break; | 125 | break; |
117 | default: | 126 | default: |
127 | printk(KERN_ERR "%s: Unknown DAI master type\n", __func__); | ||
118 | ret = -EINVAL; | 128 | ret = -EINVAL; |
119 | break; | 129 | break; |
120 | } | 130 | } |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 05336ed7e493..cff276ee261e 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -863,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
863 | return -EINVAL; | 863 | return -EINVAL; |
864 | } | 864 | } |
865 | 865 | ||
866 | /* interface format */ | 866 | /* |
867 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 867 | * match both interface format and signal polarities since they |
868 | case SND_SOC_DAIFMT_I2S: | 868 | * are fixed |
869 | */ | ||
870 | switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | | ||
871 | SND_SOC_DAIFMT_INV_MASK)) { | ||
872 | case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF): | ||
869 | break; | 873 | break; |
870 | case SND_SOC_DAIFMT_DSP_A: | 874 | case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): |
871 | iface_breg |= (0x01 << 6); | 875 | iface_breg |= (0x01 << 6); |
872 | break; | 876 | break; |
873 | case SND_SOC_DAIFMT_RIGHT_J: | 877 | case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): |
874 | iface_breg |= (0x02 << 6); | 878 | iface_breg |= (0x02 << 6); |
875 | break; | 879 | break; |
876 | case SND_SOC_DAIFMT_LEFT_J: | 880 | case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): |
877 | iface_breg |= (0x03 << 6); | 881 | iface_breg |= (0x03 << 6); |
878 | break; | 882 | break; |
879 | default: | 883 | default: |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index aba402b3c999..945b32ed9884 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0), | |||
140 | 140 | ||
141 | SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0), | 141 | SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0), |
142 | SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0), | 142 | SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0), |
143 | SOC_SINGLE("ALC Decay Time ", AC97_CODEC_CLASS_REV, 4, 15, 0), | 143 | SOC_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0), |
144 | SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0), | 144 | SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0), |
145 | SOC_ENUM("ALC Function", wm9713_enum[6]), | 145 | SOC_ENUM("ALC Function", wm9713_enum[6]), |
146 | SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0), | 146 | SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0), |
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index 86923299bc10..94a02eaa4825 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd) | |||
277 | struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs; | 277 | struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs; |
278 | u16 imr; | 278 | u16 imr; |
279 | u8 psc_cmd; | 279 | u8 psc_cmd; |
280 | long flags; | 280 | unsigned long flags; |
281 | 281 | ||
282 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) | 282 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) |
283 | s = &psc_i2s->capture; | 283 | s = &psc_i2s->capture; |
@@ -699,9 +699,11 @@ static ssize_t psc_i2s_stat_store(struct device *dev, | |||
699 | return count; | 699 | return count; |
700 | } | 700 | } |
701 | 701 | ||
702 | DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); | 702 | static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); |
703 | DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); | 703 | static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, |
704 | DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); | 704 | psc_i2s_stat_store); |
705 | static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, | ||
706 | psc_i2s_stat_store); | ||
705 | 707 | ||
706 | /* --------------------------------------------------------------------- | 708 | /* --------------------------------------------------------------------- |
707 | * OF platform bus binding code: | 709 | * OF platform bus binding code: |
@@ -819,8 +821,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op, | |||
819 | 821 | ||
820 | /* Register the SYSFS files */ | 822 | /* Register the SYSFS files */ |
821 | rc = device_create_file(psc_i2s->dev, &dev_attr_status); | 823 | rc = device_create_file(psc_i2s->dev, &dev_attr_status); |
822 | rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun); | 824 | rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun); |
823 | rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun); | 825 | rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun); |
824 | if (rc) | 826 | if (rc) |
825 | dev_info(psc_i2s->dev, "error creating sysfs files\n"); | 827 | dev_info(psc_i2s->dev, "error creating sysfs files\n"); |
826 | 828 | ||
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 853b33ae3435..8485a8a9d0ff 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -265,7 +265,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
265 | break; | 265 | break; |
266 | case SND_SOC_DAIFMT_DSP_A: | 266 | case SND_SOC_DAIFMT_DSP_A: |
267 | regs->srgr2 |= FPER(wlen * 2 - 1); | 267 | regs->srgr2 |= FPER(wlen * 2 - 1); |
268 | regs->srgr1 |= FWID(0); | 268 | regs->srgr1 |= FWID(wlen * 2 - 2); |
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | 271 | ||
@@ -284,7 +284,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
284 | { | 284 | { |
285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); | 285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); |
286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; | 286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; |
287 | unsigned int temp_fmt = fmt; | ||
288 | 287 | ||
289 | if (mcbsp_data->configured) | 288 | if (mcbsp_data->configured) |
290 | return 0; | 289 | return 0; |
@@ -307,8 +306,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
307 | /* 0-bit data delay */ | 306 | /* 0-bit data delay */ |
308 | regs->rcr2 |= RDATDLY(0); | 307 | regs->rcr2 |= RDATDLY(0); |
309 | regs->xcr2 |= XDATDLY(0); | 308 | regs->xcr2 |= XDATDLY(0); |
310 | /* Invert bit clock and FS polarity configuration for DSP_A */ | ||
311 | temp_fmt ^= SND_SOC_DAIFMT_IB_IF; | ||
312 | break; | 309 | break; |
313 | default: | 310 | default: |
314 | /* Unsupported data format */ | 311 | /* Unsupported data format */ |
@@ -332,7 +329,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
332 | } | 329 | } |
333 | 330 | ||
334 | /* Set bit clock (CLKX/CLKR) and FS polarities */ | 331 | /* Set bit clock (CLKX/CLKR) and FS polarities */ |
335 | switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { | 332 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
336 | case SND_SOC_DAIFMT_NB_NF: | 333 | case SND_SOC_DAIFMT_NB_NF: |
337 | /* | 334 | /* |
338 | * Normal BCLK + FS. | 335 | * Normal BCLK + FS. |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 462e635dfc74..a3adbf06b1e5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | |||
1462 | struct soc_mixer_control *mc = | 1462 | struct soc_mixer_control *mc = |
1463 | (struct soc_mixer_control *)kcontrol->private_value; | 1463 | (struct soc_mixer_control *)kcontrol->private_value; |
1464 | int max = mc->max; | 1464 | int max = mc->max; |
1465 | unsigned int shift = mc->min; | 1465 | unsigned int shift = mc->shift; |
1466 | unsigned int rshift = mc->rshift; | 1466 | unsigned int rshift = mc->rshift; |
1467 | 1467 | ||
1468 | if (max == 1) | 1468 | if (max == 1) |
diff --git a/sound/sound_core.c b/sound/sound_core.c index faef87a9bc3f..a75b289a5d78 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c | |||
@@ -57,7 +57,7 @@ module_exit(cleanup_soundcore); | |||
57 | /* | 57 | /* |
58 | * OSS sound core handling. Breaks out sound functions to submodules | 58 | * OSS sound core handling. Breaks out sound functions to submodules |
59 | * | 59 | * |
60 | * Author: Alan Cox <alan.cox@linux.org> | 60 | * Author: Alan Cox <alan@lxorguk.ukuu.org.uk> |
61 | * | 61 | * |
62 | * Fixes: | 62 | * Fixes: |
63 | * | 63 | * |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 69689e79bf79..92115755d98e 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
@@ -1480,6 +1480,36 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
1480 | } | 1480 | } |
1481 | } | 1481 | } |
1482 | }, | 1482 | }, |
1483 | { | ||
1484 | /* Advanced modes of the Edirol UA-25EX. | ||
1485 | * For the standard mode, UA-25EX has ID 0582:00e7, which | ||
1486 | * offers only 16-bit PCM at 44.1 kHz and no MIDI. | ||
1487 | */ | ||
1488 | USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6), | ||
1489 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
1490 | .vendor_name = "EDIROL", | ||
1491 | .product_name = "UA-25EX", | ||
1492 | .ifnum = QUIRK_ANY_INTERFACE, | ||
1493 | .type = QUIRK_COMPOSITE, | ||
1494 | .data = (const struct snd_usb_audio_quirk[]) { | ||
1495 | { | ||
1496 | .ifnum = 0, | ||
1497 | .type = QUIRK_AUDIO_EDIROL_UAXX | ||
1498 | }, | ||
1499 | { | ||
1500 | .ifnum = 1, | ||
1501 | .type = QUIRK_AUDIO_EDIROL_UAXX | ||
1502 | }, | ||
1503 | { | ||
1504 | .ifnum = 2, | ||
1505 | .type = QUIRK_AUDIO_EDIROL_UAXX | ||
1506 | }, | ||
1507 | { | ||
1508 | .ifnum = -1 | ||
1509 | } | ||
1510 | } | ||
1511 | } | ||
1512 | }, | ||
1483 | 1513 | ||
1484 | /* Guillemot devices */ | 1514 | /* Guillemot devices */ |
1485 | { | 1515 | { |