Re: [PATCH 1/4] echoaudio: Race conditions around "opencount"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi, my apologies, it looks like this patch broke the build of the 
Mona driver.

Thankfully the change is simple, as it just looks like a bit of confusion 
of responsibilies in the code for the Mona interface; the correct fix is 
to remove the code.

That is a lesson for working with only the echo3g driver enabled. Now I 
have done a full build of all echoaudio drivers, with no warnings or 
errors.

Here's a patch, or it can be squashed into the original patch if 
necessary.

-- 
Mark


>From 3c56faaa51436ca08dfe107aa1b06162904c216f Mon Sep 17 00:00:00 2001
From: Mark Hills <mark@xxxxxxxx>
Date: Thu, 2 Jul 2020 10:25:43 +0100
Subject: [PATCH] echoaudio: The Mona build was broken by changes to opencount

The correct fix is to remove this check as it is always false.

It's not the responsibilty of the device-specific driver to make
this check, as it is already checked in snd_echo_digital_mode_put
before this code is called.

I do not have a Mona interface to test this change.

Signed-off-by: Mark Hills <mark@xxxxxxxx>
---
 sound/pci/echoaudio/mona_dsp.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sound/pci/echoaudio/mona_dsp.c b/sound/pci/echoaudio/mona_dsp.c
index dce9e57d01c4..f77db83dd73d 100644
--- a/sound/pci/echoaudio/mona_dsp.c
+++ b/sound/pci/echoaudio/mona_dsp.c
@@ -300,11 +300,6 @@ static int set_input_clock(struct echoaudio *chip, u16 clock)
 	u32 control_reg, clocks_from_dsp;
 	int err;
 
-
-	/* Prevent two simultaneous calls to switch_asic() */
-	if (atomic_read(&chip->opencount))
-		return -EAGAIN;
-
 	/* Mask off the clock select bits */
 	control_reg = le32_to_cpu(chip->comm_page->control_register) &
 		GML_CLOCK_CLEAR_MASK;
-- 
2.17.5




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux