Skip to contentSkip to conversation

Huge AZT3328 driver update

PATCH Takashi Iwai 2 participants 4 messages Oct 24, 2005 – Oct 25, 2005 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

At Sun, 23 Oct 2005 19:57:34 +0200,

Review

Quoted 13 lines · Andreas Mohr
(quoted diff) +5 -1
-static int snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd)
+static int
+snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd)
 {
 	azf3328_t *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	int result = 0;
 	unsigned int status1;
+	spinlock_t *reg_lock_ptr;
 
 	snd_azf3328_dbgcalls("snd_azf3328_playback_trigger cmd %d\n", cmd);
+
+	reg_lock_ptr = &chip->reg_lock;

Better to use the conventional style, spin_lock(&foo->lock).

Review

Quoted 11 lines

/* this is just analogous to playback; I'm not quite sure whether recording
* should actually be triggered like that */

(quoted diff) +3 -1
-static int snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd)
+static int
+snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd)
 {
 	azf3328_t *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	int result = 0;
 	unsigned int status1;
+	spinlock_t *reg_lock_ptr;

Ditto.

Review

Quoted 10 lines
(quoted diff) +5 -3
-static irqreturn_t snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	azf3328_t *chip = dev_id;
-	unsigned int status, which;
-	static unsigned long count;
+	u8 status, which;
+	static unsigned long irq_count;
+	spinlock_t *reg_lock_ptr;

Ditto.

Otherwise looks fine to me. Could you fix the above?

Thanks,

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

At Mon, 24 Oct 2005 14:53:39 +0200,

Quoted 6 lines · Andreas Mohr

Hi,

Quoted 2 lines · Takashi Iwai

At Sun, 23 Oct 2005 19:57:34 +0200,
Andreas Mohr wrote:

Quoted 7 lines
Quoted 3 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+	reg_lock_ptr = &chip->reg_lock;

Better to use the conventional style, spin_lock(&foo->lock).

Well, in your definition of "Better" ;)
My definition of "Better" usually is what's faster, unless it's dirt ugly. (and that particular trick saves one memory addressing instruction, and that instruction would have been *within* the locked area, too)

It's uncoventional, and decreases the readability a lot. That would beat such a minimal performance gain.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information

#4 lore raw

Hi,

Quoted 11 lines · Takashi Iwai

At Mon, 24 Oct 2005 14:53:39 +0200,

Quoted 9 lines · Andreas Mohr

Hi,

Quoted 5 lines · Takashi Iwai

At Sun, 23 Oct 2005 19:57:34 +0200,

Review

Quoted 1 line · Andreas Mohr
(quoted diff) +1 -0
+	reg_lock_ptr = &chip->reg_lock;

Better to use the conventional style, spin_lock(&foo->lock).

Quoted 7 lines
Quoted 4 lines

Well, in your definition of "Better" ;)
My definition of "Better" usually is what's faster, unless it's dirt ugly. (and that particular trick saves one memory addressing instruction, and that instruction would have been *within* the locked area, too)

It's uncoventional, and decreases the readability a lot. That would beat such a minimal performance gain.

Hmm, ok, attached is the same patch with all reg_lock_ptr shortcuts removed (I realized that it wasn't in the IRQ handler only...).

Now I think I know why I didn't get through to alsa-devel - mail size limit... (gzipped patch now)

Thanks,

Andreas Mohr

(those updates done by me, and me alone)

#5 lore raw

At Mon, 24 Oct 2005 23:55:18 +0200,

Quoted 20 lines · Andreas Mohr

Hi,

Quoted 16 lines · Takashi Iwai

At Mon, 24 Oct 2005 14:53:39 +0200,

Quoted 13 lines · Andreas Mohr

Hi,

Quoted 5 lines · Takashi Iwai

At Sun, 23 Oct 2005 19:57:34 +0200,

Review

Quoted 1 line · Andreas Mohr
(quoted diff) +1 -0
+	reg_lock_ptr = &chip->reg_lock;

Better to use the conventional style, spin_lock(&foo->lock).

Well, in your definition of "Better" ;)
My definition of "Better" usually is what's faster, unless it's dirt ugly. (and that particular trick saves one memory addressing instruction, and that instruction would have been *within* the locked area, too)

Quoted 5 lines
Quoted 2 lines

It's uncoventional, and decreases the readability a lot. That would beat such a minimal performance gain.

Hmm, ok, attached is the same patch with all reg_lock_ptr shortcuts removed (I realized that it wasn't in the IRQ handler only...).

Thanks, I committed now.

Quoted 9 lines

Now I think I know why I didn't get through to alsa-devel - mail size limit... (gzipped patch now)

Thanks,

Andreas Mohr

(those updates done by me, and me alone)

Signed-off-by is nothing but a kind of ack sign. It doesn't show the author of the patch. We pick up automatically the patch author either from the first signed-off-by submitter or explicitly the from header.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information