diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-05-15 09:38:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-05-15 09:38:20 -0400 |
commit | a3d2b755c0e8f301c079d8aa5a761622259400fe (patch) | |
tree | 5c26f7617ac49addcdc65e27f97f218495ac6b3e /sound | |
parent | bbb2b6829d2afa4cfc58f7c321b2c3aaa7f4835e (diff) | |
parent | 5a641bcd6398841cc4606b0a732d41a09256fd94 (diff) |
Merge branch 'fix/misc' into for-linus
* fix/misc:
ALSA: pcsp: fix printk format warning
ALSA: riptide: postfix increment and off by one
Diffstat (limited to 'sound')
-rw-r--r-- | sound/drivers/pcsp/pcsp_mixer.c | 2 | ||||
-rw-r--r-- | sound/pci/riptide/riptide.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index caeb0f57fcca..771955a9be71 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c | |||
@@ -50,7 +50,7 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol, | |||
50 | uinfo->value.enumerated.items = chip->max_treble + 1; | 50 | uinfo->value.enumerated.items = chip->max_treble + 1; |
51 | if (uinfo->value.enumerated.item > chip->max_treble) | 51 | if (uinfo->value.enumerated.item > chip->max_treble) |
52 | uinfo->value.enumerated.item = chip->max_treble; | 52 | uinfo->value.enumerated.item = chip->max_treble; |
53 | sprintf(uinfo->value.enumerated.name, "%d", | 53 | sprintf(uinfo->value.enumerated.name, "%lu", |
54 | PCSP_CALC_RATE(uinfo->value.enumerated.item)); | 54 | PCSP_CALC_RATE(uinfo->value.enumerated.item)); |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 6f1034417a02..e51a5ef1954d 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -889,7 +889,7 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm, | |||
889 | spin_lock_irqsave(&cif->lock, irqflags); | 889 | spin_lock_irqsave(&cif->lock, irqflags); |
890 | while (i++ < CMDIF_TIMEOUT && !IS_READY(cif->hwport)) | 890 | while (i++ < CMDIF_TIMEOUT && !IS_READY(cif->hwport)) |
891 | udelay(10); | 891 | udelay(10); |
892 | if (i >= CMDIF_TIMEOUT) { | 892 | if (i > CMDIF_TIMEOUT) { |
893 | err = -EBUSY; | 893 | err = -EBUSY; |
894 | goto errout; | 894 | goto errout; |
895 | } | 895 | } |
@@ -907,8 +907,10 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm, | |||
907 | WRITE_PORT_ULONG(cmdport->data1, cmd); /* write cmd */ | 907 | WRITE_PORT_ULONG(cmdport->data1, cmd); /* write cmd */ |
908 | if ((flags & RESP) && ret) { | 908 | if ((flags & RESP) && ret) { |
909 | while (!IS_DATF(cmdport) && | 909 | while (!IS_DATF(cmdport) && |
910 | time++ < CMDIF_TIMEOUT) | 910 | time < CMDIF_TIMEOUT) { |
911 | udelay(10); | 911 | udelay(10); |
912 | time++; | ||
913 | } | ||
912 | if (time < CMDIF_TIMEOUT) { /* read response */ | 914 | if (time < CMDIF_TIMEOUT) { /* read response */ |
913 | ret->retlongs[0] = | 915 | ret->retlongs[0] = |
914 | READ_PORT_ULONG(cmdport->data1); | 916 | READ_PORT_ULONG(cmdport->data1); |
@@ -1454,7 +1456,7 @@ static int snd_riptide_trigger(struct snd_pcm_substream *substream, int cmd) | |||
1454 | SEND_GPOS(cif, 0, data->id, &rptr); | 1456 | SEND_GPOS(cif, 0, data->id, &rptr); |
1455 | udelay(1); | 1457 | udelay(1); |
1456 | } while (i != rptr.retlongs[1] && j++ < MAX_WRITE_RETRY); | 1458 | } while (i != rptr.retlongs[1] && j++ < MAX_WRITE_RETRY); |
1457 | if (j >= MAX_WRITE_RETRY) | 1459 | if (j > MAX_WRITE_RETRY) |
1458 | snd_printk(KERN_ERR "Riptide: Could not stop stream!"); | 1460 | snd_printk(KERN_ERR "Riptide: Could not stop stream!"); |
1459 | break; | 1461 | break; |
1460 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 1462 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
@@ -1783,7 +1785,7 @@ snd_riptide_codec_write(struct snd_ac97 *ac97, unsigned short reg, | |||
1783 | SEND_SACR(cif, val, reg); | 1785 | SEND_SACR(cif, val, reg); |
1784 | SEND_RACR(cif, reg, &rptr); | 1786 | SEND_RACR(cif, reg, &rptr); |
1785 | } while (rptr.retwords[1] != val && i++ < MAX_WRITE_RETRY); | 1787 | } while (rptr.retwords[1] != val && i++ < MAX_WRITE_RETRY); |
1786 | if (i == MAX_WRITE_RETRY) | 1788 | if (i > MAX_WRITE_RETRY) |
1787 | snd_printdd("Write AC97 reg failed\n"); | 1789 | snd_printdd("Write AC97 reg failed\n"); |
1788 | } | 1790 | } |
1789 | 1791 | ||