[05:58] does anyone know how to get a sound card working? specifically the headphone jack??? [05:59] help === SCHRIVE is now known as nicobroii [11:01] hello === ian_brasil is now known as IAO === Milyardo_ is now known as Milyardo === goshawk_ is now known as goshawk === arvind_k is now known as arvind_khadri [21:48] hello people [21:48] i have problems :) im testing karmic koala [21:48] exist any channel for karmic ? [21:49] #ubuntu+1 [21:49] DKcross, go to #ubuntu+1 [21:49] thanks [22:41] Hi. can somebody give me a hint already about debugging Pulseaudio. Until recently "pacmd .. list-sinks" only displayed a null device, now it has alsa as sink, but every non-KDE app still fails to play sound (or crashes on startup). [22:55] Is the Audio troubleshooting classroom happening soon? [22:55] in about 5 minutes... [22:56] * kamusin ole olé! [22:56] sweeet [22:56] hi dtchen ! [22:56] hi dtchen [22:56] hi [22:56] https://wiki.ubuntu.com/Packaging/Training/Logs/2009-08-28 [22:58] hello [23:00] ok, hi everyone, tonight we'll be covering the topics listed at https://wiki.ubuntu.com/Packaging/Training/Logs/2009-08-28 [23:00] just to reiterate, we're having a short session on triaging sound bugs in Ubuntu, though many of these procedures are handy for other modern Linux distributions [23:01] for those without access to the wiki currently, here's the agendum: [23:01] # Pedigree of Linux audio [23:01] # Modern sound architecture for x86 laptops/netbooks [23:01] # Triaging audio bugs using Launchpad [23:01] # Common problem(symptom)s and their resolutions/workarounds [23:01] # What's in store for Karmic and Karmic+1 [23:01] i'd like to make this session as interactive as possible, so please feel free to ask questions in #ubuntu-classroom-chat [23:02] ok, let's dive in [23:02] Paraphrasing, ALSA began life as a GPL alternative to the languishing [23:02] OSS 3.x. From the onset, it was clearly designed to place only driver [23:02] and necessary core bits in kernelspace; the more complex and extensible [23:02] parts would be in userspace. [23:04] It's important here to note that despite ALSA having become the "blessed" sound subsystem for Linux 2.6, OSS development has continued outside of the Linux tree; other OSes like the BSDs use some parts of its current version, 4.x, and Solaris has its own "fork" of 4.x. [23:05] Early in Ubuntu development, i.e., 4.10 to 5.04, it was decided to pursue ALSA as the sole supported base. It seemed (as has proven to be) rather intelligent from a resource perspective, given upstreams were focusing on it. [23:06] Briefly, i'll describe the modern sound architecture on an Ubuntu release. Perhaps an ASCII diagram helps: [23:07] using the analog of a stack, it looks something akin to, [23:07] - Rhythmbox - [23:07] - GStreamer - [23:07] - PulseAudio - [23:07] - ALSA (-lib, userspace) - [23:08] - ALSA (linux, kernelspace) - [23:08] - hardware - [23:08] i.e., when you're listening to music using Rhythmbox in Ubuntu Jaunty, you're hitting six different parts of what i call the "audio stack" [23:09] triaging sound bugs in Ubuntu (and yes, in Linux generally) is complicated by the fact that every single part of that stack above is rife with problems [23:09] the most difficult parts to debug tend to be lower in the stack, e.g., hardware through PulseAudio [23:10] Because we're currently mid-stride (well, toward the latter end of) development of Karmic, there are a lot of fast-moving parts in the stack. [23:11] For people who use Karmic, you've likely seen my posts to the ubuntu-devel and ubuntu-devel-discuss mailing lists requesting testing using the ubuntu-audio-dev PPA [23:11] (https://launchpad.net/~ubuntu-audio-dev/+archive/ppa) [23:11] Now that Karmic is in Feature Freeze, it is more important than ever to track that PPA closely. [23:12] 18:10 < Out_Cold> so were do OSS plugins fit in for the stack? [23:12] It depends which OSS plugins Out_Cold's referring to. [23:13] alsa-oss [23:13] For instance, ALSA itself offers an older OSS compatibility option via two loadable kernel modules, snd-oss-pcm and snd-oss-mixer [23:14] Sorry, that would be snd-pcm-oss and snd-mixer-oss [23:14] Those two modules are loaded by default in Ubuntu and supported remixes to make accessibility (a11y) programs work more smoothly [23:15] (I'll cover that bit toward the end of this discussion.) [23:15] looks like no further questions [23:15] Having snd-{pcm,mixer}-oss loaded gives userspace /dev/dsp*, /dev/mixer*, /dev/audio*, and other OSS-provided devices. [23:16] So that's one major class of "OSS compatibility". However, there is another class known as "wrappers"; these would be things like edsp, alsa-oss, padsp, etc. [23:17] ok sorry for the delay [23:17] have we started? [23:17] This latter class of "wrappers" is simply LD_PRELOAD hacks. They're often not terribly effective, though they do suffice for an increasingly shrinking subset of popular programs. [23:18] (On the horizon is something called OSSp; we'll cover that briefly toward the end.) [23:18] hello [23:20] Out_Cold's question regarding alsa-oss actually sits at the upper ALSA layer, i.e., in userspace. It attempts to redirect accesses to the OSS devices and route them through ALSA. [23:20] (the same holds for all wrappers, OSSp notwithstanding) [23:20] So, that should cover Out_Cold's question. [23:20] stefg: any plans to have a (well needed) system wide EQ in the near future? [23:20] ty [23:21] There have been efforts to place an ALSA eq, though they have stalled. There is currently a branch of PulseAudio (PA) that has eq functionality. Calls for testers are on the pulseaudio-discuss mailing list. [23:22] (We're not really considering LADPSA at this point to be "eq".) [23:22] Any further questions? [23:22] so, pulse audio fails in multi users scenario. can we do something about this [23:23] That question needs more detail/context. Are we talking multiseat? [23:23] PA is per-user not system wide. This is not good for my use case. When I switched it to system-wide, it works very badly [23:24] PulseAudio has plans for multiseat, yes, but they will not land for Fedora 12, Ubuntu Karmic, etc. [23:24] in system-wide mode, often (on my hardware at least) sound gets very distorted, skipping/jumping (like some buffer fragments problems or something) [23:25] then it will be not possible for another HALF YEAR to do trivial task like "user on VT-7 plays the music, and it keeps playing even when I switch VT's" ? [23:25] limcore: it's possible now, yes. It's not trivial using PA, fairly trivial using ALSA directly, but neither option is ideal. [23:26] PA is the ideal solution / the goal for ubuntu right? [23:26] ok, i have a lot more background to cover before we can get to triaging, so let's continue. [23:26] (PA is the upstream momentum, so that's Ubuntu's momentum currently.) [23:27] Bringing the discussion back to triaging sound bugs, what we see a lot of are: [23:27] 0. sound muted bugs [23:27] 1. audio anomaly (crackling, popping) bugs [23:27] 2. general infrastructure bugs [23:28] To understand how these three major classes of bugs have arisen, it's useful to look at current commodity (consumer) laptops and netbooks. [23:29] There are two major audio specifications for laptops and netbooks: AC'97 and High Definition Audio (Azalia). [23:30] AC'97 was implemented by many OEMs, perhaps the most popular being the Creative/Sigmatel combination of Live! and Audigy families [23:31] It's important to note that both AC'97 and HDA are specifications, so looking at "lspci -v" to get e.g., Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1), is pretty useless [23:32] Because AC'97 and HDA are only specs, OEMs have popularized lots of features that require driver enablement, which means that resources must be devoted to implementing them correctly on every OS. [23:33] lspci -v [23:33] aplay -l [23:34] For modern laptops and netbooks, we're dealing essentially with HDA codecs and controllers, and that brings new classes of headaches. [23:35] One of the reasons for so many regressions between Ubuntu Gutsy and Ubuntu Intrepid was the tightening of codec enforcement. [23:35] This means that features were moved out of the generic driver/parser into codec-specific patch files (you can see these in the Linux source, sound/pci/hda/patch_*.c) [23:36] Further regressions between Intrepid and Jaunty, e.g., internal microphones not working, have been caused by an infrastructure extension [23:37] It used to be that jack-sensing was strictly tied to the driver and could not be manipulated by userspace programs. As of Karmic, that is no longer the case. [23:37] (e.g., when you insert headphones, your laptop's internal speakers mute) === kermiac_ is now known as kermiac [23:38] So, now i'll cover the process from cold boot to GNOME session log in for Ubuntu Jaunty. [23:39] When you power on your laptop, your BIOS either programs the HDA codec for you, or it does not. Whether it does depends solely on the OEM making the machine. [23:40] Let's say you have a BIOS that programs the HDA codec for you, and it does so correctly. Life is good; you hear the drum sound for GDM; you login, hear the login sound, and continue on your merry way. [23:41] Let's say you have a BIOS that programs the HDA codec for you incorrectly, e.g., flipping two of the initialisation verbs so your headphone jack does nothing. [23:41] Here's how the ALSA driver works: [23:42] udev will match the modalias for your vendor and device and load the appropriate codec and controller kernel modules [23:43] once the controller module initialises, it runs through the generic parser unless it sees a more specific match (which actually short-circuits the match) [23:43] once the specific match is made, the appropriate patch path for your HDA codec is used [23:45] at this point, things get interesting: if there's a BIOS setup of the verb tables, that existing setup is used UNLESS there's a hard-coded model quirk passed via the command line (e.g., model=foo) or there's a hard-coded model quirk in the driver source itself [23:45] essentially, the order is always: [23:45] 0. use passed quirk [23:45] 1. use driver source quirk [23:45] 2. use existing verb table state [23:46] Note that (2) does not imply that the codec was correctly configured! [23:46] (the driver has no way to know if what exists is correct) [23:47] So, if your BIOS unluckily configures the table incorrectly, you stand a chance to reconfigure it on-the-fly using a tool called hda-verb. [23:48] dtchen: glossary request: what is this "verb" [23:48] you need to load snd-hwdep to use hda-verb [23:48] verb tables are essentially "initial states" [23:48] aka "set this pin to route here" [23:49] the HDA specification has a whole list of verbs/commands [23:50] and each sound card + main board pair needs some proper setup "verb"? [23:50] Now, we can move on to the heart of the discussion, which is triaging [23:50] verb from german Verbindung =Connection ? [23:50] questions in #ubuntu-classroom-chat please [23:50] let's return to the list above: [23:50] 18:27 < dtchen> 0. sound muted bugs [23:50] 18:27 < dtchen> 1. audio anomaly (crackling, popping) bugs [23:50] 18:27 < dtchen> 2. general infrastructure bugs [23:51] The first thing to remember when you're triaging sound bugs is that you may be dealing with multiple parts of the stack: [23:51] 18:07 < dtchen> - Rhythmbox - [23:51] 18:07 < dtchen> - GStreamer - [23:51] 18:07 < dtchen> - PulseAudio - [23:51] 18:07 < dtchen> - ALSA (-lib, userspace) - [23:51] 18:08 < dtchen> - ALSA (linux, kernelspace) - [23:51] 18:08 < dtchen> - hardware - [23:52] Realising that, the first action is to identify which part(s) of the stack are pertinent [23:53] After identifying which parts of the stack are pertinent, open a task for each portion of the stack [23:53] for simplicity, i'll use the following source packages: [23:53] kernelspace/driver -> linux [23:53] userspace/-lib -> alsa-lib or alsa-plugins [23:54] the rest are self-explanatory, so let's focus on how to differentiate between linux, alsa-lib, and alsa-plugins [23:54] first of all, please don't triage bugs against alsa-driver when you see them opened by apport [23:54] instead, please migrate them to linux [23:55] the alsa-driver source package is to be used only when the bug reporter has either explicitly mentioned using module-assistant with alsa-source or mentioned a bug in the modprobe.d conffiles associated with ALSA (linux-sound-base and/or alsa-base) [23:56] so, a typical work flow might be: [23:56] user A: my sound doesn't work! [23:56] brave triager: please file a bug using "ubuntu-bug alsa-base" [23:56] user A: ok, see bug #7000000 [23:57] brave triager: ok, i'm moving bug #7000000 to affect linux instead of alsa-driver [23:57] ok, with that covered, let's cover the easiest part first: [23:58] alsa-plugins bugs are ones like "Skype didn't work until I downloaded V2.1" [23:58] or "OpenArena explodes when I use PulseAudio" (thanks, fta) [23:59] or "32-bit Adobe Flash on my 64-bit machine makes a spoo noise, and my cat died" [23:59] In other words, alsa-plugins are ones where the PulseAudio reroute is clearly to blame