Page 16 of 29 FirstFirst ... 6141516171826 ... LastLast
Results 151 to 160 of 281

Thread: snd_hda_intel options database

  1. #151
    Join Date
    Jul 2010
    Beans
    9

    Re: snd_hda_intel options database

    Asus eeePC 1201T

    model=eeepc-p901

    No or all other models, I tried (which does not include: "basic", "quanta", "lifebook" of the alsa list shipped with 10.04), lead to high CPU usage (pulseaudio, xorg), buggy behaviour, freezes (see here)

    This model manages to supress internal speakers, when something is plugged in on "line-out" but does not manage to make the internal microphone work.

  2. #152
    Join Date
    Jul 2010
    Location
    Russia
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Lightbulb Re: snd_hda_intel options database

    Quote Originally Posted by xtrman View Post
    For the Conexant 5069 card I have found a way to mute the internal speakers.
    Download hda-verb from ftp://ftp.suse.com/pub/people/tiwai/...erb-0.3.tar.gz.
    Then execute
    Code:
    sudo hda-verb /dev/snd/hwC0D0 0x1f 0x701 1
    to turn the internal speakers off and
    Code:
    sudo hda-verb /dev/snd/hwC0D0 0x1f 0x701 0
    to turn them on again.

    I have also filed a bug report upstream on this.

    Edit: I have now created a daemon to automattically mute and unmute the internal speakers when headphones are plugged in and removed.
    Program:
    Code:
    /* 
     * File:   main.cpp
     * Author: xtr
     *
     * Created on April 26, 2010, 5:26 PM
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <ctype.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    #include <sys/io.h>
    #include <sys/types.h>
    #include <sys/fcntl.h>
    #include <syslog.h>
    #include <signal.h>
    
    #include <stdint.h>
    typedef uint8_t u8;
    typedef uint16_t u16;
    typedef uint32_t u32;
    typedef uint64_t u64;
    
    #define HDA_VERB(nid,verb,param)    ((nid)<<24 | (verb)<<8 | (param))
    #define HDA_IOCTL_VERB_WRITE        _IOWR('H', 0x11, struct hda_verb_ioctl)
    
    struct hda_verb_ioctl {
        u32 verb;    /* HDA_VERB() */
        u32 res;    /* response */
    };
    
    void daemonize()
    {
        pid_t pid, sid;
    
        /* Fork off the parent process */
        pid = fork();
        if (pid < 0) {
                exit(EXIT_FAILURE);
        }
        /* If we got a good PID, then
           we can exit the parent process. */
        if (pid > 0) {
                exit(EXIT_SUCCESS);
        }
    
        /* Change the file mode mask */
        umask(0);
    
        /* Open any logs here */
        openlog("pinsensed", LOG_PID, LOG_DAEMON);
        /* Create a new SID for the child process */
        sid = setsid();
        if (sid < 0) {
                /* Log any failure here */
                exit(EXIT_FAILURE);
        }
    
        /* Change the current working directory */
        if ((chdir("/")) < 0) {
                /* Log any failure here */
                exit(EXIT_FAILURE);
        }
    
    
        /* Close out the standard file descriptors */
        close(STDIN_FILENO);
        close(STDOUT_FILENO);
        close(STDERR_FILENO);
    
    }
    
    bool done = false;
    
    void trpsig(int)
    {
        done = true;
    }
    
    int main(int argc, char** argv) {
        daemonize();
        signal(SIGTERM, &trpsig);
    
        int fd, state;
        struct hda_verb_ioctl val;
        syslog(LOG_INFO, "Daemon started.");
        fd = open("/dev/snd/hwC0D0", O_RDWR);
        if (fd < 0) {
            syslog(LOG_ERR, "Failed to open snd device.");
                exit(EXIT_FAILURE);
        }
        val.verb = HDA_VERB(0x19, 0x0f09, 0x0);
            if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                syslog(LOG_ERR, "Failed to write hda verb.");
        state = val.res >> 31;
        syslog(LOG_INFO, "Starting input value: %0x", state);
        while(!done)
        {
            sleep(1);
            val.verb = HDA_VERB(0x19, 0x0f09, 0x0);
            if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                syslog(LOG_ERR, "Failed to write hda verb.");
    
            if(state != (val.res >> 31))
            {
                state = (val.res >> 31);
                syslog(LOG_INFO, "New input value: %0x", state);
                if(state == 0x1)
                    val.verb = HDA_VERB(0x1f, 0x701, 0x1);
                else
                    val.verb = HDA_VERB(0x1f, 0x701, 0x0);
                if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                    syslog(LOG_ERR, "Failed to write hda verb.");
            }
        }
        close(fd);
        syslog(LOG_INFO, "Daemon stopped.");
        exit(EXIT_SUCCESS);
    }
    Compile with g++ main.cpp -o pinsensed
    Run with sudo ./pinsensed
    It's was usefull for me) I had appended some features to this code if u not has objections) Look this one http://wildmagic.ru/public/pinsensed.tar.gz.

  3. #153
    Join Date
    Mar 2010
    Beans
    16

    Arrow Re: snd_hda_intel options database

    Quote Originally Posted by Alex Paderin View Post
    It's was usefull for me) I had appended some features to this code if u not has objections) Look this one http://wildmagic.ru/public/pinsensed.tar.gz.
    I'm totally dummy with Ubuntu, but i like it. Please give an instruction step by step, what i must to do to mute speakers, when my headphones is plugged in. (PC -> Asus k52F)

  4. #154
    Join Date
    Aug 2005
    Beans
    368

    Re: snd_hda_intel options database

    An important note here:

    These 'model=' settings should normally not be required because Alsa should autodetect the hardware.

    The way this should work is that we find the proper 'model=' line, we verify it, and then we supply a patch to the Alsa project so that the specific hardware gets autodetected!

    Here is an example of this process,
    http://simos.info/blog/archives/984

    If we get more of these 'model' lines converted to patches, we will be able to do some really good things to Alsa. At the same time, we get our names in the Linux kernel source code

  5. #155
    Join Date
    Jul 2010
    Beans
    1
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: snd_hda_intel options database

    I'm a newbie and I tried your fix through the command line

    My computer (HP 110-1030NR) didn't like this part in particular:

    killall pulseaudio

    sudo alsa force-reload

    pulseaudio -D


    Ever since then my speakers haven't worked. Before it was just the microphone, but now the speakers are gone too!

    This is what I got in response to the command:

    user@user-laptop:~$ gksu gedit /etc/modprobe.d/alsa-base.conf
    user@user-laptop:~$ killall pulseaudio
    user@user-laptop:~$
    user@user-laptop:~$ sudo alsa force-reload
    lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs
    Output information may be incomplete.
    lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs
    Output information may be incomplete.
    /sbin/alsa: Warning: Processes using sound devices: 1598(pulseaudio).
    Unloading ALSA sound driver modules: snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm-oss snd-mixer-oss snd-pcm snd-seq-dummy snd-seq-oss snd-seq-midi snd-rawmidi snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc (failed: modules still loaded: snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm snd-timer snd-page-alloc).
    Loading ALSA sound driver modules: snd-hda-codec-idt snd-hda-intel snd-hda-codec snd-hwdep snd-pcm-oss snd-mixer-oss snd-pcm snd-seq-dummy snd-seq-oss snd-seq-midi snd-rawmidi snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-allocWARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base, it will be ignored in a future release.
    .
    user@user-laptop:~$
    user@user-laptop:~$ pulseaudio -D
    E: main.c: Daemon startup failed.
    _____________

    Help? Please?

  6. #156
    Join Date
    May 2008
    Location
    Ohio, USA
    Beans
    6,905
    Distro
    Ubuntu Gnome 15.04 Vivid Vervet

    Re: snd_hda_intel options database

    Quote Originally Posted by kittyjay14 View Post
    I'm a newbie and I tried your fix through the command line

    My computer (HP 110-1030NR) didn't like this part in particular:

    killall pulseaudio

    sudo alsa force-reload

    pulseaudio -D


    Ever since then my speakers haven't worked. Before it was just the microphone, but now the speakers are gone too!



    Help? Please?
    Try a reboot. Those commands just reload alsa and pulse. Then check your volume levels.

  7. #157
    Join Date
    Jul 2010
    Beans
    1

    Re: snd_hda_intel options database

    In Ubuntu 10.04 on Fujitsu-Siemens AMILO Pi1505 i added model=3stack-dig , rebooted and all worked well

    Others maybe need to add this as well, although on older version of Ubuntu sound worked out of the box like a charm

  8. #158
    Join Date
    Aug 2005
    Beans
    368

    Re: snd_hda_intel options database

    Quote Originally Posted by EternalSoul View Post
    In Ubuntu 10.04 on Fujitsu-Siemens AMILO Pi1505 i added model=3stack-dig , rebooted and all worked well

    Others maybe need to add this as well, although on older version of Ubuntu sound worked out of the box like a charm
    Thanks.

    Could you please run alsa-info.sh and post the details of your sound card? This will be useful to get those information in the Linux kernel so that new versions of Ubuntu will work out of the box for your hardware.

    To run alsa-info.sh, run

    1. wget www.alsa-project.org/alsa-info.sh -O alsa-info.sh
    2. bash alsa-info.sh

    When prompted, select to upload the details to the alsa-project.org website.
    What you then need to do is post the URL you will be given here! That's it.

  9. #159
    Join Date
    May 2009
    Location
    rocket city,al,usa
    Beans
    659
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: snd_hda_intel options database

    bump, how come this isn`t a stickie????????

  10. #160
    Join Date
    May 2009
    Location
    rocket city,al,usa
    Beans
    659
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: snd_hda_intel options database

    bump

Page 16 of 29 FirstFirst ... 6141516171826 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •