From: Takashi Iwai Subject: Re: Listing up to 8 PCM devices Date: Wed, 19 Nov 2008 09:31:13 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 39918245DA for ; Wed, 19 Nov 2008 09:31:14 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Gregoire ETIENNE Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 19 Nov 2008 08:19:21 +0000 (UTC), Gregoire ETIENNE wrote: > > Hi, > > I'm currently writting a driver with up to 8 pcm devices, so I turned on > "Dynamic device file minor numbers" option. But when I try to list devices > through aplay or a record (which are calling ioctl with cmd > SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE) I can only list devices from 0 to 7. This is > due to this code : > > linux/sound/core/pcm.c l.64 > ------------------------------ > case SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE: > { > int device; > > if (get_user(device, (int __user *)arg)) > return -EFAULT; > mutex_lock(®ister_mutex); > device = device < 0 ? 0 : device + 1; > while (device < SNDRV_PCM_DEVICES) { > if (snd_pcm_search(card, device)) > break; > device++; > } > if (device == SNDRV_PCM_DEVICES) > device = -1; > mutex_unlock(®ister_mutex); > if (put_user(device, (int __user *)arg)) > return -EFAULT; > return 0; > } > ------------------------------ > because SNDRV_PCM_DEVICES is defined to 8 and do not change even if I selected > "Dynamic device file minor numbers" option. > > Is there anything I missed ? The definition of SNDRV_PCM_DEVICES was changed depending on CONFIG_SND_DYNAMIC_MINORS in the recent version. I guess you are referring to an old version. Takashi