[alsa-devel] Tegra driver silent running on linux-next
Mark,
I've made the Tegra audio driver compile against ALSA's -next, and it seems like it's working; the files in /sys/kernel/debug/asoc contain everything I'd expect, aplay -[lL] list what I'd expect, aplay runs without errors and completes after the expected about of time, same for speaker-test.
However, the headphones are completely silent.
Note that all I've done is take the patchset I posted here, and make it compile against ALSA -next. I haven't yet fixed any of the feedback you gave.
I wondered if that was due to missing DAPM/routing information in harmony.c, so I added what I think is the minimum to get things working:
static const struct snd_soc_dapm_widget harmony_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", NULL), };
static const struct snd_soc_dapm_route audio_map[] = { { "Headphone Jack", NULL, "HPOUTL" }, { "Headphone Jack", NULL, "HPOUTR" }, };
static int harmony_asoc_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm;
snd_soc_dapm_new_controls(dapm, harmony_dapm_widgets, ARRAY_SIZE(harmony_dapm_widgets));
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
// Not sure if these should be there; existing drivers seem to // do things in different ways... snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); snd_soc_dapm_sync(dapm);
return 0; }
static struct snd_soc_dai_link harmony_wm8903_dai = { .init = harmony_asoc_init, ...
However, still silence. I dumped the wm8903 debug files and again they seem reasonable; see below.
Do you have any ideas what might be wrong; is there a requirement to call extra APIs from the machine driver now to set things up, or did the call order of some ops change? I don't see anything like that when diffing other drivers.
Thanks for any pointers.
localhost dapm # cat HPOUTL HPOUTL: On in 1 out 1 - R0(0x0) bit 0 in static Left Headphone Output PGA out static Headphone Jack localhost dapm # cat Left\ Headphone\ Output\ PGA Left Headphone Output PGA: On in 1 out 1 - R14(0xe) bit 1 in static Charge Pump in static Left Output Mixer out static HPOUTL localhost dapm # cat Charge\ Pump Charge Pump: On in 0 out 0 - R98(0x62) bit 0 out static Right Line Output PGA out static Left Line Output PGA out static Right Headphone Output PGA out static Left Headphone Output PGA localhost dapm # cat Left\ Output\ Mixer Left Output Mixer: On in 1 out 2 - R13(0xd) bit 1 in DACL Switch DACL out static Left Headphone Output PGA out static Left Line Output PGA localhost dapm # cat DACL DACL: On in 1 out 2 - R18(0x12) bit 3 stream Left Playback inactive in static CLK_DSP in static DACL Sidetone out DACL Switch Left Output Mixer localhost dapm # cat CLK_DSP CLK_DSP: On in 0 out 0 - R22(0x16) bit 1 out static DACR out static DACL out static ADCR out static ADCL localhost dapm # cat DACL\ Sidetone DACL Sidetone: On in 1 out 2 in Left ADCL out static DACL
Stephen Warren wrote:
I've made the Tegra audio driver compile against ALSA's -next, and it seems like it's working; the files in /sys/kernel/debug/asoc contain everything I'd expect, aplay -[lL] list what I'd expect, aplay runs without errors and completes after the expected about of time, same for speaker-test.
However, the headphones are completely silent.
Bah, it's working now. Tegra wasn't driving anything on the codec's MCLK input. I thought I'd checked all the Tegra clock programming, but obviously not well enough...
(and for reference, the DAPM/routing calls I added weren't actually required)
Sorry for the noise.
participants (1)
-
Stephen Warren