From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 18 04:39:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 52D8BB05 for ; Mon, 18 Mar 2013 04:39:01 +0000 (UTC) (envelope-from litherum@gmail.com) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3F2389 for ; Mon, 18 Mar 2013 04:39:00 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id t12so699314pdi.7 for ; Sun, 17 Mar 2013 21:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type; bh=yI30s+7po+AegzlcmdxkDygsKuBUK0t/QzDcT3YPvws=; b=a4izI7Af8LsbxGsD9Jgw4Eyy/YE79dAoOdBwe4OjTVpp6Ey12B/GSNK5ShzVnpQyZE v3PDWGmwDIYKbErxLviC1JP3qjPpRW1KpWXHm1lilhHnPoO4nGCfQzX8FcXwUVv4aT7B 0BuML3N/MISSZtYNaRHufbGnfGapJEyO1zcd7Lb7bQy9ypr2m3btPI7ndkmKSCpodLhz J7MOWDkrMkCA/RH18x16vh9ODPGJTq4ThihfpkVptsNjuUAKK541a66IHb77af8VsbgJ EfVhO76PW2QVPbLXhhvoHK0baLaoQAxmdDD1JRVYdoQb0maZrE7a1pOE3unNlcqppidJ k2iw== X-Received: by 10.66.241.106 with SMTP id wh10mr8281455pac.143.1363581540787; Sun, 17 Mar 2013 21:39:00 -0700 (PDT) MIME-Version: 1.0 Sender: litherum@gmail.com Received: by 10.68.231.201 with HTTP; Sun, 17 Mar 2013 21:38:39 -0700 (PDT) From: "Myles C. Maxfield" Date: Sun, 17 Mar 2013 21:38:39 -0700 X-Google-Sender-Auth: OVuEt6ZWxhHrfxnC_yof5CGYu7o Message-ID: Subject: /dev/dspN detection in PulseAudio To: freebsd-ports-bugs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2013 04:39:01 -0000 Hello, After upgrading to the latest stable version of FreeBSD (9.1), I noticed that some of my /dev/dspN devices had stopped showing up in PulseAudio. I took a look at the code for the detect_oss() function in src/modules/module-detect.c, and found that PulseAudio was discovering dsp devices by parsing /dev/sndstat. I recompiled pulseaudio with debugging symbols, and stepped through execution of the function. It turns out that when PulseAudio opens /dev/sndstat, it reads an empty line in the middle of the file, which was triggering the early-out of the loop (lines 151-152). If I removed those two early-out lines, then all my /dev/dspN devices are correctly recognized and everything works great. There is one caveat, however: When I cat /dev/sndstat from the command-line, there is no empty line in the middle of the file. At this point, I'm wondering if I should submit a patch to the PulseAudio port (/ports/head/audio/pulseaudio/files/patch-src_modules_module-detect.c), or if I should keep digging into why /dev/sndstat has an empty line in the middle of the file (but only when the file is read by PulseAudio). Does anyone have any suggestions on what I should do now? Thanks, Myles