/srv/irclogs.ubuntu.com/2009/08/28/#ubuntu-classroom.txt

lateralus01does anyone know how to get a sound card working? specifically the headphone jack???05:58
lateralus01help05:59
=== SCHRIVE is now known as nicobroii
openweek9hello11:01
=== 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
DKcrosshello people21:48
DKcrossi have problems :) im testing karmic koala21:48
DKcrossexist any channel for karmic ?21:48
Andphe#ubuntu+121:49
hggdhDKcross, go to #ubuntu+121:49
DKcrossthanks21:49
blueyedHi. 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:41
komputesIs the Audio troubleshooting classroom happening soon?22:55
andresmujicain about 5 minutes...22:55
* kamusin ole olé!22:56
komputessweeet22:56
komputeshi dtchen !22:56
andresmujicahi dtchen22:56
dtchenhi22:56
dtchenhttps://wiki.ubuntu.com/Packaging/Training/Logs/2009-08-2822:56
macohello22:58
dtchenok, hi everyone, tonight we'll be covering the topics listed at https://wiki.ubuntu.com/Packaging/Training/Logs/2009-08-2823:00
dtchenjust 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 distributions23:00
dtchenfor those without access to the wiki currently, here's the agendum:23:01
dtchen# Pedigree of Linux audio23:01
dtchen# Modern sound architecture for x86 laptops/netbooks23:01
dtchen# Triaging audio bugs using Launchpad23:01
dtchen# Common problem(symptom)s and their resolutions/workarounds23:01
dtchen# What's in store for Karmic and Karmic+123:01
dtcheni'd like to make this session as interactive as possible, so please feel free to ask questions in #ubuntu-classroom-chat23:01
dtchenok, let's dive in23:02
dtchenParaphrasing, ALSA began life as a GPL alternative to the languishing23:02
dtchenOSS 3.x. From the onset, it was clearly designed to place only driver23:02
dtchenand necessary core bits in kernelspace; the more complex and extensible23:02
dtchenparts would be in userspace.23:02
dtchenIt'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:04
dtchenEarly 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:05
dtchenBriefly, i'll describe the modern sound architecture on an Ubuntu release. Perhaps an ASCII diagram helps:23:06
dtchenusing the analog of a stack, it looks something akin to,23:07
dtchen- Rhythmbox -23:07
dtchen- GStreamer -23:07
dtchen- PulseAudio -23:07
dtchen- ALSA (-lib, userspace) -23:07
dtchen- ALSA (linux, kernelspace) -23:08
dtchen- hardware -23:08
dtcheni.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:08
dtchentriaging 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 problems23:09
dtchenthe most difficult parts to debug tend to be lower in the stack, e.g., hardware through PulseAudio23:09
dtchenBecause 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:10
dtchenFor 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 PPA23:11
dtchen(https://launchpad.net/~ubuntu-audio-dev/+archive/ppa)23:11
dtchenNow that Karmic is in Feature Freeze, it is more important than ever to track that PPA closely.23:11
dtchen18:10 < Out_Cold> so were do OSS plugins fit in for the stack?23:12
dtchenIt depends which OSS plugins Out_Cold's referring to.23:12
maco<Out_Cold> alsa-oss23:13
dtchenFor instance, ALSA itself offers an older OSS compatibility option via two loadable kernel modules, snd-oss-pcm and snd-oss-mixer23:13
dtchenSorry, that would be snd-pcm-oss and snd-mixer-oss23:14
dtchenThose two modules are loaded by default in Ubuntu and supported remixes to make accessibility (a11y) programs work more smoothly23:14
dtchen(I'll cover that bit toward the end of this discussion.)23:15
macolooks like no further questions23:15
dtchenHaving snd-{pcm,mixer}-oss loaded gives userspace /dev/dsp*, /dev/mixer*, /dev/audio*, and other OSS-provided devices.23:15
dtchenSo 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:16
bcurtiswxok sorry for the delay23:17
bcurtiswxhave we started?23:17
dtchenThis 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:17
dtchen(On the horizon is something called OSSp; we'll cover that briefly toward the end.)23:18
limcorehello23:18
dtchenOut_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
dtchen(the same holds for all wrappers, OSSp notwithstanding)23:20
dtchenSo, that should cover Out_Cold's question.23:20
andresmujicastefg: any plans to have a (well needed) system wide EQ in the near future?23:20
Out_Coldty23:20
dtchenThere 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:21
dtchen(We're not really considering LADPSA at this point to be "eq".)23:22
dtchenAny further questions?23:22
maco<limcore> so, pulse audio fails in multi users scenario.   can we do something about this23:22
dtchenThat question needs more detail/context. Are we talking multiseat?23:23
limcorePA is per-user not system wide. This is not good for my use case. When I switched it to system-wide, it works very badly23:23
dtchenPulseAudio has plans for multiseat, yes, but they will not land for Fedora 12, Ubuntu Karmic, etc.23:24
limcorein system-wide mode, often (on my hardware at least) sound gets very distorted, skipping/jumping (like some buffer fragments problems or something)23:24
limcorethen 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
dtchenlimcore: it's possible now, yes. It's not trivial using PA, fairly trivial using ALSA directly, but neither option is ideal.23:25
limcorePA is the ideal solution / the goal for ubuntu right?23:26
dtchenok, i have a lot more background to cover before we can get to triaging, so let's continue.23:26
dtchen(PA is the upstream momentum, so that's Ubuntu's momentum currently.)23:26
dtchenBringing the discussion back to triaging sound bugs, what we see a lot of are:23:27
dtchen0. sound muted bugs23:27
dtchen1. audio anomaly (crackling, popping) bugs23:27
dtchen2. general infrastructure bugs23:27
dtchenTo understand how these three major classes of bugs have arisen, it's useful to look at current commodity (consumer) laptops and netbooks.23:28
dtchenThere are two major audio specifications for laptops and netbooks: AC'97 and High Definition Audio (Azalia).23:29
dtchenAC'97 was implemented by many OEMs, perhaps the most popular being the Creative/Sigmatel combination of Live! and Audigy families23:30
dtchenIt'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 useless23:31
dtchenBecause 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:32
Out_Coldlspci -v23:33
stefgaplay -l23:33
dtchenFor modern laptops and netbooks, we're dealing essentially with HDA codecs and controllers, and that brings new classes of headaches.23:34
dtchenOne of the reasons for so many regressions between Ubuntu Gutsy and Ubuntu Intrepid was the tightening of codec enforcement.23:35
dtchenThis 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:35
dtchenFurther regressions between Intrepid and Jaunty, e.g., internal microphones not working, have been caused by an infrastructure extension23:36
dtchenIt 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
dtchen(e.g., when you insert headphones, your laptop's internal speakers mute)23:37
=== kermiac_ is now known as kermiac
dtchenSo, now i'll cover the process from cold boot to GNOME session log in for Ubuntu Jaunty.23:38
dtchenWhen 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:39
dtchenLet'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:40
dtchenLet'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
dtchenHere's how the ALSA driver works:23:41
dtchenudev will match the modalias for your vendor and device and load the appropriate codec and controller kernel modules23:42
dtchenonce 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
dtchenonce the specific match is made, the appropriate patch path for your HDA codec is used23:43
dtchenat 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 itself23:45
dtchenessentially, the order is always:23:45
dtchen0. use passed quirk23:45
dtchen1. use driver source quirk23:45
dtchen2. use existing verb table state23:45
dtchenNote that (2) does not imply that the codec was correctly configured!23:46
dtchen(the driver has no way to know if what exists is correct)23:46
dtchenSo, 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:47
macodtchen: glossary request: <limcore> what is this "verb"23:48
dtchenyou need to load snd-hwdep to use hda-verb23:48
dtchenverb tables are essentially "initial states"23:48
dtchenaka "set this pin to route here"23:48
dtchenthe HDA specification has a whole list of verbs/commands23:49
limcoreand each sound card + main board  pair  needs some proper setup "verb"?23:50
dtchenNow, we can move on to the heart of the discussion, which is triaging23:50
zybverb from german Verbindung =Connection ?23:50
bcurtiswxquestions in #ubuntu-classroom-chat please23:50
dtchenlet's return to the list above:23:50
dtchen18:27 < dtchen> 0. sound muted bugs23:50
dtchen18:27 < dtchen> 1. audio anomaly (crackling, popping) bugs23:50
dtchen18:27 < dtchen> 2. general infrastructure bugs23:50
dtchenThe first thing to remember when you're triaging sound bugs is that you may be dealing with multiple parts of the stack:23:51
dtchen18:07 < dtchen> - Rhythmbox -23:51
dtchen18:07 < dtchen> - GStreamer -23:51
dtchen18:07 < dtchen> - PulseAudio -23:51
dtchen18:07 < dtchen> - ALSA (-lib, userspace) -23:51
dtchen18:08 < dtchen> - ALSA (linux, kernelspace) -23:51
dtchen18:08 < dtchen> - hardware -23:51
dtchenRealising that, the first action is to identify which part(s) of the stack are pertinent23:52
dtchenAfter identifying which parts of the stack are pertinent, open a task for each portion of the stack23:53
dtchenfor simplicity, i'll use the following source packages:23:53
dtchenkernelspace/driver -> linux23:53
dtchenuserspace/-lib -> alsa-lib or alsa-plugins23:53
dtchenthe rest are self-explanatory, so let's focus on how to differentiate between linux, alsa-lib, and alsa-plugins23:54
dtchenfirst of all, please don't triage bugs against alsa-driver when you see them opened by apport23:54
dtcheninstead, please migrate them to linux23:54
dtchenthe 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:55
dtchenso, a typical work flow might be:23:56
dtchenuser A: my sound doesn't work!23:56
dtchenbrave triager: please file a bug using "ubuntu-bug alsa-base"23:56
dtchenuser A: ok, see bug #700000023:56
dtchenbrave triager: ok, i'm moving bug #7000000 to affect linux instead of alsa-driver23:57
dtchenok, with that covered, let's cover the easiest part first:23:57
dtchenalsa-plugins bugs are ones like "Skype didn't work until I downloaded V2.1"23:58
dtchenor "OpenArena explodes when I use PulseAudio" (thanks, fta)23:58
dtchenor "32-bit Adobe Flash on my 64-bit machine makes a spoo noise, and my cat died"23:59
dtchenIn other words, alsa-plugins are ones where the PulseAudio reroute is clearly to blame23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!