pulseaudio  14.2
About: PulseAudio is a networked sound server (for POSIX OSes), a proxy for your sound applications.
  Fossies Dox: pulseaudio-14.2.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

module-switch-on-port-available.c File Reference
Include dependency graph for module-switch-on-port-available.c:

Go to the source code of this file.

Data Structures

struct  card_info
 
struct  userdata
 
struct  port_pointers
 

Functions

 PA_MODULE_AUTHOR ("David Henningsson")
 This file is part of PulseAudio. More...
 
 PA_MODULE_DESCRIPTION ("Switches ports and profiles when devices are plugged/unplugged")
 
 PA_MODULE_LOAD_ONCE (true)
 
 PA_MODULE_VERSION (PACKAGE_VERSION)
 
static void card_info_new (struct userdata *u, pa_card *card)
 
static void card_info_free (struct card_info *info)
 
static bool profile_good_for_output (pa_card_profile *profile, pa_device_port *port)
 
static bool profile_good_for_input (pa_card_profile *profile, pa_device_port *port)
 
static int try_to_switch_profile (pa_device_port *port)
 
static const char * profile_name_for_dir (pa_card_profile *cp, pa_direction_t dir)
 
static struct port_pointers find_port_pointers (pa_device_port *port)
 
static void switch_to_port (pa_device_port *port, struct port_pointers pp)
 
static void switch_from_port (pa_device_port *port, struct port_pointers pp)
 
static pa_hook_result_t port_available_hook_callback (pa_core *c, pa_device_port *port, void *userdata)
 
static pa_card_profilefind_best_profile (pa_card *card)
 
static pa_hook_result_t card_profile_available_hook_callback (pa_core *c, pa_card_profile *profile, struct userdata *u)
 
static void handle_all_unavailable (pa_core *core)
 
static pa_device_portnew_sink_source (pa_hashmap *ports, const char *name)
 
static pa_hook_result_t sink_new_hook_callback (pa_core *c, pa_sink_new_data *new_data, void *u)
 
static pa_hook_result_t source_new_hook_callback (pa_core *c, pa_source_new_data *new_data, void *u)
 
static pa_hook_result_t card_put_hook_callback (pa_core *core, pa_card *card, struct userdata *u)
 
static pa_hook_result_t card_unlink_hook_callback (pa_core *core, pa_card *card, struct userdata *u)
 
static void update_preferred_input_port (pa_card *card, pa_card_profile *old_profile, pa_card_profile *new_profile)
 
static void update_preferred_output_port (pa_card *card, pa_card_profile *old_profile, pa_card_profile *new_profile)
 
static pa_hook_result_t card_profile_changed_callback (pa_core *core, pa_card *card, struct userdata *u)
 
static pa_hook_result_t source_port_changed_callback (pa_core *core, pa_source *source, void *userdata)
 
static pa_hook_result_t sink_port_changed_callback (pa_core *core, pa_sink *sink, void *userdata)
 
int pa__init (pa_module *m)
 
void pa__done (pa_module *module)
 

Function Documentation

◆ card_info_free()

static void card_info_free ( struct card_info info)
static

◆ card_info_new()

static void card_info_new ( struct userdata u,
pa_card card 
)
static

◆ card_profile_available_hook_callback()

static pa_hook_result_t card_profile_available_hook_callback ( pa_core c,
pa_card_profile profile,
struct userdata u 
)
static

◆ card_profile_changed_callback()

◆ card_put_hook_callback()

static pa_hook_result_t card_put_hook_callback ( pa_core core,
pa_card card,
struct userdata u 
)
static

Definition at line 454 of file module-switch-on-port-available.c.

References card_info_new(), and PA_HOOK_OK.

Referenced by pa__init().

◆ card_unlink_hook_callback()

static pa_hook_result_t card_unlink_hook_callback ( pa_core core,
pa_card card,
struct userdata u 
)
static

◆ find_best_profile()

◆ find_port_pointers()

◆ handle_all_unavailable()

◆ new_sink_source()

◆ pa__done()

◆ pa__init()

◆ PA_MODULE_AUTHOR()

PA_MODULE_AUTHOR ( "David Henningsson"  )

This file is part of PulseAudio.

Copyright 2006 Lennart Poettering Copyright 2011 Canonical Ltd

PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

PulseAudio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with PulseAudio; if not, see http://www.gnu.org/licenses/.

◆ PA_MODULE_DESCRIPTION()

PA_MODULE_DESCRIPTION ( "Switches ports and profiles when devices are plugged/unplugged"  )

◆ PA_MODULE_LOAD_ONCE()

PA_MODULE_LOAD_ONCE ( true  )

◆ PA_MODULE_VERSION()

PA_MODULE_VERSION ( PACKAGE_VERSION  )

◆ port_available_hook_callback()

◆ profile_good_for_input()

◆ profile_good_for_output()

◆ profile_name_for_dir()

static const char* profile_name_for_dir ( pa_card_profile cp,
pa_direction_t  dir 
)
static

Definition at line 191 of file module-switch-on-port-available.c.

◆ sink_new_hook_callback()

◆ sink_port_changed_callback()

static pa_hook_result_t sink_port_changed_callback ( pa_core core,
pa_sink sink,
void *  userdata 
)
static

◆ source_new_hook_callback()

◆ source_port_changed_callback()

static pa_hook_result_t source_port_changed_callback ( pa_core core,
pa_source source,
void *  userdata 
)
static

◆ switch_from_port()

◆ switch_to_port()

◆ try_to_switch_profile()

◆ update_preferred_input_port()

◆ update_preferred_output_port()