From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750754AbWHBKls (ORCPT ); Wed, 2 Aug 2006 06:41:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750771AbWHBKlr (ORCPT ); Wed, 2 Aug 2006 06:41:47 -0400 Received: from mail.suse.de ([195.135.220.2]:25773 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1750754AbWHBKlr (ORCPT ); Wed, 2 Aug 2006 06:41:47 -0400 Date: Wed, 02 Aug 2006 12:41:41 +0200 Message-ID: From: Takashi Iwai To: Hubert Tonneau Cc: Greg KH , linux-kernel@vger.kernel.org Subject: Re: Linux v2.6.18-rc3 In-Reply-To: <06AU96W11@briare1.heliogroup.fr> References: <06AU96W11@briare1.heliogroup.fr> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Sun, 30 Jul 2006 17:42:32 GMT, Hubert Tonneau wrote: > > I've tracked down the USB audio cards not working anymore with 2.6.17 as opposed > to 2.6.16 to the fact that opening /dev/dsp with O_RDWR works with any USB > audio card under 2.6.16 whereas starting from 2.6.17 O_WRONLY is mandatory > if the card has no mic or line in. Do you really get Oops with 2.6.17-final, too? AFAIK, there was a bug in the early 2.6.17-rc regarding OSS emulation, but it got fixed in the later rc. The behavior of invalid O_* flag seems incompatible with the older version. Although I don't think it's totally wrong behavior, surely better to keep the compatibility. The patch below should fix it. Thanks, Takashi --- linux-2.6.17.4/sound/core/oss/pcm_oss.c 2006-08-02 12:35:10.000000000 +0200 +++ linux-2.6.17.4/sound/core/oss/pcm_oss.c 2006-08-02 12:36:28.000000000 +0200 @@ -1745,6 +1745,8 @@ static int snd_pcm_oss_open_file(struct for (idx = 0; idx < 2; idx++) { if (setup[idx].disable) continue; + if (! pcm->streams[idx].substream_count) + continue; /* no matching substream */ if (idx == SNDRV_PCM_STREAM_PLAYBACK) { if (! (f_mode & FMODE_WRITE)) continue;