Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189588
b: refs/heads/master
c: a8462bd
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Mar 24, 2010
1 parent 6b1092f commit 2691a9d
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 73 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1172234cbe94658c16bc83e50ca57b5a47085209
refs/heads/master: a8462bde78fdb77c8ede61e1af99617905a78ccf
2 changes: 1 addition & 1 deletion trunk/include/sound/ak4113.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ struct ak4113 {

int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
ak4113_write_t *write,
const unsigned char *pgm,
const unsigned char pgm[AK4113_WRITABLE_REGS],
void *private_data, struct ak4113 **r_ak4113);
void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg,
unsigned char mask, unsigned char val);
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,

#define xrun_debug(substream, mask) \
((substream)->pstr->xrun_debug & (mask))
#else
#define xrun_debug(substream, mask) 0
#endif

#define dump_stack_on_xrun(substream) do { \
if (xrun_debug(substream, XRUN_DEBUG_STACK)) \
Expand All @@ -172,7 +169,6 @@ static void xrun(struct snd_pcm_substream *substream)
}
}

#ifdef CONFIG_SND_PCM_XRUN_DEBUG
#define hw_ptr_error(substream, fmt, args...) \
do { \
if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \
Expand Down Expand Up @@ -259,6 +255,8 @@ static void xrun_log_show(struct snd_pcm_substream *substream)

#else /* ! CONFIG_SND_PCM_XRUN_DEBUG */

#define xrun_debug(substream, mask) 0
#define xrun(substream) do { } while (0)
#define hw_ptr_error(substream, fmt, args...) do { } while (0)
#define xrun_log(substream, pos) do { } while (0)
#define xrun_log_show(substream) do { } while (0)
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/i2c/other/ak4113.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int snd_ak4113_dev_free(struct snd_device *device)
}

int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
ak4113_write_t *write, const unsigned char *pgm,
ak4113_write_t *write, const unsigned char pgm[5],
void *private_data, struct ak4113 **r_ak4113)
{
struct ak4113 *chip;
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/oss/vidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ static void vidc_audio_trigger(int dev, int enable_bits)
struct audio_operations *adev = audio_devs[dev];

if (enable_bits & PCM_ENABLE_OUTPUT) {
if (!(adev->dmap_out->flags & DMA_ACTIVE)) {
if (!(adev->flags & DMA_ACTIVE)) {
unsigned long flags;

local_irq_save(flags);

/* prevent recusion */
adev->dmap_out->flags |= DMA_ACTIVE;
adev->flags |= DMA_ACTIVE;

dma_interrupt = vidc_audio_dma_interrupt;
vidc_sound_dma_irq(0, NULL);
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,14 +1852,12 @@ static unsigned int ad1981_jacks_blacklist[] = {
0x10140523, /* Thinkpad R40 */
0x10140534, /* Thinkpad X31 */
0x10140537, /* Thinkpad T41p */
0x1014053e, /* Thinkpad R40e */
0x10140554, /* Thinkpad T42p/R50p */
0x10140567, /* Thinkpad T43p 2668-G7U */
0x10140581, /* Thinkpad X41-2527 */
0x10280160, /* Dell Dimension 2400 */
0x104380b0, /* Asus A7V8X-MX */
0x11790241, /* Toshiba Satellite A-15 S127 */
0x1179ff10, /* Toshiba P500 */
0x144dc01a, /* Samsung NP-X20C004/SEG */
0 /* end */
};
Expand Down
14 changes: 3 additions & 11 deletions trunk/sound/pci/cmipci.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,21 +941,13 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci
struct snd_pcm_substream *substream)
{
size_t ptr;
unsigned int reg, rem, tries;

unsigned int reg;
if (!rec->running)
return 0;
#if 1 // this seems better..
reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2;
for (tries = 0; tries < 3; tries++) {
rem = snd_cmipci_read_w(cm, reg);
if (rem < rec->dma_size)
goto ok;
}
printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
return SNDRV_PCM_POS_XRUN;
ok:
ptr = (rec->dma_size - (rem + 1)) >> rec->shift;
ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1);
ptr >>= rec->shift;
#else
reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1;
ptr = snd_cmipci_read(cm, reg) - rec->offset;
Expand Down
5 changes: 3 additions & 2 deletions trunk/sound/pci/echoaudio/echoaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2184,9 +2184,10 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
goto ctl_error;
#endif

err = snd_card_register(card);
if (err < 0)
if ((err = snd_card_register(card)) < 0) {
snd_card_free(card);
goto ctl_error;
}
snd_printk(KERN_INFO "Card registered: %s\n", card->longname);

pci_set_drvdata(pci, chip);
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
Expand Down
15 changes: 0 additions & 15 deletions trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,21 +1591,6 @@ static int patch_cxt5047(struct hda_codec *codec)
#endif
}
spec->vmaster_nid = 0x13;

switch (codec->subsystem_id >> 16) {
case 0x103c:
/* HP laptops have really bad sound over 0 dB on NID 0x10.
* Fix max PCM level to 0 dB (originally it has 0x1e steps
* with 0 dB offset 0x17)
*/
snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
(0x17 << AC_AMPCAP_OFFSET_SHIFT) |
(0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(1 << AC_AMPCAP_MUTE_SHIFT));
break;
}

return 0;
}

Expand Down
15 changes: 6 additions & 9 deletions trunk/sound/pci/hda/patch_nvhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec)
* patch entries
*/
static struct hda_codec_preset snd_hda_preset_nvhdmi[] = {
{ .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch },
{ .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch },
{ .id = 0x10de0002, .name = "MCP77/78 HDMI",
.patch = patch_nvhdmi_8ch_7x },
{ .id = 0x10de0003, .name = "MCP77/78 HDMI",
Expand All @@ -548,16 +550,12 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = {
.patch = patch_nvhdmi_8ch_7x },
{ .id = 0x10de0007, .name = "MCP79/7A HDMI",
.patch = patch_nvhdmi_8ch_7x },
{ .id = 0x10de000a, .name = "GT220 HDMI",
{ .id = 0x10de000c, .name = "MCP89 HDMI",
.patch = patch_nvhdmi_8ch_89 },
{ .id = 0x10de000b, .name = "GT21x HDMI",
.patch = patch_nvhdmi_8ch_89 },
{ .id = 0x10de000c, .name = "MCP89 HDMI",
.patch = patch_nvhdmi_8ch_89 },
{ .id = 0x10de000d, .name = "GT240 HDMI",
.patch = patch_nvhdmi_8ch_89 },
{ .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch },
{ .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch },
{} /* terminator */
};

Expand All @@ -566,12 +564,11 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003");
MODULE_ALIAS("snd-hda-codec-id:10de0005");
MODULE_ALIAS("snd-hda-codec-id:10de0006");
MODULE_ALIAS("snd-hda-codec-id:10de0007");
MODULE_ALIAS("snd-hda-codec-id:10de000a");
MODULE_ALIAS("snd-hda-codec-id:10de000b");
MODULE_ALIAS("snd-hda-codec-id:10de000c");
MODULE_ALIAS("snd-hda-codec-id:10de000d");
MODULE_ALIAS("snd-hda-codec-id:10de0067");
MODULE_ALIAS("snd-hda-codec-id:10de8001");
MODULE_ALIAS("snd-hda-codec-id:10de000c");
MODULE_ALIAS("snd-hda-codec-id:10de000b");
MODULE_ALIAS("snd-hda-codec-id:10de000d");

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec");
Expand Down
10 changes: 3 additions & 7 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,8 @@ static int alc_build_controls(struct hda_codec *codec)
return err;
}

alc_free_kctls(codec); /* no longer needed */

/* assign Capture Source enums to NID */
kctl = snd_hda_find_mixer_ctl(codec, "Capture Source");
if (!kctl)
Expand Down Expand Up @@ -2600,9 +2602,6 @@ static int alc_build_controls(struct hda_codec *codec)
}
}
}

