Contents of Alsa-devel digest...
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 581 lines · On Jun 18, 2010, at 11:38 AM, [email protected] wrote:
Send Alsa-devel mailing list submissions to
[email protected]To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
or, via email, send a message with subject or body 'help' to
[email protected]You can reach the person managing the list at
[email protected]When replying, please edit your Subject line so it is more specific than "Re: Contents of Alsa-devel digest..."
Today's Topics:
1. Re: [PATCH 2/5] ALSA: usb-audio: unify UAC macros and struct
names (Daniel Mack)
2. Re: Timing Info (Clemens Ladisch)
3. Re: [PATCH] ASoC: pandora: fix CLKX polarity (Mark Brown)
4. [PATCH] ALSA: hda - add ideapad model for Conexant 5051 codec
(Herton Ronaldo Krzesinski)
5. Re: [PATCH] ALSA: hda - add ideapad model for Conexant 5051
codec (Takashi Iwai)
6. Re:snd_mixer_selem_get_playback_volumereturn value outside
allowed range (Raymond Yau)
7. Re: [PATCH] eukrea-tlv320: add support for our i.MX25 board
(Mark Brown)
8.SOC_DOUBLE_R_SX_TLV(was Update on TLV320AIC3204 Driver) (Stuart Longland)----------------------------------------------------------------------
Message: 1
Date: Thu, 17 Jun 2010 17:26:26 +0200
From: Daniel Mack <[email protected]>
Subject: Re: [alsa-devel] [PATCH 2/5] ALSA: usb-audio: unify UAC
macros and struct names
To: Alex Lee <[email protected]>
Cc: Takashi Iwai <[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii(hint, hint: don't top-post :))
Quoted 2 lines · Alex Lee
It will not help existing codes, I agree. But it may make writing new UAC2 specific code easier?
Not as long as most of the code stays hybrid for both versions. If there were versions of these enum values for both UAC1 and UAC2, you would need to choose one of them in the parser codes. Which one you go for doesn't actually make any difference as they're both the same, but the code would read as if it was specific to any version.
I'd say this would add more to the confusion, and not ease any.
Daniel
------------------------------
Message: 2
Date: Thu, 17 Jun 2010 17:36:59 +0200
From: Clemens Ladisch <[email protected]>
Subject: Re: [alsa-devel] Timing Info
To: Paul Dugas <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 9 lines · Paul Dugas
Quoted 3 lines · Clemens Ladisch
Set
SND_PCM_TSTAMP_ENABLEto generate a timestamp whenever the hardware position is updated. Callsnd_pcm_statusto read the position and the corresponding timestamp.I've re-read this a number of times and have been fiddling with code that dumps the status at various points but I'm still not grasping the concept here. Can comeone point me to an explanation of the delay, avail, and
avail_maxvalues?The avail value tells you how many frames are available, i.e., can be written, in the output buffer. The largest value that this had since the last
snd_pcm_statuscall isavail_max.The delay value is the time that will elapse before the next frame that you write into the buffer will actually be output by the hardware. This is not only the time until the hardware reads this frame out of the buffer (which could be computed from avail) but also any processing after that.
HTH
Clemens------------------------------
Message: 3
Date: Thu, 17 Jun 2010 16:50:01 +0100
From: Mark Brown <[email protected]>
Subject: Re: [alsa-devel] [PATCH] ASoC: pandora: fix CLKX polarity
To: Grazvydas Ignotas <[email protected]>, [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8Acked-by Mark Brown <[email protected]>Probably best to add a CC to stable too. Sorry about the rubbish formatting, on my phone and it can't do any better.
Quoted 95 lines · Grazvydas Ignotas
After mass production started it was found that several boards exhibit noise problems during sound playback. After some investigation it was determined that CLKX polarity is set incorrectly, and even if most boards can tolerate the wrong setting, there are some that don't.
Fix polarity setup in the board file. As the clock settings for input and output now match, merge in and out functions and structures to simplify code.
Signed-off-by Grazvydas Ignotas <[email protected]>---
sound/soc/omap/omap3pandora.c| 36 ++++++++----------------------------1 files changed, 8 insertions(+), 28 deletions(-)sound/soc/omap/omap3pandora.c +8
-28@@ -43,12 +43,14 @@static struct regulator *omap3pandora_dac_reg; -static int omap3pandora_cmn_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params,unsigned int fmt) +static int omap3pandora_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 *codec_dai = rtd->dai->codec_dai;struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; +int fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | +SND_SOC_DAIFMT_CBS_CFS ;int ret;/* Set codec DAI configuration */ @@ -91,24 +93,6 @@ static int omap3pandora_cmn_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static int omap3pandora_out_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params) -{ -return omap3pandora_cmn_hw_params (substream, params, -SND_SOC_DAIFMT_I2S | -SND_SOC_DAIFMT_IB_NF | -SND_SOC_DAIFMT_CBS_CFS ); -} - -static int omap3pandora_in_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params) -{ -return omap3pandora_cmn_hw_params (substream, params, -SND_SOC_DAIFMT_I2S | -SND_SOC_DAIFMT_NB_NF | -SND_SOC_DAIFMT_CBS_CFS ); -} -static int omap3pandora_dac_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *k,int event) {@@ -231,12 +215,8 @@ static int omap3pandora_in_init(struct snd_soc_codec *codec)return snd_soc_dapm_sync (codec); } -static struct snd_soc_ops omap3pandora_out_ops = { - .hw_params = omap3pandora_out_hw_params, -}; - -static struct snd_soc_ops omap3pandora_in_ops = { - .hw_params = omap3pandora_in_hw_params, +static struct snd_soc_ops omap3pandora_ops = { + .hw_params = omap3pandora_hw_params, };/* Digital audio interface glue - connects codec <--> CPU */ @@ -246,14 +226,14 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { .stream_name = "HiFi Out", .cpu_dai = &omap_mcbsp_dai[0], .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], - .ops = &omap3pandora_out_ops, + .ops = &omap3pandora_ops, .init = omap3pandora_out_init, }, { .name = "TWL4030", .stream_name = "Line/Mic In", .cpu_dai = &omap_mcbsp_dai[1], .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], - .ops = &omap3pandora_in_ops, + .ops = &omap3pandora_ops, .init = omap3pandora_in_init, } };Signature · 1 line
1.6.3.3------------------------------
Message: 4
Date: Thu, 17 Jun 2010 14:15:06 -0300
From: Herton Ronaldo Krzesinski <[email protected]>
Subject: [alsa-devel] [PATCH] ALSA: hda - add ideapad model forConexant 5051 codecTo: [email protected]
Cc: Takashi Iwai <[email protected]>
Message-ID: <[email protected]>
Content-Type: Text/Plain; charset="us-ascii"Lenovo IdeaPad Y430 has an additional subwoofer connected at pin
0x1b, which isn't muted when headphone is plugged in. This adds additional support to the extra subwoofer via new ideapad model.Signed-off-by Herton Ronaldo Krzesinski <[email protected]>---
Documentation/sound/alsa/HD-Audio-Models.txt| 1 +sound/pci/hda/patch_conexant.c| 20 ++++++++++++++++++++2 files changed, 21 insertions(+), 0 deletions(-)Documentation/sound/alsa/HD-Audio-Models.txt +1
-0@@ -282,6 +282,7 @@ Conexant 5051 hp HP Spartan laptop hp-dv6736 HP dv6736 hp-f700 HP Compaq Presario F700 + ideapad Lenovo IdeaPad laptop lenovo-x200 Lenovo X200 laptop toshiba Toshiba Satellite M300sound/pci/hda/patch_conexant.c +5
-0@@ -1632,6 +1632,11 @@ static void cxt5051_update_speaker(struct hda_codec *codec) pinctl = (!spec->hp_present && spec->cur_eapd) ?PIN_OUT :0 ;snd_hda_codec_write (codec,0x1a ,0 ,AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl); +/* on ideapad there is an aditional speaker (subwoofer) to mute */ +if (spec->ideapad) +snd_hda_codec_write (codec,0x1b ,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , + pinctl); }/* turn on/off EAPD (+ mute HP) as a master switch */
sound/pci/hda/patch_conexant.c +7
-0@@ -1888,6 +1893,13 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid,#endif } +static struct hda_verb cxt5051_ideapad_init_verbs[] = { +/* Subwoofer */ + {0x1b ,AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT }, + {0x1b ,AC_VERB_SET_CONNECT_SEL ,0x00 }, + { }/* end */ +}; +/* initialize jack-sensing, too */ static int cxt5051_init (struct hda_codec *codec){
sound/pci/hda/patch_conexant.c +0
-0@@ -1917,6 +1929,7 @@ enum { CXT5051_LENOVO_X200, /* Lenovo X200 laptop, also used for Advanced MiniDock 250410 */
CXT5051_F700, /* HP Compaq Presario F700 */ CXT5051_TOSHIBA, /* Toshiba M300 & co */sound/pci/hda/patch_conexant.c +1
-0+ CXT5051_IDEAPAD, /* Lenovo IdeaPad Y430 */CXT5051_MODELS };sound/pci/hda/patch_conexant.c +7
-0@@ -1927,6 +1940,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = { [CXT5051_LENOVO_X200] = "lenovo-x200", [CXT5051_F700] = "hp-700", [CXT5051_TOSHIBA] = "toshiba", + [CXT5051_IDEAPAD] = "ideapad", };static struct snd_pci_quirk cxt5051_cfg_tbl[] = {@@ -1938,6 +1952,7 @@ static struct snd_pci_quirk cxt5051_cfg_tbl[] = { CXT5051_LAPTOP),SND_PCI_QUIRK (0x14f1 ,0x5051 ,"HP Spartan 1.1" ,CXT5051_HP ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Lenovo X200" ,CXT5051_LENOVO_X200 ), + SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo IdeaPad", CXT5051_IDEAPAD), {} };@@ -1999,6 +2014,11 @@ static int patch_cxt5051(struct hda_codec *codec) spec->mixers[0 ] = cxt5051_toshiba_mixers; spec->auto_mic =AUTO_MIC_PORTB ;break ; +case CXT5051_IDEAPAD : + spec->init_verbs[spec->num_init_verbs++] = + cxt5051_ideapad_init_verbs; + spec->ideapad =1 ; +break ; }return 0 ;Signature · 17 lines
1.7.1 ------------------------------ Message: 5 Date: Thu, 17 Jun 2010 20:39:20 +0200 From: Takashi Iwai <[email protected]> Subject: Re: [alsa-devel] [PATCH] ALSA: hda - add ideapad model for Conexant 5051 codec To: Herton Ronaldo Krzesinski <[email protected]> Cc: [email protected] Message-ID: <s5hk4pxld0n.wl%[email protected]> Content-Type: text/plain; charset=US-ASCII At Thu, 17 Jun 2010 14:15:06 -0300,Quoted 6 lines · Herton Ronaldo Krzesinski
Lenovo IdeaPad Y430 has an additional subwoofer connected at pin
0x1b, which isn't muted when headphone is plugged in. This adds additional support to the extra subwoofer via new ideapad model.Signed-off-by Herton Ronaldo Krzesinski <[email protected]>Thanks, applied now.
Takashi
Quoted 90 lines
---
Documentation/sound/alsa/HD-Audio-Models.txt| 1 +sound/pci/hda/patch_conexant.c| 20 ++++++++++++++++++++2 files changed, 21 insertions(+), 0 deletions(-)Documentation/sound/alsa/HD-Audio-Models.txt +1
-0@@ -282,6 +282,7 @@ Conexant 5051 hp HP Spartan laptop hp-dv6736 HP dv6736 hp-f700 HP Compaq Presario F700 + ideapad Lenovo IdeaPad laptop lenovo-x200 Lenovo X200 laptop toshiba Toshiba Satellite M300sound/pci/hda/patch_conexant.c +5
-0@@ -1632,6 +1632,11 @@ static void cxt5051_update_speaker(struct hda_codec *codec) pinctl = (!spec->hp_present && spec->cur_eapd) ?PIN_OUT :0 ;snd_hda_codec_write (codec,0x1a ,0 ,AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl); +/* on ideapad there is an aditional speaker (subwoofer) to mute */ +if (spec->ideapad) +snd_hda_codec_write (codec,0x1b ,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , + pinctl); }/* turn on/off EAPD (+ mute HP) as a master switch */
sound/pci/hda/patch_conexant.c +7
-0@@ -1888,6 +1893,13 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid,#endif } +static struct hda_verb cxt5051_ideapad_init_verbs[] = { +/* Subwoofer */ + {0x1b ,AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT }, + {0x1b ,AC_VERB_SET_CONNECT_SEL ,0x00 }, + { }/* end */ +}; +/* initialize jack-sensing, too */ static int cxt5051_init (struct hda_codec *codec){
sound/pci/hda/patch_conexant.c +0
-0@@ -1917,6 +1929,7 @@ enum { CXT5051_LENOVO_X200, /* Lenovo X200 laptop, also used for Advanced MiniDock 250410 */
CXT5051_F700, /* HP Compaq Presario F700 */ CXT5051_TOSHIBA, /* Toshiba M300 & co */sound/pci/hda/patch_conexant.c +1
-0+ CXT5051_IDEAPAD, /* Lenovo IdeaPad Y430 */CXT5051_MODELS };sound/pci/hda/patch_conexant.c +7
-0@@ -1927,6 +1940,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = { [CXT5051_LENOVO_X200] = "lenovo-x200", [CXT5051_F700] = "hp-700", [CXT5051_TOSHIBA] = "toshiba", + [CXT5051_IDEAPAD] = "ideapad", };static struct snd_pci_quirk cxt5051_cfg_tbl[] = {@@ -1938,6 +1952,7 @@ static struct snd_pci_quirk cxt5051_cfg_tbl[] = { CXT5051_LAPTOP),SND_PCI_QUIRK (0x14f1 ,0x5051 ,"HP Spartan 1.1" ,CXT5051_HP ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Lenovo X200" ,CXT5051_LENOVO_X200 ), + SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo IdeaPad", CXT5051_IDEAPAD), {} };@@ -1999,6 +2014,11 @@ static int patch_cxt5051(struct hda_codec *codec) spec->mixers[0 ] = cxt5051_toshiba_mixers; spec->auto_mic =AUTO_MIC_PORTB ;break ; +case CXT5051_IDEAPAD : + spec->init_verbs[spec->num_init_verbs++] = + cxt5051_ideapad_init_verbs; + spec->ideapad =1 ; +break ; }return 0 ;Signature · 1 line
1.7.1------------------------------
Message: 6
Date: Fri, 18 Jun 2010 07:39:07 +0800
From: Raymond Yau <[email protected]>
Subject: Re: [alsa-devel]snd_mixer_selem_get_playback_volumereturn
value outside allowed range
To: ALSA Development Mailing List <[email protected]> Message-ID:<[email protected]>Content-Type: text/plain; charset=ISO-8859-1
2010/6/17 Clemens Ladisch <[email protected]>
Quoted 10 lines
Quoted 1 line · Raymond Yau
Should
snd_mixer_selem_get_playback_volume()perform range check ?No, it's the responsibility of the control implementation to return valid values (and to check that values that are being set are valid).
Regards,
ClemensIf it is the responsibility of the driver/external plugin to keep the value inside the allowed range
your patch actually help those buggy driver/external plugin hide the bug only
------------------------------
Message: 7
Date: Fri, 18 Jun 2010 01:56:37 +0100
From: Mark Brown <[email protected]>
Subject: Re: [alsa-devel] [PATCH] eukrea-tlv320: add support for ouri.MX25 boardTo: Eric B?nard <[email protected]>
Cc: [email protected], [email protected],
[email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1Quoted 3 lines · Eric B?nard
* tdm slot has to be configured to get sound working on i.MX25
Signed-off-by Eric B?nard <[email protected]>Applied but I had to hand apply the
Kconfigupdate, please check that it applied correctly.------------------------------
Message: 8
Date: Fri, 18 Jun 2010 12:38:10 +1000
From: Stuart Longland <[email protected]>
Subject: [alsa-devel]SOC_DOUBLE_R_SX_TLV(was Update on TLV320AIC3204
Driver)
To: Mark Brown <[email protected]>
Cc: Takashi Iwai <[email protected]>, [email protected], Eric
B??nard <[email protected]>, Liam Girdwood <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 26 lines · Stuart Longland
When a read is performed, this structure points to this function as the means for reading the register (defined in
sound/soc-core.c):/**
*snd_soc_get_volsw_2r_sx- double with tlv and variable data size
* mixer get callback
* @kcontrol: mixer control
* @uinfo: control element information
*
* Returns 0 for success.
*/
int snd_soc_get_volsw_2r_sx(structsnd_kcontrol*kcontrol,
structsnd_ctl_elem_value*ucontrol){ struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); unsigned int mask = (1<<mc->shift)-1; int min = mc->min; int val = snd_soc_read(codec, mc->reg) & mask; int valr = snd_soc_read(codec, mc->rreg) & mask; ucontrol->value.integer.value[0] = ((val & 0xff)-min); ucontrol->value.integer.value[1] = ((valr & 0xff)-min); return 0; }Quoted 1 line
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_2r_sx);I've figured it out now... and there'll be a patch to fix it.
The mute <--> gain interaction was pure coincidence as it turns out. There's no interaction between the two, just that when I toggle the mute, the gain gets re-read, and hence it *appeared* to interact.
Notice the value calculated for the channel is:
output = ( regval & 0xff ) - minimumIn my case, my minimum is -6. Suppose I set my driver gain to -1dB, in hexadecimal,
0x3f. Since no sign extension is done, (regval &0xff) =
63. Adding 6 to this (double negation) you get 69... which is greater than the maximum gain of 29. Hence the scale shoots up to maximum.The fix, is to change the above so that they mask the result; thus wrapping around the zero point like so:
output = ( ( regval & 0xff ) - minimum ) & maskThis fixes the problem that I observe, and shouldn't break the other user of the control. A patch to fix this issue is coming.
Signature · 19 lines
Stuart Longland (aka Redhatter, VK4MSL) .'''. Gentoo Linux/MIPS Cobalt and Docs Developer '.'` : . . . . . . . . . . . . . . . . . . . . . . .'.' http://dev.gentoo.org/~redhatter :.' I haven't lost my mind... ...it's backed up on a tape somewhere. ------------------------------ _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel End of Alsa-devel Digest, Vol 40, Issue 80 ******************************************