diff mbox

[10/16] ALSA: line6: Drop voodoo workarounds

Message ID 1422033203-23254-11-git-send-email-tiwai@suse.de (mailing list archive)
State Accepted
Commit ab5cdcbab2efb833b4c199d0b0a6603af080eaa2
Headers show

Commit Message

Takashi Iwai Jan. 23, 2015, 5:13 p.m. UTC
If the problem still really remains, we should fix it instead of
papering over it like this...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/line6/capture.c  | 12 ------------
 sound/usb/line6/playback.c | 12 ------------
 2 files changed, 24 deletions(-)

Comments

Chris Rorvick Jan. 27, 2015, 3:58 a.m. UTC | #1
On Fri, Jan 23, 2015 at 11:13 AM, Takashi Iwai <tiwai@suse.de> wrote:
> If the problem still really remains, we should fix it instead of
> papering over it like this...

FWIW, the commit from the original repository was made in 2007.  So if
the bug is still there, it's an old one.

commit 1e32d598dcf290e5c131a58231c13bfd25812810
Author: fdemski <fdemski@87a33c3d-1c25-0410-a0e4-a977fe0255b3>
Date:   Mon Jul 16 23:51:55 2007 +0000

    bug found and fixed -- maybe some alsa specifics -- did not crosscheck
    substream->private_data seems not to be filled in hw_param function
diff mbox

Patch

diff --git a/sound/usb/line6/capture.c b/sound/usb/line6/capture.c
index 97283e631e45..bad1b5b02786 100644
--- a/sound/usb/line6/capture.c
+++ b/sound/usb/line6/capture.c
@@ -297,18 +297,6 @@  static int snd_line6_capture_hw_params(struct snd_pcm_substream *substream,
 	int ret;
 	struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
 
-	/* -- Florian Demski [FD] */
-	/* don't ask me why, but this fixes the bug on my machine */
-	if (line6pcm == NULL) {
-		if (substream->pcm == NULL)
-			return -ENOMEM;
-		if (substream->pcm->private_data == NULL)
-			return -ENOMEM;
-		substream->private_data = substream->pcm->private_data;
-		line6pcm = snd_pcm_substream_chip(substream);
-	}
-	/* -- [FD] end */
-
 	ret = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER);
 
 	if (ret < 0)
diff --git a/sound/usb/line6/playback.c b/sound/usb/line6/playback.c
index ab9a83f0f864..7e031b1761aa 100644
--- a/sound/usb/line6/playback.c
+++ b/sound/usb/line6/playback.c
@@ -445,18 +445,6 @@  static int snd_line6_playback_hw_params(struct snd_pcm_substream *substream,
 	int ret;
 	struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
 
-	/* -- Florian Demski [FD] */
-	/* don't ask me why, but this fixes the bug on my machine */
-	if (line6pcm == NULL) {
-		if (substream->pcm == NULL)
-			return -ENOMEM;
-		if (substream->pcm->private_data == NULL)
-			return -ENOMEM;
-		substream->private_data = substream->pcm->private_data;
-		line6pcm = snd_pcm_substream_chip(substream);
-	}
-	/* -- [FD] end */
-
 	ret = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_PLAYBACK_BUFFER);
 
 	if (ret < 0)