28 Apr, 2015

2 commits

  • Dont create input devices for phantom jacks.

    Here, we extend snd_jack_new() to support phantom jack creating:
    pass in a bool param for [non-]phantom flag, and a bool param
    initial_jack to indicate whether we need to create a kctl at
    this stage.

    We can also add a kctl to the jack after its created meaning we
    can now integrate the HDA and ASoC jacks.

    Signed-off-by: Jie Yang
    Signed-off-by: Takashi Iwai

    Jie Yang
     
  • Currently the ALSA jack core registers only input devices for each jack
    registered. These jack input devices are not readable by userspace devices
    that run as non root. This patch series will implement kctls inside the
    core jack part, including kctls creating, status changing report, for both
    HD-Audio and ASoC jack. This allows non root userspace to read jack status
    and act on it.

    This patch adds a new API called snd_jack_add_new_kctl(), which will create
    a kcontrol, add it to the card, and also attach it to the jack kctl list.

    This patch also initialises the jack kctl list after jack is newed, and
    reports kctl status when jack insertion/removal events occur.

    snd_jack_new() is updated in the following patches to also support creating
    phantom jacks and jack kcontrols. We then remove these duplicated features
    from HDA jack and have jack kctls handled by core throughout HDA and ASoC.

    Signed-off-by: Liam Girdwood
    Modified-by: Jie Yang
    Signed-off-by: Jie Yang
    Reveiwed-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Jie Yang
     

08 Dec, 2014

1 commit


29 Oct, 2014

1 commit


28 Oct, 2014

1 commit


28 Feb, 2012

1 commit


05 Oct, 2011

1 commit


07 Sep, 2010

1 commit


18 Mar, 2010

1 commit

  • Some devices provide support for detection of a small number of
    buttons on their jacks. One common implementation provides a single
    button, implemented by shorting the microphone to ground and detected
    along with microphone presence detection by detecting varying current
    draws on the microphone bias signal.

    Provide support for up to three buttons via the jack interface. These
    default to reporting BTN_n but an API is provided to allow these to
    be remapped to other keys by the machine driver where it knows what
    the keys are. More keys can be added with ease if required.

    This is only intended to support simple accessory button designs. If
    the interface is limiting then either creating a child device for the
    accessory or accessing the input device in the jack directly is
    recommended.

    Signed-off-by: Mark Brown

    Mark Brown
     

14 Apr, 2009

1 commit


07 Jan, 2009

1 commit


04 Jan, 2009

1 commit


10 Dec, 2008

1 commit

  • Some systems support both mechanical and electrical jack detection,
    allowing them to report that a jack is physically present but does
    not have any functioning connections. Add a new jack type for these,
    allowing user space to report faulty connections.

    Thanks to Guillem Jover for the suggestion.

    Signed-off-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Mark Brown
     

27 Oct, 2008

1 commit


30 Jul, 2008

1 commit

  • Currently very few systems provide information about jack status to user
    space, even though many have hardware facilities to do detection. Those
    systems that do use an input device with the existing SW_HEADPHONE_INSERT
    switch type to do so, often independently of ALSA.

    This patch introduces a standard method for representing jacks to user
    space into ALSA. It allows drivers to register jacks for a sound card with
    the input subsystem, binding the input device to the card to help user
    space associate the input devices with their sound cards. The created
    input devices are named in the form "card longname jack" where jack is
    provided by the driver when allocating a jack. By default the parent for
    the input device is the sound card but this can be overridden by the
    card driver.

    The existing user space API with SW_HEADPHONE_INSERT is preserved.

    Signed-off-by: Mark Brown
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Mark Brown