sound updates for 2.6.30-rc2
Subsystems (5)
Linus,
please pull ALSA updates for v2.6.30-rc2 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
containing the following fixes/updates. Most of them are regression fixes and improvements for pulseaudio problems, some are clean-ups with memdup_user() and renames of usb-caiaq driver files.
Thanks!
Takashi
===
Daniel Mack (2):
ALSA: snd-usb-caiaq: clean up header includes
ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes
Eric Miao (1):
ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h
Jaroslav Kysela (6):
[ALSA] hda_intel: fix unexpected ring buffer positions
[ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable [ALSA] intel8x0: do not use zero value from PICB register [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine [ALSA] intel8x0: add one retry to the ac97_clock measurement routine
Justin Mattock (1):
ALSA: add missing definitions(letters) to HD-Audio.txt
Li Zefan (4):
ALSA: sound/core: use memdup_user()
ALSA: sound/isa: use memdup_user()
ALSA: sound/usb: use memdup_user()
ALSA: sound/pci: use memdup_user()
Mark Brown (1):
ASoC: Disable S3C64xx support in Kconfig
Takashi Iwai (4):
ALSA: add private_data to struct snd_jack
ALSA: hda - Avoid call of snd_jack_report at release
ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
ALSA: hda - Fix the cmd cache keys for amp verbs
---
Documentation/sound/alsa/HD-Audio.txt | 4 +-
include/sound/jack.h | 2 +
include/sound/pcm.h | 3 +-
sound/core/control.c | 35 ++++------
sound/core/jack.c | 3 +
sound/core/pcm_compat.c | 11 +--
sound/core/pcm_lib.c | 47 ++++++++++--
sound/core/pcm_native.c | 93 +++++++++---------------
sound/core/seq/seq_compat.c | 9 +--
sound/core/timer.c | 11 +--
sound/isa/sb/sb16_csp.c | 19 +++---
sound/isa/wavefront/wavefront_fx.c | 14 ++---
sound/isa/wavefront/wavefront_synth.c | 11 ++--
sound/pci/emu10k1/emufx.c | 41 ++++-------
sound/pci/hda/hda_codec.c | 6 ++-
sound/pci/hda/hda_intel.c | 39 +++++++----
sound/pci/hda/patch_conexant.c | 21 +++++-
sound/pci/hda/patch_realtek.c | 5 +-
sound/pci/hda/patch_sigmatel.c | 27 ++++++--
sound/pci/intel8x0.c | 91 ++++++++++++++++++------
sound/soc/pxa/magician.c | 2 -
sound/soc/s3c24xx/Kconfig | 6 +-
sound/usb/caiaq/Makefile | 4 +-
sound/usb/caiaq/{caiaq-audio.c => audio.c} | 12 +---
sound/usb/caiaq/{caiaq-audio.h => audio.h} | 0
sound/usb/caiaq/{caiaq-control.c => control.c} | 10 +--
sound/usb/caiaq/{caiaq-control.h => control.h} | 0
sound/usb/caiaq/{caiaq-device.c => device.c} | 23 ++----
sound/usb/caiaq/{caiaq-device.h => device.h} | 0
sound/usb/caiaq/{caiaq-input.c => input.c} | 11 +--
sound/usb/caiaq/{caiaq-input.h => input.h} | 0
sound/usb/caiaq/{caiaq-midi.c => midi.c} | 13 +---
sound/usb/caiaq/{caiaq-midi.h => midi.h} | 0
sound/usb/usx2y/us122l.c | 10 +--
sound/usb/usx2y/usX2Yhwdep.c | 13 ++--
35 files changed, 317 insertions(+), 279 deletions(-)
rename sound/usb/caiaq/{caiaq-audio.c => audio.c} (98%)
rename sound/usb/caiaq/{caiaq-audio.h => audio.h} (100%)
rename sound/usb/caiaq/{caiaq-control.c => control.c} (98%)
rename sound/usb/caiaq/{caiaq-control.h => control.h} (100%)
rename sound/usb/caiaq/{caiaq-device.c => device.c} (98%)
rename sound/usb/caiaq/{caiaq-device.h => device.h} (100%)
rename sound/usb/caiaq/{caiaq-input.c => input.c} (98%)
rename sound/usb/caiaq/{caiaq-input.h => input.h} (100%)
rename sound/usb/caiaq/{caiaq-midi.c => midi.c} (95%)
rename sound/usb/caiaq/{caiaq-midi.h => midi.h} (100%)Documentation/sound/alsa/HD-Audio.txt +2 -2
@@ -169,7 +169,7 @@ PCI SSID look-up. What `model` option values are available depends on the codec chip. Check your codec chip from the codec proc file (see "Codec Proc-File" section below). It will show the vendor/product name of your codec -chip. Then, see Documentation/sound/alsa/HD-Audio-Modelstxt file, +chip. Then, see Documentation/sound/alsa/HD-Audio-Models.txt file, the section of HD-audio driver. You can find a list of codecs and `model` options belonging to each codec. For example, for Realtek ALC262 codec chip, pass `model=ultra` for devices that are compatible
@@ -177,7 +177,7 @@ with Samsung Q1 Ultra. Thus, the first thing you can do for any brand-new, unsupported and non-working HD-audio hardware is to check HD-audio codec and several -different `model` option values. If you have a luck, some of them +different `model` option values. If you have any luck, some of them might suit with your device well. Some codecs such as ALC880 have a special model option `model=test`.
include/sound/jack.h +2 -0
@@ -50,6 +50,8 @@ struct snd_jack {int type;const char *id;char name[100 ]; +void *private_data; +void (*private_free)(struct snd_jack *); };#ifdef CONFIG_SND_JACK
include/sound/pcm.h +2 -1
@@ -268,7 +268,8 @@ struct snd_pcm_runtime {int overrange;snd_pcm_uframes_t avail_max;snd_pcm_uframes_t hw_ptr_base;/* Position at buffer restart */ -snd_pcm_uframes_t hw_ptr_interrupt;/* Position at interrupt time*/ +snd_pcm_uframes_t hw_ptr_interrupt;/* Position at interrupt time */ +unsigned long hw_ptr_jiffies;/* Time when hw_ptr is updated */ /* -- HW params -- */ snd_pcm_access_t access;/* access mode */
sound/core/control.c +13 -22
@@ -723,14 +723,11 @@ static int snd_ctl_elem_read_user(struct snd_card *card, {struct snd_ctl_elem_value *control;int result; - - control =kmalloc (sizeof (*control),GFP_KERNEL ); -if (control ==NULL ) -return -ENOMEM ; -if (copy_from_user (control, _control,sizeof (*control))) { -kfree (control); -return -EFAULT ; - } + + control =memdup_user (_control,sizeof (*control)); +if (IS_ERR (control)) +return PTR_ERR (control); +snd_power_lock (card); result =snd_power_wait (card,SNDRV_CTL_POWER_D0 );if (result >=0 )
@@ -784,13 +781,10 @@ static int snd_ctl_elem_write_user(struct snd_ctl_file *file,struct snd_card *card;int result; - control =kmalloc (sizeof (*control),GFP_KERNEL ); -if (control ==NULL ) -return -ENOMEM ; -if (copy_from_user (control, _control,sizeof (*control))) { -kfree (control); -return -EFAULT ; - } + control =memdup_user (_control,sizeof (*control)); +if (IS_ERR (control)) +return PTR_ERR (control); + card = file->card;snd_power_lock (card); result =snd_power_wait (card,SNDRV_CTL_POWER_D0 );
@@ -916,13 +910,10 @@ static int snd_ctl_elem_user_tlv(struct snd_kcontrol *kcontrol,if (op_flag >0 ) {if (size >1024 *128 )/* sane value */ return -EINVAL ; - new_data =kmalloc (size,GFP_KERNEL ); -if (new_data ==NULL ) -return -ENOMEM ; -if (copy_from_user (new_data, tlv, size)) { -kfree (new_data); -return -EFAULT ; - } + + new_data =memdup_user (tlv, size); +if (IS_ERR (new_data)) +return PTR_ERR (new_data); change = ue->tlv_data_size != size;if (!change) change =memcmp (ue->tlv_data, new_data, size);
sound/core/jack.c +3 -0
@@ -35,6 +35,9 @@ static int snd_jack_dev_free(struct snd_device *device) {struct snd_jack *jack = device->device_data; +if (jack->private_free) + jack->private_free (jack); +/* If the input device is registered with the input subsystem * then we need to use a different deallocator. */ if (jack->registered)
sound/core/pcm_compat.c +4 -7
@@ -232,14 +232,11 @@ static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream,if (! (runtime = substream->runtime))return -ENOTTY ; - data =kmalloc (sizeof (*data),GFP_KERNEL ); -if (data ==NULL ) -return -ENOMEM ;/* only fifo_size is different, so just copy all */ -if (copy_from_user (data, data32,sizeof (*data32))) { - err = -EFAULT ; - goto error; - } + data =memdup_user (data32,sizeof (*data32)); +if (IS_ERR (data)) +return PTR_ERR (data); +if (refine) err =snd_pcm_hw_refine (substream, data);else
sound/core/pcm_lib.c +39 -8
105 lines not on this page · raw message
sound/core/pcm_native.c +35 -58
156 lines not on this page · raw message
sound/core/seq/seq_compat.c +4 -5
@@ -48,12 +48,11 @@ static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsignedstruct snd_seq_port_info *data;mm_segment_t fs; - data =kmalloc (sizeof (*data),GFP_KERNEL ); -if (! data) -return -ENOMEM ; + data =memdup_user (data32,sizeof (*data32)); +if (IS_ERR (data)) +return PTR_ERR (data); -if (copy_from_user (data, data32,sizeof (*data32)) || -get_user (data->flags, &data32->flags) || +if (get_user (data->flags, &data32->flags) ||get_user (data->time_queue, &data32->time_queue)) goto error; data->kernel =NULL ;
sound/core/timer.c +4 -7
@@ -1395,13 +1395,10 @@ static int snd_timer_user_ginfo(struct file *file,struct list_head *p;int err =0 ; - ginfo =kmalloc (sizeof (*ginfo),GFP_KERNEL ); -if (! ginfo) -return -ENOMEM ; -if (copy_from_user (ginfo, _ginfo,sizeof (*ginfo))) { -kfree (ginfo); -return -EFAULT ; - } + ginfo =memdup_user (_ginfo,sizeof (*ginfo)); +if (IS_ERR (ginfo)) +return PTR_ERR (ginfo); + tid = ginfo->tid;memset (ginfo,0 ,sizeof (*ginfo)); ginfo->tid = tid;
sound/isa/sb/sb16_csp.c +10 -9
@@ -684,15 +684,16 @@ static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, intstatic int snd_sb_csp_load_user (struct snd_sb_csp * p,const unsigned char __user *buf,int size,int load_flags) { -int err = -ENOMEM ; -unsigned char *kbuf =kmalloc (size,GFP_KERNEL ); -if (kbuf) { -if (copy_from_user (kbuf, buf, size)) - err = -EFAULT ; -else - err =snd_sb_csp_load (p, kbuf, size, load_flags); -kfree (kbuf); - } +int err; +unsigned char *kbuf; + + kbuf =memdup_user (buf, size); +if (IS_ERR (kbuf)) +return PTR_ERR (kbuf); + + err =snd_sb_csp_load (p, kbuf, size, load_flags); + +kfree (kbuf);return err; }
sound/isa/wavefront/wavefront_fx.c +5 -9
@@ -202,15 +202,11 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file, "> 512 bytes to FX\n");return -EIO ; } - page_data =kmalloc (r.data[2 ] *sizeof (short ),GFP_KERNEL ); -if (!page_data) -return -ENOMEM ; -if (copy_from_user (page_data, - (unsigned char __user *) r.data[3 ], - r.data[2 ] *sizeof (short ))) { -kfree (page_data); -return -EFAULT ; - } + page_data =memdup_user ((unsigned char __user *) + r.data[3 ], + r.data[2 ] *sizeof (short )); +if (IS_ERR (page_data)) +return PTR_ERR (page_data); pd = page_data; }
sound/isa/wavefront/wavefront_synth.c +5 -6
@@ -1664,12 +1664,11 @@ snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file,break ;case WFCTL_WFCMD : - wc =kmalloc (sizeof (*wc),GFP_KERNEL ); -if (! wc) -return -ENOMEM ; -if (copy_from_user (wc, argp,sizeof (*wc))) - err = -EFAULT ; -else if (wavefront_synth_control (acard, wc) <0 ) + wc =memdup_user (argp,sizeof (*wc)); +if (IS_ERR (wc)) +return PTR_ERR (wc); + +if (wavefront_synth_control (acard, wc) <0 ) err = -EIO ;else if (copy_to_user (argp, wc,sizeof (*wc))) err = -EFAULT ;
sound/pci/emu10k1/emufx.c +13 -28
61 lines not on this page · raw message
sound/pci/hda/hda_codec.c +5 -1
@@ -2250,7 +2250,11 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid, err = bus->ops.command (bus, res);if (!err) {struct hda_cache_head *c; -u32 key =build_cmd_cache_key (nid, verb); +u32 key; +/* parm may contain the verb stuff for get/set amp */ + verb = verb | (parm >>8 ); + parm &=0xff ; + key =build_cmd_cache_key (nid, verb); c =get_alloc_hash (&codec->cmd_cache, key);if (c) c->val = parm;
sound/pci/hda/hda_intel.c +25 -14
@@ -312,6 +312,9 @@ struct azx_dev {unsigned int period_bytes;/* size of the period in bytes */ unsigned int frags;/* number for period in the play buffer */ unsigned int fifo_size;/* FIFO size */ + unsigned int start_flag: 1; /* stream full start flag */ +unsigned long start_jiffies;/* start + minimum jiffies */ +unsigned long min_jiffies;/* minimum jiffies before position is valid */ void __iomem *sd_addr;/* stream descriptor pointer */
@@ -330,7 +333,6 @@ struct azx_dev { unsigned int opened :1; unsigned int running :1; unsigned int irq_pending :1; - unsigned int irq_ignore :1;/* * For VIA: * A flag to ensure DMA position is 0
@@ -975,7 +977,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)struct azx *chip = dev_id;struct azx_dev *azx_dev;u32 status; -int i; +int i, ok;spin_lock (&chip->reg_lock);
@@ -991,18 +993,14 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)azx_sd_writeb (azx_dev,SD_STS ,SD_INT_MASK );if (!azx_dev->substream || !azx_dev->running)continue ; -/* ignore the first dummy IRQ (due to pos_adj) */ -if (azx_dev->irq_ignore) { - azx_dev->irq_ignore =0 ; -continue ; - }/* check whether this IRQ is really acceptable */ -if (azx_position_ok (chip, azx_dev)) { + ok =azx_position_ok (chip, azx_dev); +if (ok ==1 ) { azx_dev->irq_pending =0 ;spin_unlock (&chip->reg_lock);snd_pcm_period_elapsed (azx_dev->substream);spin_lock (&chip->reg_lock); - }else if (chip->bus && chip->bus->workq) { + }else if (ok ==0 && chip->bus && chip->bus->workq) {/* bogus IRQ, process it later */ azx_dev->irq_pending =1 ; queue_work(chip->bus->workq,
@@ -1088,7 +1086,6 @@ static int azx_setup_periods(struct azx *chip, bdl = (u32 *)azx_dev->bdl.area; ofs =0 ; azx_dev->frags =0 ; - azx_dev->irq_ignore =0 ; pos_adj = bdl_pos_adj[chip->dev_index];if (pos_adj >0 ) {struct snd_pcm_runtime *runtime = substream->runtime;
@@ -1109,7 +1106,6 @@ static int azx_setup_periods(struct azx *chip, &bdl, ofs, pos_adj, 1);if (ofs <0 ) goto error; - azx_dev->irq_ignore =1 ; } }else pos_adj =0 ;
@@ -1155,6 +1151,9 @@ static void azx_stream_reset(struct azx *chip, struct azx_dev *azx_dev)while (((val =azx_sd_readb (azx_dev,SD_CTL )) &SD_CTL_STREAM_RESET ) && --timeout) ; + +/* reset first position - may not be synced with hw at this time */ + *azx_dev->posbuf =0 ; }/*
@@ -1409,7 +1408,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)snd_pcm_set_sync (substream);mutex_unlock (&chip->open_mutex); -azx_stream_reset (chip, azx_dev);return 0 ; }
@@ -1474,6 +1472,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)unsigned int bufsize, period_bytes, format_val;int err; +azx_stream_reset (chip, azx_dev); format_val = snd_hda_calc_stream_format(runtime->rate, runtime->channels, runtime->format,
@@ -1502,6 +1501,8 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)return err; } + azx_dev->min_jiffies = (runtime->period_size *HZ ) / + (runtime->rate *2 );azx_setup_controller (chip, azx_dev);if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) azx_dev->fifo_size =azx_sd_readw (azx_dev,SD_FIFOSIZE ) +1 ;
@@ -1518,13 +1519,14 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)struct azx *chip = apcm->chip;struct azx_dev *azx_dev;struct snd_pcm_substream *s; -int start, nsync =0 , sbits =0 ; +int rstart =0 , start, nsync =0 , sbits =0 ;int nwait, timeout;switch (cmd) { +case SNDRV_PCM_TRIGGER_START : + rstart =1 ;case SNDRV_PCM_TRIGGER_PAUSE_RELEASE :case SNDRV_PCM_TRIGGER_RESUME : -case SNDRV_PCM_TRIGGER_START : start =1 ;break ;case SNDRV_PCM_TRIGGER_PAUSE_PUSH :
@@ -1554,6 +1556,10 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)if (s->pcm->card != substream->pcm->card)continue ; azx_dev =get_azx_dev (s); +if (rstart) { + azx_dev->start_flag =1 ; + azx_dev->start_jiffies = jiffies + azx_dev->min_jiffies; + }if (start)azx_stream_start (chip, azx_dev);else
@@ -1703,6 +1709,11 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev) {unsigned int pos; +if (azx_dev->start_flag && +time_before_eq (jiffies, azx_dev->start_jiffies)) +return -1 ;/* bogus (too early) interrupt */ + azx_dev->start_flag =0 ; + pos =azx_get_position (chip, azx_dev);if (chip->position_fix ==POS_FIX_AUTO ) {if (!pos) {
sound/pci/hda/patch_conexant.c +18 -3
@@ -350,12 +350,20 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, }#ifdef CONFIG_SND_JACK +static void conexant_free_jack_priv (struct snd_jack *jack) +{ +struct conexant_jack *jacks = jack->private_data; + jacks->nid =0 ; + jacks->jack =NULL ; +} +static int conexant_add_jack (struct hda_codec *codec,hda_nid_t nid,int type) {struct conexant_spec *spec;struct conexant_jack *jack;const char *name; +int err; spec = codec->spec;snd_array_init (&spec->jacks,sizeof (*jack),32 );
@@ -368,7 +376,12 @@ static int conexant_add_jack(struct hda_codec *codec, jack->nid = nid; jack->type = type; -return snd_jack_new (codec->bus->card, name, type, &jack->jack); + err =snd_jack_new (codec->bus->card, name, type, &jack->jack); +if (err <0 ) +return err; + jack->jack->private_data = jack; + jack->jack->private_free = conexant_free_jack_priv; +return 0 ; }static void conexant_report_jack (struct hda_codec *codec,hda_nid_t nid)
@@ -455,8 +468,10 @@ static void conexant_free(struct hda_codec *codec)if (spec->jacks.list) {struct conexant_jack *jacks = spec->jacks.list;int i; -for (i =0 ; i < spec->jacks.used; i++) -snd_device_free (codec->bus->card, &jacks[i].jack); +for (i =0 ; i < spec->jacks.used; i++, jacks++) { +if (jacks->jack) +snd_device_free (codec->bus->card, jacks->jack); + }snd_array_free (&spec->jacks); }#endif
sound/pci/hda/patch_realtek.c +2 -3
@@ -8742,10 +8742,9 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {SND_PCI_QUIRK_VENDOR (0x1558 ,"Clevo laptop" ,ALC883_LAPTOP_EAPD ),SND_PCI_QUIRK (0x15d9 ,0x8780 ,"Supermicro PDSBA" , ALC883_3ST_6ch),SND_PCI_QUIRK (0x161f ,0x2054 ,"Medion laptop" ,ALC883_MEDION ), -SND_PCI_QUIRK (0x1734 ,0x1107 ,"FSC AMILO Xi2550" , +SND_PCI_QUIRK_MASK (0x1734 ,0xfff0 ,0x1100 ,"FSC AMILO Xi/Pi25xx" ,ALC883_FUJITSU_PI2515 ), -SND_PCI_QUIRK (0x1734 ,0x1108 ,"Fujitsu AMILO Pi2515" ,ALC883_FUJITSU_PI2515 ), -SND_PCI_QUIRK (0x1734 ,0x113d ,"Fujitsu AMILO Xa3530" , +SND_PCI_QUIRK_MASK (0x1734 ,0xfff0 ,0x1130 ,"Fujitsu AMILO Xa35xx" ,ALC888_FUJITSU_XA3530 ),SND_PCI_QUIRK (0x17aa ,0x101e ,"Lenovo 101e" , ALC883_LENOVO_101E_2ch), SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763),
sound/pci/hda/patch_sigmatel.c +22 -5
@@ -3851,6 +3851,15 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ } +#ifdef CONFIG_SND_JACK +static void stac92xx_free_jack_priv (struct snd_jack *jack) +{ +struct sigmatel_jack *jacks = jack->private_data; + jacks->nid =0 ; + jacks->jack =NULL ; +} +#endif +static int stac92xx_add_jack (struct hda_codec *codec,hda_nid_t nid,int type) {
@@ -3860,6 +3869,7 @@ static int stac92xx_add_jack(struct hda_codec *codec,int def_conf =snd_hda_codec_get_pincfg (codec, nid);int connectivity =get_defcfg_connect (def_conf);char name[32 ]; +int err;if (connectivity && connectivity !=AC_JACK_PORT_FIXED )return 0 ;
@@ -3876,10 +3886,15 @@ static int stac92xx_add_jack(struct hda_codec *codec,snd_hda_get_jack_connectivity (def_conf), snd_hda_get_jack_location(def_conf)); -return snd_jack_new (codec->bus->card, name, type, &jack->jack); -#else -return 0 ; + err =snd_jack_new (codec->bus->card, name, type, &jack->jack); +if (err <0 ) { + jack->nid =0 ; +return err; + } + jack->jack->private_data = jack; + jack->jack->private_free = stac92xx_free_jack_priv;#endif +return 0 ; } static int stac_add_event(struct sigmatel_spec *spec, hda_nid_t nid,
@@ -4138,8 +4153,10 @@ static void stac92xx_free_jacks(struct hda_codec *codec)if (!codec->bus->shutdown && spec->jacks.list) {struct sigmatel_jack *jacks = spec->jacks.list;int i; -for (i =0 ; i < spec->jacks.used; i++) -snd_device_free (codec->bus->card, &jacks[i].jack); +for (i =0 ; i < spec->jacks.used; i++, jacks++) { +if (jacks->jack) +snd_device_free (codec->bus->card, jacks->jack); + } }snd_array_free (&spec->jacks);#endif
sound/pci/intel8x0.c +70 -21
168 lines not on this page · raw message
sound/soc/pxa/magician.c +0 -2
@@ -27,8 +27,6 @@#include <sound/soc.h> #include <sound/soc-dapm.h> -#include <mach/pxa-regs.h> -#include <mach/hardware.h> #include <mach/magician.h> #include <asm/mach-types.h> #include "../codecs/uda1380.h"
sound/soc/s3c24xx/Kconfig +3 -3
@@ -1,10 +1,10 @@ config SND_S3C24XX_SOC tristate "SoC Audio for the Samsung S3CXXXX chips" - depends on ARCH_S3C2410 || ARCH_S3C64XX + depends on ARCH_S3C2410 help Say Y or M if you want to add support for codecs attached to - the S3C24XX and S3C64XX AC97, I2S or SSP interface. You will - also need to select the audio interfaces to support below. + the S3C24XX AC97 or I2S interfaces. You will also need to + select the audio interfaces to support below. config SND_S3C24XX_SOC_I2S tristate
sound/usb/caiaq/Makefile +2 -2
@@ -1,4 +1,4 @@ -snd-usb-caiaq-y := caiaq-device.o caiaq-audio.o caiaq-midi.o caiaq-control.o -snd-usb-caiaq-$(CONFIG_SND_USB_CAIAQ_INPUT) += caiaq-input.o +snd-usb-caiaq-y := device.o audio.o midi.o control.o +snd-usb-caiaq-$(CONFIG_SND_USB_CAIAQ_INPUT) += input.o obj-$(CONFIG_SND_USB_CAIAQ) += snd-usb-caiaq.o
sound/usb/caiaq/audio.c renamed from sound/usb/caiaq/caiaq-audio.c +3 -9
@@ -16,20 +16,14 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/spinlock.h> #include <linux/init.h> -#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/interrupt.h> #include <linux/usb.h> -#include <linux/spinlock.h> #include <sound/core.h> -#include <sound/initval.h> #include <sound/pcm.h> -#include <sound/rawmidi.h> -#include <linux/input.h> -#include "caiaq-device.h" -#include "caiaq-audio.h" +#include "device.h" +#include "audio.h" #define N_URBS 32#define CLOCK_DRIFT_TOLERANCE 5
sound/usb/caiaq/audio.h renamed from sound/usb/caiaq/caiaq-audio.h +0 -0
sound/usb/caiaq/control.c renamed from sound/usb/caiaq/caiaq-control.c +3 -7
@@ -18,17 +18,13 @@*/ #include <linux/init.h> -#include <linux/interrupt.h> #include <linux/usb.h> +#include <sound/control.h> #include <sound/core.h> -#include <sound/initval.h> #include <sound/pcm.h> -#include <sound/rawmidi.h> -#include <sound/control.h> -#include <linux/input.h> -#include "caiaq-device.h" -#include "caiaq-control.h" +#include "device.h" +#include "control.h" #define CNT_INTVAL 0x10000
sound/usb/caiaq/control.h renamed from sound/usb/caiaq/caiaq-control.h +0 -0
sound/usb/caiaq/device.c renamed from sound/usb/caiaq/caiaq-device.c +8 -15
@@ -19,27 +19,20 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/init.h> -#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/init.h> #include <linux/usb.h> -#include <linux/input.h> -#include <linux/spinlock.h> -#include <sound/core.h> #include <sound/initval.h> +#include <sound/core.h> #include <sound/pcm.h> -#include <sound/rawmidi.h> -#include <sound/control.h> - -#include "caiaq-device.h" -#include "caiaq-audio.h" -#include "caiaq-midi.h" -#include "caiaq-control.h" -#ifdef CONFIG_SND_USB_CAIAQ_INPUT -#include "caiaq-input.h" -#endif +#include "device.h" +#include "audio.h" +#include "midi.h" +#include "control.h" +#include "input.h" MODULE_AUTHOR ("Daniel Mack <[email protected]>" );MODULE_DESCRIPTION ("caiaq USB audio, version 1.3.13" );
sound/usb/caiaq/device.h renamed from sound/usb/caiaq/caiaq-device.h +0 -0
sound/usb/caiaq/input.c renamed from sound/usb/caiaq/caiaq-input.c +3 -8
@@ -17,17 +17,12 @@*/ #include <linux/init.h> -#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/input.h> #include <linux/usb.h> #include <linux/usb/input.h> -#include <linux/spinlock.h> -#include <sound/core.h> -#include <sound/rawmidi.h> #include <sound/pcm.h> -#include "caiaq-device.h" -#include "caiaq-input.h" + +#include "device.h" +#include "input.h" static unsigned short keycode_ak1[] = {KEY_C ,KEY_B ,KEY_A };static unsigned short keycode_rk2[] = {KEY_1 ,KEY_2 ,KEY_3 ,KEY_4 ,
sound/usb/caiaq/input.h renamed from sound/usb/caiaq/caiaq-input.h +0 -0
sound/usb/caiaq/midi.c renamed from sound/usb/caiaq/caiaq-midi.c +3 -10
@@ -16,20 +16,13 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/init.h> -#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/interrupt.h> #include <linux/usb.h> -#include <linux/input.h> -#include <linux/spinlock.h> -#include <sound/core.h> #include <sound/rawmidi.h> +#include <sound/core.h> #include <sound/pcm.h> -#include "caiaq-device.h" -#include "caiaq-midi.h" - +#include "device.h" +#include "midi.h" static int snd_usb_caiaq_midi_input_open (struct snd_rawmidi_substream *substream) {
sound/usb/caiaq/midi.h renamed from sound/usb/caiaq/caiaq-midi.h +0 -0
sound/usb/usx2y/us122l.c +3 -7
@@ -349,14 +349,10 @@ static int usb_stream_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,if (cmd !=SNDRV_USB_STREAM_IOCTL_SET_PARAMS )return -ENOTTY ; - cfg =kmalloc (sizeof (*cfg),GFP_KERNEL ); -if (!cfg) -return -ENOMEM ; + cfg =memdup_user ((void *)arg,sizeof (*cfg)); +if (IS_ERR (cfg)) +return PTR_ERR (cfg); -if (copy_from_user (cfg, (void *)arg,sizeof (*cfg))) { - err = -EFAULT ; - goto free; - }if (cfg->version !=USB_STREAM_INTERFACE_VERSION ) { err = -ENXIO ; goto free;
sound/usb/usx2y/usX2Yhwdep.c +6 -7
@@ -203,13 +203,12 @@ static int snd_usX2Y_hwdep_dsp_load(struct snd_hwdep *hw,if (access_ok (VERIFY_READ , dsp->image, dsp->length)) {struct usb_device * dev = priv->chip.dev; -char *buf =kmalloc (dsp->length,GFP_KERNEL ); -if (!buf) -return -ENOMEM ; -if (copy_from_user (buf, dsp->image, dsp->length)) { -kfree (buf); -return -EFAULT ; - } +char *buf; + + buf =memdup_user (dsp->image, dsp->length); +if (IS_ERR (buf)) +return PTR_ERR (buf); + err =usb_set_interface (dev,0 ,1 );if (err)snd_printk (KERN_ERR "usb_set_interface error \n" );