alc_free_kctls(codec); /* no longer needed */

return 0;
}

Expand Down Expand Up @@ -10043,11 +10042,8 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
alc_set_pin_output(codec, nid, pin_type);
if (spec->multiout.dac_nids[dac_idx] == 0x25)
idx = 4;
else {
if (spec->multiout.num_dacs >= dac_idx)
return;
else
idx = spec->multiout.dac_nids[dac_idx] - 2;
}
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx);

}
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1730,8 +1730,6 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
"HP HDX", STAC_HP_HDX), /* HDX16 */
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620,
"HP dv6", STAC_HP_DV5),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061,
"HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010,
"HP", STAC_HP_DV5),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
Expand Down
24 changes: 10 additions & 14 deletions trunk/sound/pci/mixart/mixart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,15 +1161,13 @@ static long snd_mixart_BA0_read(struct snd_info_entry *entry, void *file_private
unsigned long count, unsigned long pos)
{
struct mixart_mgr *mgr = entry->private_data;
unsigned long maxsize;

if (pos >= MIXART_BA0_SIZE)
return 0;
maxsize = MIXART_BA0_SIZE - pos;
if (count > maxsize)
count = maxsize;
count = count & ~3; /* make sure the read size is a multiple of 4 bytes */
if (copy_to_user_fromio(buf, MIXART_MEM(mgr, pos), count))
if(count <= 0)
return 0;
if(pos + count > MIXART_BA0_SIZE)
count = (long)(MIXART_BA0_SIZE - pos);
if(copy_to_user_fromio(buf, MIXART_MEM( mgr, pos ), count))
return -EFAULT;
return count;
}
Expand All @@ -1182,15 +1180,13 @@ static long snd_mixart_BA1_read(struct snd_info_entry *entry, void *file_private
unsigned long count, unsigned long pos)
{
struct mixart_mgr *mgr = entry->private_data;
unsigned long maxsize;

if (pos > MIXART_BA1_SIZE)
return 0;
maxsize = MIXART_BA1_SIZE - pos;
if (count > maxsize)
count = maxsize;
count = count & ~3; /* make sure the read size is a multiple of 4 bytes */
if (copy_to_user_fromio(buf, MIXART_REG(mgr, pos), count))
if(count <= 0)
return 0;
if(pos + count > MIXART_BA1_SIZE)
count = (long)(MIXART_BA1_SIZE - pos);
if(copy_to_user_fromio(buf, MIXART_REG( mgr, pos ), count))
return -EFAULT;
return count;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,7 @@ struct snd_soc_dai wm8994_dai[] = {
.rates = WM8994_RATES,
.formats = WM8994_FORMATS,
},
.playback = {
.capture = {
.stream_name = "AIF3 Capture",
.channels_min = 2,
.channels_max = 2,
Expand Down

0 comments on commit 2691a9d

Please sign in to comment.