[PATCH] ALSA: hda - Add CX20582 and OLPC XO-1.5 support
This adds support for the Conexant CX20582 codec, based on code from http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip This is the codec to be shipped in the OLPC XO-1.5, so this patch also includes an XO-specific profile. Resultant configuration: http://dev.laptop.org/~dsd/20090713/codec0.txt http://dev.laptop.org/~dsd/20090713/codec0.svg As the Linuxant code is structured differently to the other codecs, I was unable to cleanly reimplement everything in the generic and Dell profiles as more info is needed (e.g. codec graphs). I simplified those profiles so that hopefully it will not break anyone's audio. If it does, it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems, and then fixing snd_hda_codec_configure() to fall back on the generic parser, at least until support for other systems is figured out. --- sound/pci/hda/patch_conexant.c | 479 1 files changed, 479 insertions(+), 0 deletions(-) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4fcbe21..77b4f28 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -108,6 +108,8 @@ struct conexant_spec { struct hda_input_mux private_imux; hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + unsigned int dell_automute; + unsigned int port_d_mode; }; static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, @@ -1908,6 +1910,480 @@ static int patch_cxt5051(struct hda_codec *codec) return 0; } +/* Conexant 5066 specific */ + +static hda_nid_t cxt5066_dac_nids[1] = { 0x10 }; +static hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 }; +static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; +#define CXT5066_SPDIF_OUT 0x21 + +static struct hda_channel_mode cxt5066_modes[1] = { + { 2, NULL }, +}; + +static void cxt5066_update_speaker(struct hda_codec *codec) +{ + struct conexant_spec *spec = codec-spec; + unsigned int pinctl; + + snd_printdd(CXT5066: update speaker, hp_present=%d\n, + spec-hp_present); + + /* Port A (HP) */ + pinctl = ((spec-hp_present 1) spec-cur_eapd) ? PIN_HP : 0; + snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + /* Port D (HP/LO) */ + pinctl = ((spec-hp_present 2) spec-cur_eapd) + ? spec-port_d_mode : 0; + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + /* CLASS_D AMP */ + pinctl = (!spec-hp_present spec-cur_eapd) ? PIN_OUT : 0; + snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + if (spec-dell_automute) { + /* DELL AIO Port Rule: PortA PortD IntSpk */ + pinctl = (!(spec-hp_present 1) spec-cur_eapd) + ? PIN_OUT : 0; + snd_hda_codec_write(codec, 0x1c, 0, + AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl); + } +} + +/* turn on/off EAPD (+ mute HP) as a master switch */ +static int cxt5066_hp_master_sw_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + + if (!cxt_eapd_put(kcontrol, ucontrol)) + return 0; + + cxt5066_update_speaker(codec); + return 1; +} + +/* toggle input of built-in and mic jack appropriately */ +static void cxt5066_automic(struct hda_codec *codec) +{ + static struct hda_verb ext_mic_present[] = { + /* enable external mic, port B */ + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + + /* switch to external mic input */ + {0x17, AC_VERB_SET_CONNECT_SEL, 0}, + + /* disable internal mic, port C */ + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, + {} + }; + static struct hda_verb ext_mic_absent[] = { + /* enable internal mic, port C */ + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + + /* switch to internal mic input */ + {0x17, AC_VERB_SET_CONNECT_SEL, 1}, + + /* disable external mic, port B */ + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, + {} + }; + unsigned int present; + + present = snd_hda_codec_read(codec, 0x1a, 0, +AC_VERB_GET_PIN_SENSE, 0) 0x8000; + if (present) { + snd_printdd(CXT5066: external microphone detected\n); + snd_hda_sequence_write(codec, ext_mic_present); + } else { + snd_printdd(CXT5066: external microphone absent\n); + snd_hda_sequence_write(codec, ext_mic_absent); + } +} + +/* mute internal speaker if HP is plugged */ +static
Re: [alsa-devel] [PATCH] ALSA: hda - Add CX20582 and OLPC XO-1.5 support
On Thu, 2009-07-16 at 15:53 +0200, Takashi Iwai wrote: At Thu, 16 Jul 2009 14:46:57 +0100 (BST), Daniel Drake wrote: This adds support for the Conexant CX20582 codec, based on code from http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip This is the codec to be shipped in the OLPC XO-1.5, so this patch also includes an XO-specific profile. Resultant configuration: http://dev.laptop.org/~dsd/20090713/codec0.txt http://dev.laptop.org/~dsd/20090713/codec0.svg As the Linuxant code is structured differently to the other codecs, I was unable to cleanly reimplement everything in the generic and Dell profiles as more info is needed (e.g. codec graphs). I simplified those profiles so that hopefully it will not break anyone's audio. If it does, it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems, and then fixing snd_hda_codec_configure() to fall back on the generic parser, at least until support for other systems is figured out. The patch looks OK. Could you give your sign-off? Sorry, forgot. Signed-off-by: Daniel Drake d...@laptop.org ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [PATCH] viafb: update driver to use both I2C Channels
On Jul 15 2009, at 22:17, Harald Welte was caught saying: Hi Deepak, as I have pointed out a couple of times to some OLPC folks (not sure if you were included), there is a via-viafb-i2c tree in my git tree (http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=linux-2.6-via.git;a=shortlog;h=refs/heads/via-viafb-i2c) that tries to clean up the i2c mess (after cleaning up a lot of other mess). Hi Harald, I pulled in these patches and they look great but I'm seeing an additional 3 second delay during bootup (even after removing the KERN_DEBUG printk in via_i2c_setscl). I'll work on investigating why later as I'm focused on functionality at right now. ~Deepak ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
problems with touchpad
Hello all: I am having serious trouble with certain laptos XO-1, more specifically with touchpad not responding http://wiki.laptop.org/go/XO_Troubleshooting_Keyboard#Is_the_touchpad_jerky_or_oversensitive_.3F Recalibrating doesn't seem to work, and although reinstall sounds like a good idea, has the 802 fixed the problem (since upgrading is recomended, and we are currently using build 801)? Are there ways to debbug the problem? and perhaps help you fix the problem thanks.. R ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
creating your own templates in write activity
Tomeu, Hope all is well. We have been working on developing a template builder tool in write activity, and wish to have your pointers on certain features- 1. Text box - We realize that the text box tool is missing in the current write activity, and wish to develop it. We looked at abiwidget.h file closely, and it seems to us that there is no method (function) provided to add textboxes. We investigated deeper into the details, and arrived at an approach to develop the text box feature- a. Create a textbox class on the lines of tablecreator class- It seems that we need to work on 4 files: 1. OXML_Element_TextBox.cpp 2. OXML_Element_TextBox.h 3. OXMLi_ListenerState_TextBox.cpp 4. OXMLi_ListenerState_TextBox.h b. Use invoke_cmd method to insert Textbox. We are not very clear on what all arguments can be passed in this method, and their usage. Could you please direct us to a resource, which could be helpful in understanding this. We also wish to ask you about the details of the code, which is used to enable menu selections in the advanced abiword activity. Thank you. Manu ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: reviving XO-1 OS builds, as the XO-1.5 release approaches...
Adric Net wrote: Hi all, I have an XO-1, some usb sticks, and other odds and ends, along with fast Internet access. I expect there are others in similar situations who would like to help test on XO-1 ... if only to make sure that their hardware will continue to run the new code. How can we help? Is there an image available? Will it come in via the old olpc-update rsync script? Huge thanks Adric -- let's expand this effort to embrace the ~1 million XO Laptops out in the field -- supporting the latest Sugar(s) into the next decade: A fairly decent general knowledge of the Linux ecosystem is necessary, but it is not an overly difficult task. --Daniel Drake, http://lists.laptop.org/pipermail/devel/2009-July/025023.html Start Here: http://wiki.laptop.org/go/F11_for_XO1 Compare: http://wiki.laptop.org/go/F11_for_1.5 Can you provide Fedora 11 virtual machine(s) with sudo access and a decent amount of disk space to the community? Don't hesitate to ask d...@laptop.org I further questions (as you have below) and we'll do our best to get them all answered, --Holt Or is it more like you need a build manager to put one together before that will be possible? Further, I also have some server space and bandwidth available for mirrors and seeds. ( I think y'all are full up on web tools and wikis, or I'd offer those too. *g* ) So, where should I, and the testing community I have crossposted to *wave*, start ? And when will it be helpful to pull in some parents of XO-1 kids to try this out on? hth, Adric Net ad...@adric.net ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [alsa-devel] [PATCH] ALSA: hda - Add CX20582 and OLPC XO-1.5 support
At Thu, 16 Jul 2009 14:46:57 +0100 (BST), Daniel Drake wrote: This adds support for the Conexant CX20582 codec, based on code from http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip This is the codec to be shipped in the OLPC XO-1.5, so this patch also includes an XO-specific profile. Resultant configuration: http://dev.laptop.org/~dsd/20090713/codec0.txt http://dev.laptop.org/~dsd/20090713/codec0.svg As the Linuxant code is structured differently to the other codecs, I was unable to cleanly reimplement everything in the generic and Dell profiles as more info is needed (e.g. codec graphs). I simplified those profiles so that hopefully it will not break anyone's audio. If it does, it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems, and then fixing snd_hda_codec_configure() to fall back on the generic parser, at least until support for other systems is figured out. The patch looks OK. Could you give your sign-off? thanks, Takashi --- sound/pci/hda/patch_conexant.c | 479 1 files changed, 479 insertions(+), 0 deletions(-) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4fcbe21..77b4f28 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -108,6 +108,8 @@ struct conexant_spec { struct hda_input_mux private_imux; hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + unsigned int dell_automute; + unsigned int port_d_mode; }; static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, @@ -1908,6 +1910,480 @@ static int patch_cxt5051(struct hda_codec *codec) return 0; } +/* Conexant 5066 specific */ + +static hda_nid_t cxt5066_dac_nids[1] = { 0x10 }; +static hda_nid_t cxt5066_adc_nids[3] = { 0x14, 0x15, 0x16 }; +static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 }; +#define CXT5066_SPDIF_OUT0x21 + +static struct hda_channel_mode cxt5066_modes[1] = { + { 2, NULL }, +}; + +static void cxt5066_update_speaker(struct hda_codec *codec) +{ + struct conexant_spec *spec = codec-spec; + unsigned int pinctl; + + snd_printdd(CXT5066: update speaker, hp_present=%d\n, + spec-hp_present); + + /* Port A (HP) */ + pinctl = ((spec-hp_present 1) spec-cur_eapd) ? PIN_HP : 0; + snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + /* Port D (HP/LO) */ + pinctl = ((spec-hp_present 2) spec-cur_eapd) + ? spec-port_d_mode : 0; + snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + /* CLASS_D AMP */ + pinctl = (!spec-hp_present spec-cur_eapd) ? PIN_OUT : 0; + snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + + if (spec-dell_automute) { + /* DELL AIO Port Rule: PortA PortD IntSpk */ + pinctl = (!(spec-hp_present 1) spec-cur_eapd) + ? PIN_OUT : 0; + snd_hda_codec_write(codec, 0x1c, 0, + AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl); + } +} + +/* turn on/off EAPD (+ mute HP) as a master switch */ +static int cxt5066_hp_master_sw_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + + if (!cxt_eapd_put(kcontrol, ucontrol)) + return 0; + + cxt5066_update_speaker(codec); + return 1; +} + +/* toggle input of built-in and mic jack appropriately */ +static void cxt5066_automic(struct hda_codec *codec) +{ + static struct hda_verb ext_mic_present[] = { + /* enable external mic, port B */ + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + + /* switch to external mic input */ + {0x17, AC_VERB_SET_CONNECT_SEL, 0}, + + /* disable internal mic, port C */ + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, + {} + }; + static struct hda_verb ext_mic_absent[] = { + /* enable internal mic, port C */ + {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, + + /* switch to internal mic input */ + {0x17, AC_VERB_SET_CONNECT_SEL, 1}, + + /* disable external mic, port B */ + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, + {} + }; + unsigned int present; + + present = snd_hda_codec_read(codec, 0x1a, 0, + AC_VERB_GET_PIN_SENSE, 0) 0x8000; + if (present) { + snd_printdd(CXT5066: external microphone detected\n); + snd_hda_sequence_write(codec, ext_mic_present); + } else { + snd_printdd(CXT5066: external microphone
Re: [alsa-devel] [PATCH] ALSA: hda - Add CX20582 and OLPC XO-1.5 support
At Thu, 16 Jul 2009 14:59:56 +0100, Daniel Drake wrote: On Thu, 2009-07-16 at 15:53 +0200, Takashi Iwai wrote: At Thu, 16 Jul 2009 14:46:57 +0100 (BST), Daniel Drake wrote: This adds support for the Conexant CX20582 codec, based on code from http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip This is the codec to be shipped in the OLPC XO-1.5, so this patch also includes an XO-specific profile. Resultant configuration: http://dev.laptop.org/~dsd/20090713/codec0.txt http://dev.laptop.org/~dsd/20090713/codec0.svg As the Linuxant code is structured differently to the other codecs, I was unable to cleanly reimplement everything in the generic and Dell profiles as more info is needed (e.g. codec graphs). I simplified those profiles so that hopefully it will not break anyone's audio. If it does, it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems, and then fixing snd_hda_codec_configure() to fall back on the generic parser, at least until support for other systems is figured out. The patch looks OK. Could you give your sign-off? Sorry, forgot. Signed-off-by: Daniel Drake d...@laptop.org Thanks, applied now. Takashi ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Sugar-devel] creating your own templates in write activity
Hi Manusheel, There is no specific pyabiword binding for insert textbox but your can use the following technique to access the abiword/src/wp/ap/xp/ap_EditMethods.cpp function that provide the interface to libabiword. do: self._abiword_canvas.invoke_cmd(insTextbox,,0,0) To invoke the GUI to insert a textbox. Cheers Martin On Fri, Jul 17, 2009 at 3:18 AM, Manusheel Guptam...@laptop.org wrote: Tomeu, Hope all is well. We have been working on developing a template builder tool in write activity, and wish to have your pointers on certain features- 1. Text box - We realize that the text box tool is missing in the current write activity, and wish to develop it. We looked at abiwidget.h file closely, and it seems to us that there is no method (function) provided to add textboxes. We investigated deeper into the details, and arrived at an approach to develop the text box feature- a. Create a textbox class on the lines of tablecreator class- It seems that we need to work on 4 files: 1. OXML_Element_TextBox.cpp 2. OXML_Element_TextBox.h 3. OXMLi_ListenerState_TextBox.cpp 4. OXMLi_ListenerState_TextBox.h b. Use invoke_cmd method to insert Textbox. We are not very clear on what all arguments can be passed in this method, and their usage. Could you please direct us to a resource, which could be helpful in understanding this. We also wish to ask you about the details of the code, which is used to enable menu selections in the advanced abiword activity. Thank you. Manu ___ Sugar-devel mailing list sugar-de...@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
[PATCH] add F11-updates and F11-testing (for dracut, etc.)
--- olpc-base.ks |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/olpc-base.ks b/olpc-base.ks index c72c8ff..d0b3088 100644 --- a/olpc-base.ks +++ b/olpc-base.ks @@ -13,6 +13,8 @@ repo --name=olpc --cost=3 --baseurl=http://dev.laptop.org/~dsd/xo1-rpms repo --name=olpc-kernel --cost=5 --baseurl=http://dev.laptop.org/~dilinger/2.6.30-rc5 repo --name=F11 --cost=10 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-11arch=i386 --excludepkgs=PolicyKit-kde +repo --name=F11-updates --cost=9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f11arch=i386 +repo --name=F11-updates-testing --cost=8 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f11arch=i386 # Enable if the mirrors aren't up to date yet. # repo --name=rawhide --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os --excludepkgs=PolicyKit-kde -- 1.6.0.6 ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Server-devel] logging performance
On Wed, Jul 15, 2009 at 3:23 PM, Sameer Vermasve...@sfsu.edu wrote: Any suggestions on how to log data on RAM and CPU usage on the XS? I've looked at mem.py and top variants, but I want something that logs at x intervals to a file that I can pull into a spreadsheet. I have munin running on the xs, but it is not fine-grained enough to show variations, say every 10 seconds or so. Suggestions? We are using SAR on jabber.sugarlabs.org http://linux.die.net/man/1/sar I modied a cron job to log every minute, you can adjust as necessary. It is in /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes */1 * * * * root /usr/lib/sa/sa1 -d 1 1 Dave -- Dr. Sameer Verma, Ph.D. Associate Professor of Information Systems San Francisco State University San Francisco CA 94132 USA http://verma.sfsu.edu/ http://opensource.sfsu.edu/ ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel -- Dave Bauer d...@solutiongrove.com http://www.solutiongrove.com ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
[Server-devel] /library partition
Any documentation on what lives in /library and how to make it useful? Sameer -- Dr. Sameer Verma, Ph.D. Associate Professor of Information Systems San Francisco State University San Francisco CA 94132 USA http://verma.sfsu.edu/ http://opensource.sfsu.edu/ ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] /library partition
I am not sure if there is any documentation: It has pgsql-xs the postgresql database for Moodle users which I think are home directories for the registered XOs which will contain their backups. xs-activation, hopefully martin will explain that xs-activity-server which I assume allows you to run a server to distribute activities, and the content goes there. xs-rsync I am not sure what this is. I believe the overall idea is that anything that is content goes in this directory as opposed to software or parts of the operating system. Dave On Thu, Jul 16, 2009 at 4:40 PM, Sameer Vermasve...@sfsu.edu wrote: Any documentation on what lives in /library and how to make it useful? Sameer -- Dr. Sameer Verma, Ph.D. Associate Professor of Information Systems San Francisco State University San Francisco CA 94132 USA http://verma.sfsu.edu/ http://opensource.sfsu.edu/ ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel -- Dave Bauer d...@solutiongrove.com http://www.solutiongrove.com ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel