Alsa-devel
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2008
- 81 participants
- 219 discussions
08 Aug '08
On 31-07-08 21:03, Krzysztof Helt wrote:
Takashi, you already applied these but is it possible to still get my
Acked-by (or Reviewed-by, whatever you want) on them? When a problem is
bisected to one of these, people tend to put the people in the patch
tags in CC and I looked at them and would like to be informed of any
trouble. I tested most users by now, and we'll get the azt2320 fixed
before this hits the streets but I still like to be in the loop on any
traffic concerning them.
Acked-by: Rene Herman <rene.herman(a)gmail.com>
(or Reviewed-by, Tested-by, ...)
Below comments not important:
> @@ -679,23 +679,25 @@ static int __devinit snd_opl3sa2_probe(s
[ ... ]
> - chip->cs4231 = cs4231;
> - if ((err = snd_cs4231_pcm(cs4231, 0, NULL)) < 0)
> + chip->wss = wss;
> + err = snd_wss_pcm(wss, 0, NULL);
> + if (err < 0)
> return err;
> - if ((err = snd_cs4231_mixer(cs4231)) < 0)
> + err = snd_wss_mixer(wss);
> + if (err < 0)
> return err;
> if ((err = snd_opl3sa2_mixer(chip)) < 0)
> return err;
<mumble>
> - if ((err = snd_cs4231_timer(cs4231, 0, NULL)) < 0)
> + err = snd_wss_timer(wss, 0, NULL);
> + if (err < 0)
> return err;
[ ... ]
> +static void snd_wss_debug(struct snd_wss *chip)
> + printk(KERN_DEBUG
> + " 0x00: left input = 0x%02x "
> + " 0x10: alt 1 (CFIG 2) = 0x%02x\n",
> + snd_wss_in(chip, 0x00),
> + snd_wss_in(chip, 0x10));
> + printk(KERN_DEBUG
> + " 0x01: right input = 0x%02x "
> + " 0x11: alt 2 (CFIG 3) = 0x%02x\n",
> + snd_wss_in(chip, 0x01),
> + snd_wss_in(chip, 0x11));
I'll admit that's actually half-way passable...
> @@ -553,79 +628,88 @@ static void snd_wss_playback_format(s
[ ... ]
> if (full_calib) {
> - snd_cs4231_mce_up(chip);
> + snd_wss_mce_up(chip);
> spin_lock_irqsave(&chip->reg_lock, flags);
> - if (chip->hardware != CS4231_HW_INTERWAVE && !chip->single_dma) {
> - snd_cs4231_out(chip, CS4231_PLAYBK_FORMAT,
> - (chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE) ?
> - (pdfr & 0xf0) | (chip->image[CS4231_REC_FORMAT] & 0x0f) :
> - pdfr);
> + if (chip->hardware != WSS_HW_INTERWAVE && !chip->single_dma) {
> + if (chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE)
> + pdfr = (pdfr & 0xf0) |
> + (chip->image[CS4231_REC_FORMAT] & 0x0f);
> } else {
> - snd_cs4231_out(chip, CS4231_PLAYBK_FORMAT, chip->image[CS4231_PLAYBK_FORMAT] = pdfr);
> + chip->image[CS4231_PLAYBK_FORMAT] = pdfr;
> }
> + snd_wss_out(chip, CS4231_PLAYBK_FORMAT, pdfr);
> spin_unlock_irqrestore(&chip->reg_lock, flags);
Much beter.
> +static void snd_wss_capture_format(struct snd_wss *chip,
[ ... ]
> - snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] | 0x20);
> - snd_cs4231_out(chip, CS4231_REC_FORMAT, chip->image[CS4231_REC_FORMAT] = cdfr);
> - snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] &= ~0x20);
> + snd_wss_out(chip, CS4231_ALT_FEATURE_1,
> + chip->image[CS4231_ALT_FEATURE_1] | 0x20);
> + snd_wss_out(chip, CS4231_REC_FORMAT,
> + chip->image[CS4231_REC_FORMAT] = cdfr);
Not much better...
> + snd_wss_out(chip, CS4231_ALT_FEATURE_1,
> + chip->image[CS4231_ALT_FEATURE_1] &= ~0x20);
Same level of betterness.
Rene.
2
4
My audio driver supports buffer sizes from 128 to 32768 and period sizes
from 8 to 2048. I am trying to set the period size as 1030 (just a random
number between 8 & 2048, but not multiple of 2^n) and buffer size as
16*buffer_size (i.e. 16480). The output is as follows:
Buffer size range from 128 to 32768
Period size range from 8 to 2048
Request period size 1030 and got 1030
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 16480
period_size : 1030
period_time : 23356
tstamp_mode : NONE
period_step : 1
avail_min : 1030
start_threshold : 16480
stop_threshold : 16480
silence_threshold: 0
silence_size : 0
boundary : 1080033280
The problem with this setup is the application just hangs without playing
anything. If I use period size as 2048, the app plays the song but clips the
last part of it. If I use 1024/512, it works fine.
I have tried alsa lib version 1.0.15 & 1.0.16 but the problem persists. Is
there anything wrong with my app or audio driver?
Please help.
Thanks in advance,
Anuj Aggarwal
3
7
[alsa-devel] Can't build alsa-driver git, missing isa/wss directory.
by Eliot Blennerhassett 08 Aug '08
by Eliot Blennerhassett 08 Aug '08
08 Aug '08
after recent git-pull of alsa-kmirror, I can no longer build alsa-driver
Seems the isa/wss (present in alsa-kmirror) directory is missing from
alsa-driver?
regards
--
Eliot Blennerhassett
www.audioscience.com
2
1
[alsa-devel] Esi Maya44 pci:include the existing patch in the next alsa release
by Giuseppe Di Lernia 08 Aug '08
by Giuseppe Di Lernia 08 Aug '08
08 Aug '08
Hi,
I found this useful howto
http://ubuntuforums.org/showthread.php?p=5542917#post5542917
, to make it work the Egosys Maya44 pci under linux.
Unfortunately as the poster says, the patch for this card was not included in
the last Alsa driver release.So as the patch is working nicely I would like
request if the patch can be included in the next alsa driver release.
Regards
Giuseppe Di Lernia
2
1
In my _pointer callback function, I have this:
printk(KERN_INFO "%s:%u substream->pcm->dev=%p, substream->pcm->card->dev=%p\n",
__func__, __LINE__, substream->pcm->dev, substream->pcm->card->dev);
During playback, it displays this:
fsl_dma_pointer:698 substream->pcm->dev=00000000, substream->pcm->card->dev=dfa50a08
Why is substream->pcm->dev == NULL? What's the point of having this field if
you're not going to use it?
--
Timur Tabi
Linux kernel developer at Freescale
2
1
[alsa-devel] [PATCH] ALSA: fix DMA channel selection in Freescale MPC8610 sound drivers
by Timur Tabi 07 Aug '08
by Timur Tabi 07 Aug '08
07 Aug '08
On the Freescale MPC8610, SSI1 is hard-coded to use DMA channels 0 and 1
for playback and capture, and SSI2 is hard-coded to use DMA channels 2 and 3.
This patch fixes the fabric driver so that it uses the right channels.
Signed-off-by: Timur Tabi <timur(a)freescale.com>
---
sound/soc/fsl/mpc8610_hpcd.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 4bdc9d8..94f89de 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -68,10 +68,6 @@ static int mpc8610_hpcd_machine_probe(struct platform_device *sound_device)
guts_set_pmuxcr_dma(machine_data->guts, machine_data->dma_id,
machine_data->dma_channel_id[1], 0);
- guts_set_pmuxcr_dma(machine_data->guts, 1, 0, 0);
- guts_set_pmuxcr_dma(machine_data->guts, 1, 3, 0);
- guts_set_pmuxcr_dma(machine_data->guts, 0, 3, 0);
-
switch (machine_data->ssi_id) {
case 0:
clrsetbits_be32(&machine_data->guts->pmuxcr,
@@ -230,6 +226,8 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
struct fsl_ssi_info ssi_info;
struct fsl_dma_info dma_info;
int ret = -ENODEV;
+ unsigned int playback_dma_channel;
+ unsigned int capture_dma_channel;
machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL);
if (!machine_data)
@@ -381,8 +379,9 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
goto error;
}
- /* Find the DMA channels to use. For now, we always use the first DMA
- controller. */
+ /* Find the DMA channels to use. Both SSIs need to use the same DMA
+ * controller, so let's use DMA#1.
+ */
for_each_compatible_node(dma_np, NULL, "fsl,mpc8610-dma") {
iprop = of_get_property(dma_np, "cell-index", NULL);
if (iprop && (*iprop == 0)) {
@@ -397,14 +396,19 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
}
machine_data->dma_id = *iprop;
+ /* SSI1 needs to use DMA Channels 0 and 1, and SSI2 needs to use DMA
+ * channels 2 and 3. This is just how the MPC8610 is wired
+ * internally.
+ */
+ playback_dma_channel = (machine_data->ssi_id == 0) ? 0 : 2;
+ capture_dma_channel = (machine_data->ssi_id == 0) ? 1 : 3;
+
/*
- * Find the DMA channels to use. For now, we always use DMA channel 0
- * for playback, and DMA channel 1 for capture.
+ * Find the DMA channels to use.
*/
while ((dma_channel_np = of_get_next_child(dma_np, dma_channel_np))) {
iprop = of_get_property(dma_channel_np, "cell-index", NULL);
- /* Is it DMA channel 0? */
- if (iprop && (*iprop == 0)) {
+ if (iprop && (*iprop == playback_dma_channel)) {
/* dma_channel[0] and dma_irq[0] are for playback */
dma_info.dma_channel[0] = of_iomap(dma_channel_np, 0);
dma_info.dma_irq[0] =
@@ -412,7 +416,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
machine_data->dma_channel_id[0] = *iprop;
continue;
}
- if (iprop && (*iprop == 1)) {
+ if (iprop && (*iprop == capture_dma_channel)) {
/* dma_channel[1] and dma_irq[1] are for capture */
dma_info.dma_channel[1] = of_iomap(dma_channel_np, 0);
dma_info.dma_irq[1] =
--
1.5.5
2
1
[alsa-devel] Dell Studio 15 - aka Inspiron 1535 sound problems: HDA intel and codec IDT (STAC) 92HD73C1X5
by Andrea Venturi 07 Aug '08
by Andrea Venturi 07 Aug '08
07 Aug '08
hi, i own a brand new Dell laptop Studio 15
the audio speakers stay mute if i play an audio file. :-|
i'm using debian lenny kernel.
it seems to me a wrong port mapping. i put in place a newer Alsa 1.0.17
kernel modules with debug enabled, but still no sound.
i append some relevant info about HW, alsa dmesg and codec description
you can find more info about this laptop and the audio not workig here
(look for audio support):
http://www.avalpa.com/assets/andrea/studio15/debian_on_dell_studio15.html
this is the dmesg detection WHEN i tried to remove the Subsystem Id:
0x10280254 autodetection (because it catches my subsystem albeit it says
"unknown Dell"!)
i'd really like to help more and try to solve myself the quirks of this
new laptop but this NID stuff with the port/mixer configuration is
really beyond a casual user workload.
let me know if you need more info.
bye
andrea Venturi
[36685.486337] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:2069:
chipset global capabilities = 0x4401
[36685.514673] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:754:
codec_mask = 0x1
[36685.516706] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:3501:
hda_codec: Unknown model for STAC92HD73XX, using BIOS defaults
[36685.516843] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0a bios pin config 0321101f
[36685.516921] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0b bios pin config 4f00000f
[36685.516992] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0c bios pin config 4f0000f0
[36685.517068] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0d bios pin config 90170110
[36685.517138] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0e bios pin config 03a11020
[36685.517214] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 0f bios pin config 0321101f
[36685.517315] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 10 bios pin config 4f0000f0
[36685.517392] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 11 bios pin config 4f0000f0
[36685.517461] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 12 bios pin config 4f0000f0
[36685.517537] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 13 bios pin config 90a60160
[36685.517604] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 14 bios pin config 4f0000f0
[36685.517683] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 1e bios pin config 00000000
[36685.517752] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1813:
hda_codec: pin nid 22 bios pin config 4f0000f0
[36685.518466] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3030:
autoconfig: line_outs=1 (0xd/0x0/0x0/0x0/0x0)
[36685.518471] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3034:
speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[36685.518474] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3038:
hp_outs=2 (0xa/0xf/0x0/0x0/0x0)
[36685.518477] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3039:
mono: mono_out=0x0
[36685.518480] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3047:
inputs: mic=0xe, fmic=0x0, line=0x0, fline=0x0, cd=0x0, aux=0x0
[36685.518484] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:2249:
stac92xx_add_dyn_out_pins: total dac count=3
[36685.582821] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Center Playback Volume, skipped
[36685.582828] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave LFE Playback Volume, skipped
[36685.582832] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Side Playback Volume, skipped
[36685.582836] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Speaker Playback Volume, skipped
[36685.582840] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave External Speaker Playback Volume, skipped
[36685.582843] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Speaker2 Playback Volume, skipped
[36685.582850] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Center Playback Switch, skipped
[36685.582854] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave LFE Playback Switch, skipped
[36685.582857] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Side Playback Switch, skipped
[36685.582862] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Speaker Playback Switch, skipped
[36685.582865] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave External Speaker Playback Switch, skipped
[36685.582869] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave Speaker2 Playback Switch, skipped
[36685.582872] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136:
Cannot find slave IEC958 Playback Switch, skipped
[36685.585858] ACPI: PCI Interrupt 0000:01:00.1[B] -> GSI 17 (level,
low) -> IRQ 17
[36685.585886] PCI: Setting latency timer of device 0000:01:00.1 to 64
[36685.585891] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:2069:
chipset global capabilities = 0x1001
[36685.600103] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:754:
codec_mask = 0x1
[35851.601774] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:1390:
azx_pcm_prepare: bufsize=0x10000, format=0x31
[35851.601807] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725:
hda_codec_setup_stream: NID=0x15, stream=0x5, channel=0, format=0x31
[35851.609097] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725:
hda_codec_setup_stream: NID=0x17, stream=0x5, channel=0, format=0x31
[35851.617097] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725:
hda_codec_setup_stream: NID=0x16, stream=0x5, channel=0, format=0x31
[35851.628764] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725:
hda_codec_setup_stream: NID=0x17, stream=0x5, channel=0, format=0x31
[35855.924252] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737:
hda_codec_cleanup_stream: NID=0x15
[35855.924252] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737:
hda_codec_cleanup_stream: NID=0x16
[35855.924252] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737:
hda_codec_cleanup_stream: NID=0x17
[35855.924252] ALSA
/home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737:
hda_codec_cleanup_stream: NID=0x17
andrea@nb-andrea:~/mp3$
Codec: IDT 92HD73C1X5
Address: 0
Vendor Id: 0x111d7675
Subsystem Id: 0x10280254
Revision Id: 0x100202
No Modem Function Group found
Default PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1
GPIO: io=8, o=0, i=0, unsolicited=1, wake=1
IO[0]: enable=1, dir=1, wake=0, sticky=0, data=1
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0
Node 0x0a [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x08173f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 GRD 80
Pin Default 0x0321101f: [Jack] HP Out at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0xf
Pin-ctls: 0xc0: OUT HP VREF_HIZ
Unsolicited: tag=30, enabled=1
Connection: 4
0x15 0x16* 0x17 0x1e
Node 0x0b [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x08173f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 GRD 80
Pin Default 0x4f00000f: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0xf
Pin-ctls: 0x00: VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x0c [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x081737: IN OUT Detect Trigger ImpSense
Vref caps: HIZ 50 GRD 80
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00: VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x0d [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x083f: IN OUT HP Detect Trigger ImpSense
Pin Default 0x90170110: [Fixed] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x0e [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x081737: IN OUT Detect Trigger ImpSense
Vref caps: HIZ 50 GRD 80
Pin Default 0x03a11020: [Jack] Mic at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x0f [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x0837: IN OUT Detect Trigger ImpSense
Pin Default 0x0321101f: [Jack] HP Out at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0xf
Pin-ctls: 0x40: OUT
Unsolicited: tag=35, enabled=1
Connection: 4
0x15 0x16 0x17* 0x1e
Node 0x10 [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x0837: IN OUT Detect Trigger ImpSense
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x11 [Pin Complex] wcaps 0x400183: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x0837: IN OUT Detect Trigger ImpSense
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 4
0x15* 0x16 0x17 0x1e
Node 0x12 [Pin Complex] wcaps 0x400081: Stereo
Pincap 0x0824: IN Detect
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Node 0x13 [Pin Complex] wcaps 0x400003: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x0820: IN
Pin Default 0x90a60160: [Fixed] Mic at Int N/A
Conn = Digital, Color = Unknown
DefAssociation = 0x6, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Node 0x14 [Pin Complex] wcaps 0x400003: Stereo Amp-In
Amp-In caps: N/A
Amp-In vals: [0x00 0x00]
Pincap 0x0820: IN
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Node 0x15 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L
Amp-Out caps: N/A
Amp-Out vals: [0x41 0x41]
Converter: stream=5, channel=0
Power: setting=D0, actual=D0
Delay: 13 samples
Node 0x16 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L
Amp-Out caps: N/A
Amp-Out vals: [0x5a 0x5a]
Converter: stream=5, channel=0
Power: setting=D0, actual=D0
Delay: 13 samples
Node 0x17 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L
Amp-Out caps: N/A
Amp-Out vals: [0x0f 0x0f]
Converter: stream=5, channel=0
Power: setting=D0, actual=D0
Delay: 13 samples
Node 0x18 [Vendor Defined Widget] wcaps 0xfd0c05: Stereo Amp-Out R/L
Amp-Out caps: N/A
Amp-Out vals: [0xff 0xff]
Power: setting=D0, actual=D3
Delay: 13 samples
Node 0x19 [Vendor Defined Widget] wcaps 0xfd0c05: Stereo Amp-Out R/L
Amp-Out caps: N/A
Amp-Out vals: [0xff 0xff]
Power: setting=D0, actual=D3
Delay: 13 samples
Node 0x1a [Audio Input] wcaps 0x1d0541: Stereo
Converter: stream=0, channel=0
SDI-Select: 0
Power: setting=D0, actual=D0
Delay: 13 samples
Connection: 1
0x20
Processing caps: benign=0, ncoeff=0
Node 0x1b [Audio Input] wcaps 0x1d0541: Stereo
Converter: stream=0, channel=0
SDI-Select: 0
Power: setting=D0, actual=D0
Delay: 13 samples
Connection: 1
0x21
Processing caps: benign=0, ncoeff=0
Node 0x1c [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=1
Amp-Out vals: [0x00]
Node 0x1d [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97]
Connection: 5
0x28 0x29 0x2a 0x2b 0x12
Node 0x1e [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
Amp-Out vals: [0x9f 0x9f]
Connection: 1
0x1d
Node 0x1f [Volume Knob Widget] wcaps 0x600000: Mono
Volume-Knob: delta=1, steps=127, direct=1, val=108
Connection: 3
0x15* 0x16 0x17
Node 0x20 [Audio Selector] wcaps 0x30090d: Stereo Amp-Out R/L
Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1
Amp-Out vals: [0x80 0x80]
Connection: 12
0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x1d*
Node 0x21 [Audio Selector] wcaps 0x30090d: Stereo Amp-Out R/L
Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1
Amp-Out vals: [0x80 0x80]
Connection: 12
0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x1d*
Node 0x22 [Pin Complex] wcaps 0x400301: Stereo Digital
Pincap 0x0810: OUT
Pin Default 0x4f0000f0: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Connection: 3
0x25* 0x20 0x21
Node 0x23 [Pin Complex] wcaps 0x400301: Stereo Digital
Pincap 0x0810: OUT
Pin Default 0x4f00000f: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0xf
Pin-ctls: 0x00:
Connection: 3
0x26* 0x20 0x21
Node 0x24 [Pin Complex] wcaps 0x400681: Stereo Digital
Pincap 0x0810024: IN EAPD Detect
EAPD 0x0:
Pin Default 0x4f00000f: [N/A] Line Out at Ext UNKNOWN
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0xf
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Power: setting=D0, actual=D0
Node 0x25 [Audio Output] wcaps 0x4021d: Stereo Digital Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Delay: 4 samples
Node 0x26 [Audio Output] wcaps 0x4021d: Stereo Digital Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Delay: 4 samples
Node 0x27 [Audio Input] wcaps 0x14031b: Stereo Digital Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00]
Converter: stream=0, channel=0
SDI-Select: 0
Digital:
Digital category: 0x0
PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Delay: 4 samples
Connection: 1
0x24
Node 0x28 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0a 0x0b* 0x0d 0x0f
Node 0x29 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0a 0x0e* 0x10 0x11
Node 0x2a [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0b 0x0c* 0x10 0x11
Node 0x2b [Audio Selector] wcaps 0x300101: Stereo
Connection: 3
0x15* 0x16 0x17
[28308.279209] ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 21
[28308.279241] PCI: Setting latency timer of device 0000:00:1b.0 to 64
[28308.279248] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:2069: chipset global capabilities = 0x4401
[28308.311620] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:754: codec_mask = 0x1
[28308.313776] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:2359: hda_codec: model 'dell-m6' is selected for config 1028:254 (unknown Dell)
[28308.313926] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0a pin config 0321101f
[28308.314064] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0b pin config 4f00000f
[28308.314227] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0c pin config 4f0000f0
[28308.314355] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0d pin config 90170110
[28308.314499] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0e pin config 03a11020
[28308.314670] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 0f pin config 0321101f
[28308.314810] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 10 pin config 4f0000f0
[28308.314986] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 11 pin config 4f0000f0
[28308.315122] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 12 pin config 4f0000f0
[28308.315298] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 13 pin config 90a60160
[28308.315607] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 14 pin config 4f0000f0
[28308.315750] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 1e pin config 00000000
[28308.315896] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 22 pin config 4f0000f0
[28308.316125] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1840: hda_codec: pin nid 13 pin config 90a60160
[28308.316771] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3030: autoconfig: line_outs=1 (0xd/0x0/0x0/0x0/0x0)
[28308.316778] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3034: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[28308.316783] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3038: hp_outs=2 (0xa/0xf/0x0/0x0/0x0)
[28308.316789] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3039: mono: mono_out=0x0
[28308.316793] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:3047: inputs: mic=0xe, fmic=0x0, line=0x0, fline=0x0, cd=0x0, aux=0x0
[28308.316800] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:2249: stac92xx_add_dyn_out_pins: total dac count=3
[28308.385231] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Center Playback Volume, skipped
[28308.385237] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave LFE Playback Volume, skipped
[28308.385241] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Side Playback Volume, skipped
[28308.385245] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Speaker Playback Volume, skipped
[28308.385249] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave External Speaker Playback Volume, skipped
[28308.385252] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Speaker2 Playback Volume, skipped
[28308.385260] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Center Playback Switch, skipped
[28308.385264] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave LFE Playback Switch, skipped
[28308.385268] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Side Playback Switch, skipped
[28308.385274] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Speaker Playback Switch, skipped
[28308.385278] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave External Speaker Playback Switch, skipped
[28308.385283] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave Speaker2 Playback Switch, skipped
[28308.385287] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:1136: Cannot find slave IEC958 Playback Switch, skipped
[28308.385838] ACPI: PCI Interrupt 0000:01:00.1[B] -> GSI 17 (level, low) -> IRQ 17
[28308.385865] PCI: Setting latency timer of device 0000:01:00.1 to 64
[28308.385870] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:2069: chipset global capabilities = 0x1001
[28308.401066] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:754: codec_mask = 0x1
[28967.997654] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:1390: azx_pcm_prepare: bufsize=0x10000, format=0x31
[28967.997678] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x15, stream=0x5, channel=0, format=0x31
[28968.004577] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x17, stream=0x5, channel=0, format=0x31
[28968.016553] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x16, stream=0x5, channel=0, format=0x31
[28968.024471] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x17, stream=0x5, channel=0, format=0x31
[29032.180075] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x15
[29032.180075] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x16
[29032.180075] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
[29032.180075] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
[29429.525365] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/../../alsa-kernel/pci/hda/hda_intel.c:1390: azx_pcm_prepare: bufsize=0xff00, format=0x15
[29429.525395] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x15, stream=0x5, channel=0, format=0x15
[29429.529905] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x17, stream=0x5, channel=0, format=0x15
[29429.537901] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x16, stream=0x5, channel=2, format=0x15
[29429.557564] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:725: hda_codec_setup_stream: NID=0x17, stream=0x5, channel=4, format=0x15
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x15
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x16
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x15
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x16
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
[28761.447729] ALSA /home/andrea/src/alsa/alsa-driver-1.0.17/pci/hda/hda_codec.c:737: hda_codec_cleanup_stream: NID=0x17
nb-andrea
description: Portable Computer
product: Studio 1535
vendor: Dell Inc.
serial: BWZ7T3J
width: 32 bits
capabilities: smbios-2.4 dmi-2.4
configuration: boot=normal chassis=portable uuid=44454C4C-5700-105A-8037-C2C04F54334A
*-core
description: Motherboard
product: 0F700C
vendor: Dell Inc.
physical id: 0
serial: .BWZ7T3J.CN486438673307.
slot: @
*-firmware
description: BIOS
vendor: Dell Inc.
physical id: 0
version: A03 (07/02/2008)
size: 64KiB
capacity: 1984KiB
capabilities: isa pci pcmcia pnp upgrade shadowing cdboot bootselect int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb agp smartbattery biosbootspecification netboot
*-cpu
description: CPU
product: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz
vendor: Intel Corp.
physical id: 400
bus info: cpu@0
version: 6.7.6
serial: 0001-0676-0000-0000-0000-0000
slot: Microprocessor
size: 2101MHz
capacity: 2101MHz
width: 64 bits
clock: 200MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx x86-64 constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida cpufreq
configuration: id=0
*-cache:0
description: L1 cache
physical id: 700
size: 32KiB
capacity: 32KiB
capabilities: internal write-back data
*-cache:1
description: L2 cache
physical id: 701
size: 3MiB
capacity: 3MiB
clock: 66MHz (15.0ns)
capabilities: pipeline-burst internal varies unified
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
width: 64 bits
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
width: 64 bits
capabilities: logical
*-memory
description: System Memory
physical id: 1000
slot: System board or motherboard
size: 4GiB
*-bank:0
description: DIMM DDR Synchronous 667 MHz (1.5 ns)
product: HYMP125S64CP8-Y5
vendor: AD00000000000000
physical id: 0
serial: 00001106
slot: DIMM_A
size: 2GiB
width: 64 bits
clock: 667MHz (1.5ns)
*-bank:1
description: DIMM DDR Synchronous 667 MHz (1.5 ns)
product: HYMP125S64CP8-Y5
vendor: AD00000000000000
physical id: 1
serial: 00001045
slot: DIMM_B
size: 2GiB
width: 64 bits
clock: 667MHz (1.5ns)
*-pci
description: Host bridge
product: Mobile PM965/GM965/GL960 Memory Controller Hub
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 03
width: 32 bits
clock: 33MHz
*-pci:0
description: PCI bridge
product: Mobile PM965/GM965/GL960 PCI Express Root Port
vendor: Intel Corporation
physical id: 1
bus info: pci@0000:00:01.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: pci pm msi pciexpress bus_master cap_list
configuration: driver=pcieport-driver
*-display UNCLAIMED
description: VGA compatible controller
product: Mobilitiy Radeon HD 3400 Series
vendor: ATI Technologies Inc
physical id: 0
bus info: pci@0000:01:00.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list
configuration: latency=0
*-multimedia
description: Audio device
product: RV620 Audio device [Radeon HD 34xx Series]
vendor: ATI Technologies Inc
physical id: 0.1
bus info: pci@0000:01:00.1
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list
configuration: driver=HDA Intel latency=0 module=snd_hda_intel
*-usb:0
description: USB Controller
product: 82801H (ICH8 Family) USB UHCI Controller #4
vendor: Intel Corporation
physical id: 1a
bus info: pci@0000:00:1a.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: bus_master
configuration: driver=uhci_hcd latency=0 module=uhci_hcd
*-usbhost
product: UHCI Host Controller
vendor: Linux 2.6.25-2-686 uhci_hcd
physical id: 1
bus info: usb@1
logical name: usb1
version: 2.06
capabilities: usb-1.10
configuration: driver=hub slots=2 speed=12.0MB/s
*-usb:1
description: USB Controller
product: 82801H (ICH8 Family) USB UHCI Controller #5
vendor: Intel Corporation
physical id: 1a.1
bus info: pci@0000:00:1a.1
version: 03
width: 32 bits
clock: 33MHz
capabilities: bus_master
configuration: driver=uhci_hcd latency=0 module=uhci_hcd
*-usbhost
product: UHCI Host Controller
vendor: Linux 2.6.25-2-686 uhci_hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 2.06
capabilities: usb-1.10
configuration: driver=hub slots=2 speed=12.0MB/s
*-usb:2
description: USB Controller
product: 82801H (ICH8 Family) USB2 EHCI Controller #2
vendor: Intel Corporation
physical id: 1a.7
bus info: pci@0000:00:1a.7
version: 03
width: 32 bits
clock: 33MHz
capabilities: pm debug bus_master cap_list
configuration: driver=ehci_hcd latency=0 module=ehci_hcd
*-usbhost
product: EHCI Host Controller
vendor: Linux 2.6.25-2-686 ehci_hcd
physical id: 1
bus info: usb@6
logical name: usb6
version: 2.06
capabilities: usb-2.00
configuration: driver=hub slots=4 speed=480.0MB/s
*-multimedia
description: Audio device
product: 82801H (ICH8 Family) HD Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 03
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=HDA Intel latency=0 module=snd_hda_intel
*-pci:1
description: PCI bridge
product: 82801H (ICH8 Family) PCI Express Port 1
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm bus_master cap_list
configuration: driver=pcieport-driver
*-pci:2
description: PCI bridge
product: 82801H (ICH8 Family) PCI Express Port 2
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: 03
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm bus_master cap_list
configuration: driver=pcieport-driver
*-network UNCLAIMED
description: Network controller
product: BCM4322 802.11a/b/g/n Wireless LAN Controller
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:0c:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
*-pci:3
description: PCI bridge
product: 82801H (ICH8 Family) PCI Express Port 4
vendor: Intel Corporation
physical id: 1c.3
bus info: pci@0000:00:1c.3
version: 03
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm bus_master cap_list
configuration: driver=pcieport-driver
*-pci:4
description: PCI bridge
product: 82801H (ICH8 Family) PCI Express Port 6
vendor: Intel Corporation
physical id: 1c.5
bus info: pci@0000:00:1c.5
version: 03
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm bus_master cap_list
configuration: driver=pcieport-driver
*-network
description: Ethernet interface
product: NetLink BCM5784M Gigabit Ethernet PCIe
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:09:00.0
logical name: eth0
version: 10
serial: 00:21:70:71:70:82
capacity: 1GB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.91 latency=0 link=no module=tg3 multicast=yes port=twisted pair
*-usb:3
description: USB Controller
product: 82801H (ICH8 Family) USB UHCI Controller #1
vendor: Intel Corporation
physical id: 1d
bus info: pci@0000:00:1d.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: bus_master
configuration: driver=uhci_hcd latency=0 module=uhci_hcd
*-usbhost
product: UHCI Host Controller
vendor: Linux 2.6.25-2-686 uhci_hcd
physical id: 1
bus info: usb@3
logical name: usb3
version: 2.06
capabilities: usb-1.10
configuration: driver=hub slots=2 speed=12.0MB/s
*-usb:4
description: USB Controller
product: 82801H (ICH8 Family) USB UHCI Controller #2
vendor: Intel Corporation
physical id: 1d.1
bus info: pci@0000:00:1d.1
version: 03
width: 32 bits
clock: 33MHz
capabilities: bus_master
configuration: driver=uhci_hcd latency=0 module=uhci_hcd
*-usbhost
product: UHCI Host Controller
vendor: Linux 2.6.25-2-686 uhci_hcd
physical id: 1
bus info: usb@4
logical name: usb4
version: 2.06
capabilities: usb-1.10
configuration: driver=hub slots=2 speed=12.0MB/s
*-usb:5
description: USB Controller
product: 82801H (ICH8 Family) USB UHCI Controller #3
vendor: Intel Corporation
physical id: 1d.2
bus info: pci@0000:00:1d.2
version: 03
width: 32 bits
clock: 33MHz
capabilities: bus_master
configuration: driver=uhci_hcd latency=0 module=uhci_hcd
*-usbhost
product: UHCI Host Controller
vendor: Linux 2.6.25-2-686 uhci_hcd
physical id: 1
bus info: usb@5
logical name: usb5
version: 2.06
capabilities: usb-1.10
configuration: driver=hub slots=2 speed=12.0MB/s
*-usb:6
description: USB Controller
product: 82801H (ICH8 Family) USB2 EHCI Controller #1
vendor: Intel Corporation
physical id: 1d.7
bus info: pci@0000:00:1d.7
version: 03
width: 32 bits
clock: 33MHz
capabilities: pm debug bus_master cap_list
configuration: driver=ehci_hcd latency=0 module=ehci_hcd
*-usbhost
product: EHCI Host Controller
vendor: Linux 2.6.25-2-686 ehci_hcd
physical id: 1
bus info: usb@7
logical name: usb7
version: 2.06
capabilities: usb-2.00
configuration: driver=hub slots=6 speed=480.0MB/s
*-usb:0
description: Generic USB device
product: Compact Wireless-G USB Adapter
vendor: Cisco-Linksys
physical id: 3
bus info: usb@7:3
version: 0.01
capabilities: usb-2.00
configuration: driver=rt73usb maxpower=300mA speed=480.0MB/s
*-usb:1 UNCLAIMED
description: Video
product: Laptop_Integrated_Webcam_2M
vendor: SONiX Technology Inc.
physical id: 5
bus info: usb@7:5
version: 82.29
serial: CN0TX613724878570GRK
capabilities: usb-2.00
configuration: maxpower=168mA speed=480.0MB/s
*-pci:5
description: PCI bridge
product: 82801 Mobile PCI Bridge
vendor: Intel Corporation
physical id: 1e
bus info: pci@0000:00:1e.0
version: f3
width: 32 bits
clock: 33MHz
capabilities: pci bus_master cap_list
*-firewire
description: FireWire (IEEE 1394)
product: R5C832 IEEE 1394 Controller
vendor: Ricoh Co Ltd
physical id: 1
bus info: pci@0000:03:01.0
version: 05
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: driver=firewire_ohci latency=64 maxlatency=4 mingnt=2 module=firewire_ohci
*-system:0
description: SD Host controller
product: R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
vendor: Ricoh Co Ltd
physical id: 1.1
bus info: pci@0000:03:01.1
version: 22
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: driver=sdhci latency=64 module=sdhci
*-system:1
description: System peripheral
product: R5C592 Memory Stick Bus Host Adapter
vendor: Ricoh Co Ltd
physical id: 1.2
bus info: pci@0000:03:01.2
version: 12
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: driver=ricoh-mmc latency=64 module=ricoh_mmc
*-system:2 UNCLAIMED
description: System peripheral
product: xD-Picture Card Controller
vendor: Ricoh Co Ltd
physical id: 1.3
bus info: pci@0000:03:01.3
version: 12
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: latency=64
*-generic UNCLAIMED
product: Illegal Vendor ID
vendor: Illegal Vendor ID
physical id: 1.4
bus info: pci@0000:03:01.4
version: ff
width: 32 bits
clock: 66MHz
capabilities: bus_master vga_palette cap_list
configuration: latency=255 maxlatency=255 mingnt=255
*-isa
description: ISA bridge
product: 82801HEM (ICH8M) LPC Interface Controller
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: isa bus_master cap_list
configuration: latency=0
*-storage
description: SATA controller
product: 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
logical name: scsi0
logical name: scsi1
version: 03
width: 32 bits
clock: 66MHz
capabilities: storage msi pm bus_master cap_list emulated
configuration: driver=ahci latency=0 module=ahci
*-disk
description: ATA Disk
product: WDC WD2500BEVS-7
vendor: Western Digital
physical id: 0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 01.0
serial: WD-WXC508631049
size: 232GiB (250GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 signature=d0000000
*-volume:0
description: Windows FAT volume
vendor: Dell 8.0
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
version: FAT16
serial: 07d8-070e
size: 133MiB
capacity: 133MiB
capabilities: primary fat initialized
configuration: FATs=2 filesystem=fat label=DellUtility
*-volume:1
description: Windows NTFS volume
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
version: 3.1
serial: 14ca05d0-bd30-df49-ac54-ceb855b49101
size: 10233MiB
capacity: 10GiB
capabilities: primary ntfs initialized
configuration: clustersize=4096 created=2008-07-15 04:39:34 filesystem=ntfs label=RECOVERY state=clean
*-volume:2
description: Windows NTFS volume
physical id: 3
bus info: scsi@0:0.0.0,3
logical name: /dev/sda3
version: 3.1
serial: 12b8b13e-70d7-f94e-8145-d15e37ccf210
size: 123GiB
capacity: 123GiB
capabilities: primary bootable ntfs initialized
configuration: clustersize=4096 created=2008-07-15 04:39:39 filesystem=ntfs label=OS state=clean
*-volume:3
description: Extended partition
physical id: 4
bus info: scsi@0:0.0.0,4
logical name: /dev/sda4
size: 99GiB
capacity: 99GiB
capabilities: primary extended partitioned partitioned:extended
*-logicalvolume:0
description: Linux filesystem partition
physical id: 5
logical name: /dev/sda5
capacity: 9538MiB
*-logicalvolume:1
description: Linux filesystem partition
physical id: 6
logical name: /dev/sda6
logical name: /
capacity: 9538MiB
configuration: mount.fstype=ext3 mount.options=rw,noatime,errors=remount-ro,data=ordered state=mounted
*-logicalvolume:2
description: Linux filesystem partition
physical id: 7
logical name: /dev/sda7
logical name: /home
capacity: 80GiB
configuration: mount.fstype=ext3 mount.options=rw,errors=continue,data=ordered state=mounted
*-cdrom
description: DVD-RAM writer
product: DVDRWBD BC-5600S
vendor: Optiarc
physical id: 1
bus info: scsi@1:0.0.0
logical name: /dev/cdrom
logical name: /dev/cdrw
logical name: /dev/dvd
logical name: /dev/dvdrw
logical name: /dev/scd0
logical name: /dev/sr0
version: 103B
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=open
*-serial
description: SMBus
product: 82801H (ICH8 Family) SMBus Controller
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 03
width: 32 bits
clock: 33MHz
configuration: driver=i801_smbus latency=0 module=i2c_i801
*-battery
product: DELL WU94687
vendor: Samsung SDI
physical id: 1
slot: Sys. Battery Bay
capacity: 52000mWh
configuration: voltage=11.1V
*-network
description: Wireless interface
physical id: 2
logical name: wlan0
serial: 00:1d:7e:97:83:82
capabilities: ethernet physical wireless
configuration: broadcast=yes ip=192.168.1.69 multicast=yes wireless=IEEE 802.11g
2
3
Dne Friday 01 of August 2008 19:59:44 Nitin Mahajan napsal(a):
> HI!
>
> --- On Fri, 1/8/08, Marek Vasut <marek.vasut(a)gmail.com> wrote:
> > From: Marek Vasut <marek.vasut(a)gmail.com>
> > Subject: Re: [alsa-devel] WM9712 Not Giving output
> > To: alsa-devel(a)alsa-project.org, nitinm76(a)yahoo.com
> > Date: Friday, 1 August, 2008, 11:10 PM
> > Dne Friday 01 of August 2008 19:27:24 Nitin Mahajan
> >
> > napsal(a):
> > > HI!
> > >
> > > --- On Fri, 1/8/08, Mark Brown
> >
> > <broonie(a)opensource.wolfsonmicro.com> wrote:
> > > > From: Mark Brown
> >
> > <broonie(a)opensource.wolfsonmicro.com>
> >
> > > > Subject: Re: [alsa-devel] WM9712 Not Giving
> >
> > output
> >
> > > > To: "Nitin Mahajan"
> >
> > <nitinm76(a)yahoo.com>
> >
> > > > Cc: alsa-devel(a)alsa-project.org,
> >
> > "Manuel" <mano(a)roarinelk.homelinux.net>
> >
> > > > Date: Friday, 1 August, 2008, 9:32 PM
> > > > On Fri, Aug 01, 2008 at 08:31:03AM -0700, Nitin
> >
> > Mahajan
> >
> > > > wrote:
> > > > > I am using a WM9712 codec chip with the AC97
> > > >
> > > > controller on AMD AU1250.
> > > >
> > > > > Linux kernel version 2.6.24.2.
> > > > >
> > > > > On AC97 controller's side, I can see the
> >
> > DMA
> >
> > > > happening on the host
> > > >
> > > > > processor, interrupts also coming.
> > > >
> > > > This suggests a mixer configuration problem.
> > > >
> > > > > On the mixer front, I did unmute and set the
> >
> > vol to
> >
> > > > max for PCM and
> > > >
> > > > > Headphone. I did not find any Master control
> >
> > with this
> >
> > > > chip. Isn't
> > > >
> > > > > there any master control with this chip?
> > > >
> > > > No.
> > >
> > > If Master is not there, logically are the enough for
> >
> > playback?
> >
> > > amixer set 'PCM' 255 unmute
> > > amixer set 'Headphone' 255 unmute
> > >
> > > > > Can some one please throw more light on the
> >
> > Mixer
> >
> > > > part, specific to
> > > >
> > > > > this chip.
> > > > >
> > > > > What Mixer controls do I need to set with
> >
> > what values
> >
> > > > for playback and
> > > >
> > > > > capture respectively with this chip?
> > > >
> > > > Check the configuration of the Left HP Mixer and
> >
> > Right HP
> >
> > > > Mixer PCM
> > > > Playback switches. These should be enabled in
> >
> > order to
> >
> > > > play back via
> > > > the headphone output.
> > >
> > > While writing the reply , the hardware is not with me.
> > > But I wil check these tommorow.
> > >
> > > > If you still can't get audio output with that
> >
> > please
> >
> > > > send a copy of your
> > > > mixer configuration - run the command
> > > >
> > > > alsactl store -f mixer-config
> > > >
> > > > to write a file 'mixer-config' with this
> > > > information in it. Please
> > > > also check your kernel log from when the driver
> >
> > is loaded
> >
> > > > and when you
> > > > configure the mixer.
> > > >
> > > > There is documentation of the audio paths
> >
> > supported by the
> >
> > > > chip in the
> > >
> > > I saw the figure in the datasheet, its quite
> >
> > explainatory, as to which
> >
> > > registers are involved in which path.
> > >
> > > > datasheet, available from:
> > > >
> > > > http://www.wolfsonmicro.com/products/WM9712/
> > > >
> > > >
> > > > and you may find the audio route mappings in the
> >
> > WM9712
> >
> > > > driver useful to
> > > > refer to - the 'audio_map' table in the
> >
> > driver
> >
> > > > which shows how the parts
> > > > of the device are connected. The format is {
> >
> > destination,
> >
> > > > control,
> > > > source }.
> > >
> > > Thanks and regards
> > >
> > > -Nitin
> > >
> > > Send instant messages to your online friends
> >
> > http://uk.messenger.yahoo.com
> >
> > > _______________________________________________
> > > Alsa-devel mailing list
> > > Alsa-devel(a)alsa-project.org
> >
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
> > Hi,
> > try searching the mailing list for "[PATCH] wm9712
> > mono mixer". That may help
> > you.
>
> Interesting, do you mean that "Right HP Mixer" and "Left HP Mixer" should
> be "Right Mixer" and "Left Mixer" ?
>
> thanks and regards
>
> -Nitin
yea, and you should see alsa warning about it in kernel log as well.
>
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel(a)alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
This message wasnt CCed to alsa-devel, re-adding.
3
8
Hello,
do you have any information about realtek codec ALC1200. Is it
supported in ALSA. I was not able to find any informations about it.
Thank you
Stanislav David
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
2
1
The WM8580 is an audio CODEC designed for DVD and surround sound
applications, offering three stereo DACs and a stereo ADC.
Signed-off-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
---
sound/soc/codecs/Kconfig | 4 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/wm8580.c | 1055 +++++++++++++++++++++++++++++++++++++++++++++
sound/soc/codecs/wm8580.h | 42 ++
4 files changed, 1103 insertions(+), 0 deletions(-)
create mode 100644 sound/soc/codecs/wm8580.c
create mode 100644 sound/soc/codecs/wm8580.h
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index d7bacf6..eb79c5c 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -5,6 +5,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_AK4535
select SND_SOC_UDA1380
select SND_SOC_WM8510
+ select SND_SOC_WM8580
select SND_SOC_WM8731
select SND_SOC_WM8750
select SND_SOC_WM8753
@@ -38,6 +39,9 @@ config SND_SOC_UDA1380
config SND_SOC_WM8510
tristate
+config SND_SOC_WM8580
+ tristate
+
config SND_SOC_WM8731
tristate
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 98808d9..7c694ca 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -3,6 +3,7 @@ snd-soc-ad1980-objs := ad1980.o
snd-soc-ak4535-objs := ak4535.o
snd-soc-uda1380-objs := uda1380.o
snd-soc-wm8510-objs := wm8510.o
+snd-soc-wm8580-objs := wm8580.o
snd-soc-wm8731-objs := wm8731.o
snd-soc-wm8750-objs := wm8750.o
snd-soc-wm8753-objs := wm8753.o
@@ -19,6 +20,7 @@ obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o
obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o
obj-$(CONFIG_SND_SOC_UDA1380) += snd-soc-uda1380.o
obj-$(CONFIG_SND_SOC_WM8510) += snd-soc-wm8510.o
+obj-$(CONFIG_SND_SOC_WM8580) += snd-soc-wm8580.o
obj-$(CONFIG_SND_SOC_WM8731) += snd-soc-wm8731.o
obj-$(CONFIG_SND_SOC_WM8750) += snd-soc-wm8750.o
obj-$(CONFIG_SND_SOC_WM8753) += snd-soc-wm8753.o
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
new file mode 100644
index 0000000..df1ffbe
--- /dev/null
+++ b/sound/soc/codecs/wm8580.c
@@ -0,0 +1,1055 @@
+/*
+ * wm8580.c -- WM8580 ALSA Soc Audio driver
+ *
+ * Copyright 2008 Wolfson Microelectronics PLC.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * Notes:
+ * The WM8580 is a multichannel codec with S/PDIF support, featuring six
+ * DAC channels and two ADC channels.
+ *
+ * Currently only the primary audio interface is supported - S/PDIF and
+ * the secondary audio interfaces are not.
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/pm.h>
+#include <linux/i2c.h>
+#include <linux/platform_device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+#include <sound/tlv.h>
+#include <sound/initval.h>
+#include <asm/div64.h>
+
+#include "wm8580.h"
+
+#define AUDIO_NAME "wm8580"
+#define WM8580_VERSION "0.1"
+
+struct pll_state {
+ unsigned int in;
+ unsigned int out;
+};
+
+/* codec private data */
+struct wm8580_priv {
+ struct pll_state a;
+ struct pll_state b;
+};
+
+/* WM8580 register space */
+#define WM8580_PLLA1 0x00
+#define WM8580_PLLA2 0x01
+#define WM8580_PLLA3 0x02
+#define WM8580_PLLA4 0x03
+#define WM8580_PLLB1 0x04
+#define WM8580_PLLB2 0x05
+#define WM8580_PLLB3 0x06
+#define WM8580_PLLB4 0x07
+#define WM8580_CLKSEL 0x08
+#define WM8580_PAIF1 0x09
+#define WM8580_PAIF2 0x0A
+#define WM8580_SAIF1 0x0B
+#define WM8580_PAIF3 0x0C
+#define WM8580_PAIF4 0x0D
+#define WM8580_SAIF2 0x0E
+#define WM8580_DAC_CONTROL1 0x0F
+#define WM8580_DAC_CONTROL2 0x10
+#define WM8580_DAC_CONTROL3 0x11
+#define WM8580_DAC_CONTROL4 0x12
+#define WM8580_DAC_CONTROL5 0x13
+#define WM8580_DIGITAL_ATTENUATION_DACL1 0x14
+#define WM8580_DIGITAL_ATTENUATION_DACR1 0x15
+#define WM8580_DIGITAL_ATTENUATION_DACL2 0x16
+#define WM8580_DIGITAL_ATTENUATION_DACR2 0x17
+#define WM8580_DIGITAL_ATTENUATION_DACL3 0x18
+#define WM8580_DIGITAL_ATTENUATION_DACR3 0x19
+#define WM8580_MASTER_DIGITAL_ATTENUATION 0x1C
+#define WM8580_ADC_CONTROL1 0x1D
+#define WM8580_SPDTXCHAN0 0x1E
+#define WM8580_SPDTXCHAN1 0x1F
+#define WM8580_SPDTXCHAN2 0x20
+#define WM8580_SPDTXCHAN3 0x21
+#define WM8580_SPDTXCHAN4 0x22
+#define WM8580_SPDTXCHAN5 0x23
+#define WM8580_SPDMODE 0x24
+#define WM8580_INTMASK 0x25
+#define WM8580_GPO1 0x26
+#define WM8580_GPO2 0x27
+#define WM8580_GPO3 0x28
+#define WM8580_GPO4 0x29
+#define WM8580_GPO5 0x2A
+#define WM8580_INTSTAT 0x2B
+#define WM8580_SPDRXCHAN1 0x2C
+#define WM8580_SPDRXCHAN2 0x2D
+#define WM8580_SPDRXCHAN3 0x2E
+#define WM8580_SPDRXCHAN4 0x2F
+#define WM8580_SPDRXCHAN5 0x30
+#define WM8580_SPDSTAT 0x31
+#define WM8580_PWRDN1 0x32
+#define WM8580_PWRDN2 0x33
+#define WM8580_READBACK 0x34
+#define WM8580_RESET 0x35
+
+/* PLLB4 (register 7h) */
+#define WM8580_PLLB4_MCLKOUTSRC_MASK 0x60
+#define WM8580_PLLB4_MCLKOUTSRC_PLLA 0x20
+#define WM8580_PLLB4_MCLKOUTSRC_PLLB 0x40
+#define WM8580_PLLB4_MCLKOUTSRC_OSC 0x60
+
+#define WM8580_PLLB4_CLKOUTSRC_MASK 0x180
+#define WM8580_PLLB4_CLKOUTSRC_PLLACLK 0x080
+#define WM8580_PLLB4_CLKOUTSRC_PLLBCLK 0x100
+#define WM8580_PLLB4_CLKOUTSRC_OSCCLK 0x180
+
+/* CLKSEL (register 8h) */
+#define WM8580_CLKSEL_DAC_CLKSEL_MASK 0x03
+#define WM8580_CLKSEL_DAC_CLKSEL_PLLA 0x01
+#define WM8580_CLKSEL_DAC_CLKSEL_PLLB 0x02
+
+/* AIF control 1 (registers 9h-bh) */
+#define WM8580_AIF_RATE_MASK 0x7
+#define WM8580_AIF_RATE_128 0x0
+#define WM8580_AIF_RATE_192 0x1
+#define WM8580_AIF_RATE_256 0x2
+#define WM8580_AIF_RATE_384 0x3
+#define WM8580_AIF_RATE_512 0x4
+#define WM8580_AIF_RATE_768 0x5
+#define WM8580_AIF_RATE_1152 0x6
+
+#define WM8580_AIF_BCLKSEL_MASK 0x18
+#define WM8580_AIF_BCLKSEL_64 0x00
+#define WM8580_AIF_BCLKSEL_128 0x08
+#define WM8580_AIF_BCLKSEL_256 0x10
+#define WM8580_AIF_BCLKSEL_SYSCLK 0x18
+
+#define WM8580_AIF_MS 0x20
+
+#define WM8580_AIF_CLKSRC_MASK 0xc0
+#define WM8580_AIF_CLKSRC_PLLA 0x40
+#define WM8580_AIF_CLKSRC_PLLB 0x40
+#define WM8580_AIF_CLKSRC_MCLK 0xc0
+
+/* AIF control 2 (registers ch-eh) */
+#define WM8580_AIF_FMT_MASK 0x03
+#define WM8580_AIF_FMT_RIGHTJ 0x00
+#define WM8580_AIF_FMT_LEFTJ 0x01
+#define WM8580_AIF_FMT_I2S 0x02
+#define WM8580_AIF_FMT_DSP 0x03
+
+#define WM8580_AIF_LENGTH_MASK 0x0c
+#define WM8580_AIF_LENGTH_16 0x00
+#define WM8580_AIF_LENGTH_20 0x04
+#define WM8580_AIF_LENGTH_24 0x08
+#define WM8580_AIF_LENGTH_32 0x0c
+
+#define WM8580_AIF_LRP 0x10
+#define WM8580_AIF_BCP 0x20
+
+/* Powerdown Register 1 (register 32h) */
+#define WM8580_PWRDN1_PWDN 0x001
+#define WM8580_PWRDN1_ALLDACPD 0x040
+
+/* Powerdown Register 2 (register 33h) */
+#define WM8580_PWRDN2_OSSCPD 0x001
+#define WM8580_PWRDN2_PLLAPD 0x002
+#define WM8580_PWRDN2_PLLBPD 0x004
+#define WM8580_PWRDN2_SPDIFPD 0x008
+#define WM8580_PWRDN2_SPDIFTXD 0x010
+#define WM8580_PWRDN2_SPDIFRXD 0x020
+
+#define WM8580_DAC_CONTROL5_MUTEALL 0x10
+
+/*
+ * wm8580 register cache
+ * We can't read the WM8580 register space when we
+ * are using 2 wire for device control, so we cache them instead.
+ */
+static const u16 wm8580_reg[] = {
+ 0x0121, 0x017e, 0x007d, 0x0014, /*R3*/
+ 0x0121, 0x017e, 0x007d, 0x0194, /*R7*/
+ 0x001c, 0x0002, 0x0002, 0x00c2, /*R11*/
+ 0x0182, 0x0082, 0x000a, 0x0024, /*R15*/
+ 0x0009, 0x0000, 0x00ff, 0x0000, /*R19*/
+ 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R23*/
+ 0x00ff, 0x00ff, 0x00ff, 0x00ff, /*R27*/
+ 0x01f0, 0x0040, 0x0000, 0x0000, /*R31(0x1F)*/
+ 0x0000, 0x0000, 0x0031, 0x000b, /*R35*/
+ 0x0039, 0x0000, 0x0010, 0x0032, /*R39*/
+ 0x0054, 0x0076, 0x0098, 0x0000, /*R43(0x2B)*/
+ 0x0000, 0x0000, 0x0000, 0x0000, /*R47*/
+ 0x0000, 0x0000, 0x005e, 0x003e, /*R51(0x33)*/
+ 0x0000, 0x0000 /*R53*/
+};
+
+/*
+ * read wm8580 register cache
+ */
+static inline unsigned int wm8580_read_reg_cache(struct snd_soc_codec *codec,
+ unsigned int reg)
+{
+ u16 *cache = codec->reg_cache;
+ BUG_ON(reg > ARRAY_SIZE(wm8580_reg));
+ return cache[reg];
+}
+
+/*
+ * write wm8580 register cache
+ */
+static inline void wm8580_write_reg_cache(struct snd_soc_codec *codec,
+ unsigned int reg, unsigned int value)
+{
+ u16 *cache = codec->reg_cache;
+
+ cache[reg] = value;
+}
+
+/*
+ * write to the WM8580 register space
+ */
+static int wm8580_write(struct snd_soc_codec *codec, unsigned int reg,
+ unsigned int value)
+{
+ u8 data[2];
+
+ BUG_ON(reg > ARRAY_SIZE(wm8580_reg));
+
+ /* Registers are 9 bits wide */
+ value &= 0x1ff;
+
+ switch (reg) {
+ case WM8580_RESET:
+ /* Uncached */
+ break;
+ default:
+ if (value == wm8580_read_reg_cache(codec, reg))
+ return 0;
+ }
+
+ /* data is
+ * D15..D9 WM8580 register offset
+ * D8...D0 register data
+ */
+ data[0] = (reg << 1) | ((value >> 8) & 0x0001);
+ data[1] = value & 0x00ff;
+
+ wm8580_write_reg_cache(codec, reg, value);
+ if (codec->hw_write(codec->control_data, data, 2) == 2)
+ return 0;
+ else
+ return -EIO;
+}
+
+static inline unsigned int wm8580_read(struct snd_soc_codec *codec,
+ unsigned int reg)
+{
+ switch (reg) {
+ default:
+ return wm8580_read_reg_cache(codec, reg);
+ }
+}
+
+static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
+
+static int wm8580_out_vu(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ int reg = kcontrol->private_value & 0xff;
+ int reg2 = (kcontrol->private_value >> 24) & 0xff;
+ int ret;
+ u16 val;
+
+ /* Clear the register cache so we write without VU set */
+ wm8580_write_reg_cache(codec, reg, 0);
+ wm8580_write_reg_cache(codec, reg2, 0);
+
+ ret = snd_soc_put_volsw_2r(kcontrol, ucontrol);
+ if (ret < 0)
+ return ret;
+
+ /* Now write again with the volume update bit set */
+ val = wm8580_read_reg_cache(codec, reg);
+ wm8580_write(codec, reg, val | 0x0100);
+
+ val = wm8580_read_reg_cache(codec, reg2);
+ wm8580_write(codec, reg2, val | 0x0100);
+
+ return 0;
+}
+
+#define SOC_WM8580_OUT_DOUBLE_R_TLV(xname, reg_left, reg_right, shift, max, invert, tlv_array) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
+ .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
+ SNDRV_CTL_ELEM_ACCESS_READWRITE, \
+ .tlv.p = (tlv_array), \
+ .info = snd_soc_info_volsw_2r, \
+ .get = snd_soc_get_volsw_2r, .put = wm8580_out_vu, \
+ .private_value = (reg_left) | ((shift) << 8) | \
+ ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) }
+
+static const struct snd_kcontrol_new wm8580_snd_controls[] = {
+SOC_WM8580_OUT_DOUBLE_R_TLV("DAC1 Playback Volume",
+ WM8580_DIGITAL_ATTENUATION_DACL1,
+ WM8580_DIGITAL_ATTENUATION_DACR1,
+ 0, 0xff, 0, dac_tlv),
+SOC_WM8580_OUT_DOUBLE_R_TLV("DAC2 Playback Volume",
+ WM8580_DIGITAL_ATTENUATION_DACL2,
+ WM8580_DIGITAL_ATTENUATION_DACR2,
+ 0, 0xff, 0, dac_tlv),
+SOC_WM8580_OUT_DOUBLE_R_TLV("DAC3 Playback Volume",
+ WM8580_DIGITAL_ATTENUATION_DACL3,
+ WM8580_DIGITAL_ATTENUATION_DACR3,
+ 0, 0xff, 0, dac_tlv),
+
+SOC_SINGLE("DAC1 Deemphasis Switch", WM8580_DAC_CONTROL3, 0, 1, 0),
+SOC_SINGLE("DAC2 Deemphasis Switch", WM8580_DAC_CONTROL3, 1, 1, 0),
+SOC_SINGLE("DAC3 Deemphasis Switch", WM8580_DAC_CONTROL3, 2, 1, 0),
+
+SOC_DOUBLE("DAC1 Invert Switch", WM8580_DAC_CONTROL4, 0, 1, 1, 0),
+SOC_DOUBLE("DAC2 Invert Switch", WM8580_DAC_CONTROL4, 2, 3, 1, 0),
+SOC_DOUBLE("DAC3 Invert Switch", WM8580_DAC_CONTROL4, 4, 5, 1, 0),
+
+SOC_SINGLE("DAC ZC Switch", WM8580_DAC_CONTROL5, 5, 1, 0),
+SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 0),
+SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 0),
+SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 0),
+
+SOC_DOUBLE("ADC Mute Switch", WM8580_ADC_CONTROL1, 0, 1, 1, 0),
+SOC_SINGLE("ADC High-Pass Filter Switch", WM8580_ADC_CONTROL1, 4, 1, 0),
+};
+
+/* Add non-DAPM controls */
+static int wm8580_add_controls(struct snd_soc_codec *codec)
+{
+ int err, i;
+
+ for (i = 0; i < ARRAY_SIZE(wm8580_snd_controls); i++) {
+ err = snd_ctl_add(codec->card,
+ snd_soc_cnew(&wm8580_snd_controls[i],
+ codec, NULL));
+ if (err < 0)
+ return err;
+ }
+ return 0;
+}
+static const struct snd_soc_dapm_widget wm8580_dapm_widgets[] = {
+SND_SOC_DAPM_DAC("DAC1", "Playback", WM8580_PWRDN1, 2, 1),
+SND_SOC_DAPM_DAC("DAC2", "Playback", WM8580_PWRDN1, 3, 1),
+SND_SOC_DAPM_DAC("DAC3", "Playback", WM8580_PWRDN1, 4, 1),
+
+SND_SOC_DAPM_OUTPUT("VOUT1L"),
+SND_SOC_DAPM_OUTPUT("VOUT1R"),
+SND_SOC_DAPM_OUTPUT("VOUT2L"),
+SND_SOC_DAPM_OUTPUT("VOUT2R"),
+SND_SOC_DAPM_OUTPUT("VOUT3L"),
+SND_SOC_DAPM_OUTPUT("VOUT3R"),
+
+SND_SOC_DAPM_ADC("ADC", "Capture", WM8580_PWRDN1, 1, 1),
+
+SND_SOC_DAPM_INPUT("AINL"),
+SND_SOC_DAPM_INPUT("AINR"),
+};
+
+static const struct snd_soc_dapm_route audio_map[] = {
+ { "VOUT1L", NULL, "DAC1" },
+ { "VOUT1R", NULL, "DAC1" },
+
+ { "VOUT2L", NULL, "DAC2" },
+ { "VOUT2R", NULL, "DAC2" },
+
+ { "VOUT3L", NULL, "DAC3" },
+ { "VOUT3R", NULL, "DAC3" },
+
+ { "ADC", NULL, "AINL" },
+ { "ADC", NULL, "AINR" },
+};
+
+static int wm8580_add_widgets(struct snd_soc_codec *codec)
+{
+ snd_soc_dapm_new_controls(codec, wm8580_dapm_widgets,
+ ARRAY_SIZE(wm8580_dapm_widgets));
+
+ snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
+
+ snd_soc_dapm_new_widgets(codec);
+ return 0;
+}
+
+/* PLL divisors */
+struct _pll_div {
+ u32 prescale:1;
+ u32 postscale:1;
+ u32 freqmode:2;
+ u32 n:4;
+ u32 k:24;
+};
+
+/* The size in bits of the pll divide */
+#define FIXED_PLL_SIZE (1 << 22)
+
+/* PLL rate to output rate divisions */
+static struct {
+ unsigned int div;
+ unsigned int freqmode;
+ unsigned int postscale;
+} post_table[] = {
+ { 2, 0, 0 },
+ { 4, 0, 1 },
+ { 4, 1, 0 },
+ { 8, 1, 1 },
+ { 8, 2, 0 },
+ { 16, 2, 1 },
+ { 12, 3, 0 },
+ { 24, 3, 1 }
+};
+
+static int pll_factors(struct _pll_div *pll_div, unsigned int target,
+ unsigned int source)
+{
+ u64 Kpart;
+ unsigned int K, Ndiv, Nmod;
+ int i;
+
+ pr_debug("wm8580: PLL %dHz->%dHz\n", source, target);
+
+ /* Scale the output frequency up; the PLL should run in the
+ * region of 90-100MHz.
+ */
+ for (i = 0; i < ARRAY_SIZE(post_table); i++) {
+ if (target * post_table[i].div >= 90000000 &&
+ target * post_table[i].div <= 100000000) {
+ pll_div->freqmode = post_table[i].freqmode;
+ pll_div->postscale = post_table[i].postscale;
+ target *= post_table[i].div;
+ break;
+ }
+ }
+
+ if (i == ARRAY_SIZE(post_table)) {
+ printk(KERN_ERR "wm8580: Unable to scale output frequency "
+ "%u\n", target);
+ return -EINVAL;
+ }
+
+ Ndiv = target / source;
+
+ if (Ndiv < 5) {
+ source /= 2;
+ pll_div->prescale = 1;
+ Ndiv = target / source;
+ } else
+ pll_div->prescale = 0;
+
+ if ((Ndiv < 5) || (Ndiv > 13)) {
+ printk(KERN_ERR
+ "WM8580 N=%d outside supported range\n", Ndiv);
+ return -EINVAL;
+ }
+
+ pll_div->n = Ndiv;
+ Nmod = target % source;
+ Kpart = FIXED_PLL_SIZE * (long long)Nmod;
+
+ do_div(Kpart, source);
+
+ K = Kpart & 0xFFFFFFFF;
+
+ pll_div->k = K;
+
+ pr_debug("PLL %x.%x prescale %d freqmode %d postscale %d\n",
+ pll_div->n, pll_div->k, pll_div->prescale, pll_div->freqmode,
+ pll_div->postscale);
+
+ return 0;
+}
+
+static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai,
+ int pll_id, unsigned int freq_in, unsigned int freq_out)
+{
+ int offset;
+ struct snd_soc_codec *codec = codec_dai->codec;
+ struct wm8580_priv *wm8580 = codec->private_data;
+ struct pll_state *state;
+ struct _pll_div pll_div;
+ unsigned int reg;
+ unsigned int pwr_mask;
+ int ret;
+
+ /* GCC isn't able to work out the ifs below for initialising/using
+ * pll_div so suppress warnings.
+ */
+ memset(&pll_div, 0, sizeof(pll_div));
+
+ switch (pll_id) {
+ case WM8580_PLLA:
+ state = &wm8580->a;
+ offset = 0;
+ pwr_mask = WM8580_PWRDN2_PLLAPD;
+ break;
+ case WM8580_PLLB:
+ state = &wm8580->b;
+ offset = 4;
+ pwr_mask = WM8580_PWRDN2_PLLBPD;
+ break;
+ default:
+ return -ENODEV;
+ }
+
+ if (freq_in && freq_out) {
+ ret = pll_factors(&pll_div, freq_out, freq_in);
+ if (ret != 0)
+ return ret;
+ }
+
+ state->in = freq_in;
+ state->out = freq_out;
+
+ /* Always disable the PLL - it is not safe to leave it running
+ * while reprogramming it.
+ */
+ reg = wm8580_read(codec, WM8580_PWRDN2);
+ wm8580_write(codec, WM8580_PWRDN2, reg | pwr_mask);
+
+ if (!freq_in || !freq_out)
+ return 0;
+
+ wm8580_write(codec, WM8580_PLLA1 + offset, pll_div.k & 0x1ff);
+ wm8580_write(codec, WM8580_PLLA2 + offset, (pll_div.k >> 9) & 0xff);
+ wm8580_write(codec, WM8580_PLLA3 + offset,
+ (pll_div.k >> 18 & 0xf) | (pll_div.n << 4));
+
+ reg = wm8580_read(codec, WM8580_PLLA4 + offset);
+ reg &= ~0x3f;
+ reg |= pll_div.prescale | pll_div.postscale << 1 |
+ pll_div.freqmode << 4;
+
+ wm8580_write(codec, WM8580_PLLA4 + offset, reg);
+
+ /* All done, turn it on */
+ reg = wm8580_read(codec, WM8580_PWRDN2);
+ wm8580_write(codec, WM8580_PWRDN2, reg & ~pwr_mask);
+
+ return 0;
+}
+
+/*
+ * Set PCM DAI bit size and sample rate.
+ */
+static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_dai_link *dai = rtd->dai;
+ struct snd_soc_device *socdev = rtd->socdev;
+ struct snd_soc_codec *codec = socdev->codec;
+ u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->codec_dai->id);
+
+ paifb &= ~WM8580_AIF_LENGTH_MASK;
+ /* bit size */
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_S16_LE:
+ break;
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ paifb |= WM8580_AIF_LENGTH_20;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ paifb |= WM8580_AIF_LENGTH_24;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ paifb |= WM8580_AIF_LENGTH_24;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ wm8580_write(codec, WM8580_PAIF3 + dai->codec_dai->id, paifb);
+ return 0;
+}
+
+static int wm8580_set_paif_dai_fmt(struct snd_soc_dai *codec_dai,
+ unsigned int fmt)
+{
+ struct snd_soc_codec *codec = codec_dai->codec;
+ unsigned int aifa;
+ unsigned int aifb;
+ int can_invert_lrclk;
+
+ aifa = wm8580_read(codec, WM8580_PAIF1 + codec_dai->id);
+ aifb = wm8580_read(codec, WM8580_PAIF3 + codec_dai->id);
+
+ aifb &= ~(WM8580_AIF_FMT_MASK | WM8580_AIF_LRP | WM8580_AIF_BCP);
+
+ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
+ case SND_SOC_DAIFMT_CBS_CFS:
+ aifa &= ~WM8580_AIF_MS;
+ break;
+ case SND_SOC_DAIFMT_CBM_CFM:
+ aifa |= WM8580_AIF_MS;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+ case SND_SOC_DAIFMT_I2S:
+ can_invert_lrclk = 1;
+ aifb |= WM8580_AIF_FMT_I2S;
+ break;
+ case SND_SOC_DAIFMT_RIGHT_J:
+ can_invert_lrclk = 1;
+ aifb |= WM8580_AIF_FMT_RIGHTJ;
+ break;
+ case SND_SOC_DAIFMT_LEFT_J:
+ can_invert_lrclk = 1;
+ aifb |= WM8580_AIF_FMT_LEFTJ;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ can_invert_lrclk = 0;
+ aifb |= WM8580_AIF_FMT_DSP;
+ break;
+ case SND_SOC_DAIFMT_DSP_B:
+ can_invert_lrclk = 0;
+ aifb |= WM8580_AIF_FMT_DSP;
+ aifb |= WM8580_AIF_LRP;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
+ case SND_SOC_DAIFMT_NB_NF:
+ break;
+
+ case SND_SOC_DAIFMT_IB_IF:
+ if (!can_invert_lrclk)
+ return -EINVAL;
+ aifb |= WM8580_AIF_BCP;
+ aifb |= WM8580_AIF_LRP;
+ break;
+
+ case SND_SOC_DAIFMT_IB_NF:
+ aifb |= WM8580_AIF_BCP;
+ break;
+
+ case SND_SOC_DAIFMT_NB_IF:
+ if (!can_invert_lrclk)
+ return -EINVAL;
+ aifb |= WM8580_AIF_LRP;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ wm8580_write(codec, WM8580_PAIF1 + codec_dai->id, aifa);
+ wm8580_write(codec, WM8580_PAIF3 + codec_dai->id, aifb);
+
+ return 0;
+}
+
+static int wm8580_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
+ int div_id, int div)
+{
+ struct snd_soc_codec *codec = codec_dai->codec;
+ unsigned int reg;
+
+ switch (div_id) {
+ case WM8580_MCLK:
+ reg = wm8580_read(codec, WM8580_PLLB4);
+ reg &= ~WM8580_PLLB4_MCLKOUTSRC_MASK;
+
+ switch (div) {
+ case WM8580_CLKSRC_MCLK:
+ /* Input */
+ break;
+
+ case WM8580_CLKSRC_PLLA:
+ reg |= WM8580_PLLB4_MCLKOUTSRC_PLLA;
+ break;
+ case WM8580_CLKSRC_PLLB:
+ reg |= WM8580_PLLB4_MCLKOUTSRC_PLLB;
+ break;
+
+ case WM8580_CLKSRC_OSC:
+ reg |= WM8580_PLLB4_MCLKOUTSRC_OSC;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ wm8580_write(codec, WM8580_PLLB4, reg);
+ break;
+
+ case WM8580_DAC_CLKSEL:
+ reg = wm8580_read(codec, WM8580_CLKSEL);
+ reg &= ~WM8580_CLKSEL_DAC_CLKSEL_MASK;
+
+ switch (div) {
+ case WM8580_CLKSRC_MCLK:
+ break;
+
+ case WM8580_CLKSRC_PLLA:
+ reg |= WM8580_CLKSEL_DAC_CLKSEL_PLLA;
+ break;
+
+ case WM8580_CLKSRC_PLLB:
+ reg |= WM8580_CLKSEL_DAC_CLKSEL_PLLB;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ wm8580_write(codec, WM8580_CLKSEL, reg);
+ break;
+
+ case WM8580_CLKOUTSRC:
+ reg = wm8580_read(codec, WM8580_PLLB4);
+ reg &= ~WM8580_PLLB4_CLKOUTSRC_MASK;
+
+ switch (div) {
+ case WM8580_CLKSRC_NONE:
+ break;
+
+ case WM8580_CLKSRC_PLLA:
+ reg |= WM8580_PLLB4_CLKOUTSRC_PLLACLK;
+ break;
+
+ case WM8580_CLKSRC_PLLB:
+ reg |= WM8580_PLLB4_CLKOUTSRC_PLLBCLK;
+ break;
+
+ case WM8580_CLKSRC_OSC:
+ reg |= WM8580_PLLB4_CLKOUTSRC_OSCCLK;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ wm8580_write(codec, WM8580_PLLB4, reg);
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)
+{
+ struct snd_soc_codec *codec = codec_dai->codec;
+ unsigned int reg;
+
+ reg = wm8580_read(codec, WM8580_DAC_CONTROL5);
+
+ if (mute)
+ reg |= WM8580_DAC_CONTROL5_MUTEALL;
+ else
+ reg &= ~WM8580_DAC_CONTROL5_MUTEALL;
+
+ wm8580_write(codec, WM8580_DAC_CONTROL5, reg);
+
+ return 0;
+}
+
+static int wm8580_set_bias_level(struct snd_soc_codec *codec,
+ enum snd_soc_bias_level level)
+{
+ u16 reg;
+ switch (level) {
+ case SND_SOC_BIAS_ON:
+ case SND_SOC_BIAS_PREPARE:
+ case SND_SOC_BIAS_STANDBY:
+ break;
+ case SND_SOC_BIAS_OFF:
+ reg = wm8580_read(codec, WM8580_PWRDN1);
+ wm8580_write(codec, WM8580_PWRDN1, reg | WM8580_PWRDN1_PWDN);
+ break;
+ }
+ codec->bias_level = level;
+ return 0;
+}
+
+#define WM8580_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
+ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
+
+struct snd_soc_dai wm8580_dai[] = {
+ {
+ .name = "WM8580 PAIFRX",
+ .id = 0,
+ .playback = {
+ .stream_name = "Playback",
+ .channels_min = 1,
+ .channels_max = 6,
+ .rates = SNDRV_PCM_RATE_8000_192000,
+ .formats = WM8580_FORMATS,
+ },
+ .ops = {
+ .hw_params = wm8580_paif_hw_params,
+ },
+ .dai_ops = {
+ .set_fmt = wm8580_set_paif_dai_fmt,
+ .set_clkdiv = wm8580_set_dai_clkdiv,
+ .set_pll = wm8580_set_dai_pll,
+ .digital_mute = wm8580_digital_mute,
+ },
+ },
+ {
+ .name = "WM8580 PAIFTX",
+ .id = 1,
+ .capture = {
+ .stream_name = "Capture",
+ .channels_min = 2,
+ .channels_max = 2,
+ .rates = SNDRV_PCM_RATE_8000_192000,
+ .formats = WM8580_FORMATS,
+ },
+ .ops = {
+ .hw_params = wm8580_paif_hw_params,
+ },
+ .dai_ops = {
+ .set_fmt = wm8580_set_paif_dai_fmt,
+ .set_clkdiv = wm8580_set_dai_clkdiv,
+ .set_pll = wm8580_set_dai_pll,
+ },
+ },
+};
+EXPORT_SYMBOL_GPL(wm8580_dai);
+
+/*
+ * initialise the WM8580 driver
+ * register the mixer and dsp interfaces with the kernel
+ */
+static int wm8580_init(struct snd_soc_device *socdev)
+{
+ struct snd_soc_codec *codec = socdev->codec;
+ int ret = 0;
+
+ codec->name = "WM8580";
+ codec->owner = THIS_MODULE;
+ codec->read = wm8580_read_reg_cache;
+ codec->write = wm8580_write;
+ codec->set_bias_level = wm8580_set_bias_level;
+ codec->dai = wm8580_dai;
+ codec->num_dai = ARRAY_SIZE(wm8580_dai);
+ codec->reg_cache_size = ARRAY_SIZE(wm8580_reg);
+ codec->reg_cache = kmemdup(wm8580_reg, sizeof(wm8580_reg),
+ GFP_KERNEL);
+
+ if (codec->reg_cache == NULL)
+ return -ENOMEM;
+
+ /* Get the codec into a known state */
+ wm8580_write(codec, WM8580_RESET, 0);
+
+ /* Power up and get individual control of the DACs */
+ wm8580_write(codec, WM8580_PWRDN1, wm8580_read(codec, WM8580_PWRDN1) &
+ ~(WM8580_PWRDN1_PWDN | WM8580_PWRDN1_ALLDACPD));
+
+ /* Make VMID high impedence */
+ wm8580_write(codec, WM8580_ADC_CONTROL1,
+ wm8580_read(codec, WM8580_ADC_CONTROL1) & ~0x100);
+
+ /* register pcms */
+ ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1,
+ SNDRV_DEFAULT_STR1);
+ if (ret < 0) {
+ printk(KERN_ERR "wm8580: failed to create pcms\n");
+ goto pcm_err;
+ }
+
+ wm8580_add_controls(codec);
+ wm8580_add_widgets(codec);
+
+ ret = snd_soc_register_card(socdev);
+ if (ret < 0) {
+ printk(KERN_ERR "wm8580: failed to register card\n");
+ goto card_err;
+ }
+ return ret;
+
+card_err:
+ snd_soc_free_pcms(socdev);
+ snd_soc_dapm_free(socdev);
+pcm_err:
+ kfree(codec->reg_cache);
+ return ret;
+}
+
+/* If the i2c layer weren't so broken, we could pass this kind of data
+ around */
+static struct snd_soc_device *wm8580_socdev;
+
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+
+/*
+ * WM8580 2 wire address is determined by GPIO5
+ * state during powerup.
+ * low = 0x1a
+ * high = 0x1b
+ */
+static unsigned short normal_i2c[] = { 0, I2C_CLIENT_END };
+
+/* Magic definition of all other variables and things */
+I2C_CLIENT_INSMOD;
+
+static struct i2c_driver wm8580_i2c_driver;
+static struct i2c_client client_template;
+
+static int wm8580_codec_probe(struct i2c_adapter *adap, int addr, int kind)
+{
+ struct snd_soc_device *socdev = wm8580_socdev;
+ struct wm8580_setup_data *setup = socdev->codec_data;
+ struct snd_soc_codec *codec = socdev->codec;
+ struct i2c_client *i2c;
+ int ret;
+
+ if (addr != setup->i2c_address)
+ return -ENODEV;
+
+ client_template.adapter = adap;
+ client_template.addr = addr;
+
+ i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
+ if (i2c == NULL) {
+ kfree(codec);
+ return -ENOMEM;
+ }
+ i2c_set_clientdata(i2c, codec);
+ codec->control_data = i2c;
+
+ ret = i2c_attach_client(i2c);
+ if (ret < 0) {
+ dev_err(&i2c->dev, "failed to attach codec at addr %x\n", addr);
+ goto err;
+ }
+
+ ret = wm8580_init(socdev);
+ if (ret < 0) {
+ dev_err(&i2c->dev, "failed to initialise WM8580\n");
+ goto err;
+ }
+
+ return ret;
+
+err:
+ kfree(codec);
+ kfree(i2c);
+ return ret;
+}
+
+static int wm8580_i2c_detach(struct i2c_client *client)
+{
+ struct snd_soc_codec *codec = i2c_get_clientdata(client);
+ i2c_detach_client(client);
+ kfree(codec->reg_cache);
+ kfree(client);
+ return 0;
+}
+
+static int wm8580_i2c_attach(struct i2c_adapter *adap)
+{
+ return i2c_probe(adap, &addr_data, wm8580_codec_probe);
+}
+
+/* corgi i2c codec control layer */
+static struct i2c_driver wm8580_i2c_driver = {
+ .driver = {
+ .name = "WM8580 I2C Codec",
+ .owner = THIS_MODULE,
+ },
+ .attach_adapter = wm8580_i2c_attach,
+ .detach_client = wm8580_i2c_detach,
+ .command = NULL,
+};
+
+static struct i2c_client client_template = {
+ .name = "WM8580",
+ .driver = &wm8580_i2c_driver,
+};
+#endif
+
+static int wm8580_probe(struct platform_device *pdev)
+{
+ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+ struct wm8580_setup_data *setup;
+ struct snd_soc_codec *codec;
+ struct wm8580_priv *wm8580;
+ int ret = 0;
+
+ pr_info("WM8580 Audio Codec %s\n", WM8580_VERSION);
+
+ setup = socdev->codec_data;
+ codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
+ if (codec == NULL)
+ return -ENOMEM;
+
+ wm8580 = kzalloc(sizeof(struct wm8580_priv), GFP_KERNEL);
+ if (wm8580 == NULL) {
+ kfree(codec);
+ return -ENOMEM;
+ }
+
+ codec->private_data = wm8580;
+ socdev->codec = codec;
+ mutex_init(&codec->mutex);
+ INIT_LIST_HEAD(&codec->dapm_widgets);
+ INIT_LIST_HEAD(&codec->dapm_paths);
+ wm8580_socdev = socdev;
+
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+ if (setup->i2c_address) {
+ normal_i2c[0] = setup->i2c_address;
+ codec->hw_write = (hw_write_t)i2c_master_send;
+ ret = i2c_add_driver(&wm8580_i2c_driver);
+ if (ret != 0)
+ printk(KERN_ERR "can't add i2c driver");
+ }
+#else
+ /* Add other interfaces here */
+#endif
+ return ret;
+}
+
+/* power down chip */
+static int wm8580_remove(struct platform_device *pdev)
+{
+ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+ struct snd_soc_codec *codec = socdev->codec;
+
+ if (codec->control_data)
+ wm8580_set_bias_level(codec, SND_SOC_BIAS_OFF);
+ snd_soc_free_pcms(socdev);
+ snd_soc_dapm_free(socdev);
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+ i2c_del_driver(&wm8580_i2c_driver);
+#endif
+ kfree(codec->private_data);
+ kfree(codec);
+
+ return 0;
+}
+
+struct snd_soc_codec_device soc_codec_dev_wm8580 = {
+ .probe = wm8580_probe,
+ .remove = wm8580_remove,
+};
+EXPORT_SYMBOL_GPL(soc_codec_dev_wm8580);
+
+MODULE_DESCRIPTION("ASoC WM8580 driver");
+MODULE_AUTHOR("Mark Brown <broonie(a)opensource.wolfsonmicro.com>");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/wm8580.h b/sound/soc/codecs/wm8580.h
new file mode 100644
index 0000000..589ddab
--- /dev/null
+++ b/sound/soc/codecs/wm8580.h
@@ -0,0 +1,42 @@
+/*
+ * wm8580.h -- audio driver for WM8580
+ *
+ * Copyright 2008 Samsung Electronics.
+ * Author: Ryu Euiyoul
+ * ryu.real(a)gmail.com
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef _WM8580_H
+#define _WM8580_H
+
+#define WM8580_PLLA 1
+#define WM8580_PLLB 2
+
+#define WM8580_MCLK 1
+#define WM8580_DAC_CLKSEL 2
+#define WM8580_CLKOUTSRC 3
+
+#define WM8580_CLKSRC_MCLK 1
+#define WM8580_CLKSRC_PLLA 2
+#define WM8580_CLKSRC_PLLB 3
+#define WM8580_CLKSRC_OSC 4
+#define WM8580_CLKSRC_NONE 5
+
+struct wm8580_setup_data {
+ unsigned short i2c_address;
+};
+
+#define WM8580_DAI_PAIFRX 0
+#define WM8580_DAI_PAIFTX 1
+
+extern struct snd_soc_dai wm8580_dai[];
+extern struct snd_soc_codec_device soc_codec_dev_wm8580;
+
+#endif
+
--
1.5.6.3
2
4