[alsa-devel] [PATCH] [RFC 8/13] Intel SST sound card driver

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Jul 4 12:57:43 CEST 2009


On Fri, Jul 03, 2009 at 12:36:15PM +0530, Vinod Koul wrote:

> +	case SND_FS:
> +		if (intsts & 0x1) {
> +			/*send long push*/
> +			ret_val = snd_intelmad_generate_netlink(1,
> +						AUDIO_EVENT_LONG_PRESS);
> +		}
> +		if (intsts & 0x2) {
> +			/*send short push*/
> +			ret_val = snd_intelmad_generate_netlink(1,
> +						AUDIO_EVENT_SHORT_PRESS);
> +		}
> +		if (intsts & 0x4) {
> +			/*send headphone detect*/
> +			ret_val = snd_intelmad_generate_netlink(1,
> +						AUDIO_EVENT_HP_DETECT);
> +		}
> +		if (intsts & 0x8) {
> +			/*send headset detect*/
> +			ret_val = snd_intelmad_generate_netlink(1,
> +						AUDIO_EVENT_HS_DETECT);
> +		}
> +		break;

ALSA core has an interface for representing jacks to user space which
should be used here - see include/sound/jack.h.

> +	case SND_MX:

> +	case SND_NC:

Looks like you've got one of these per vendor - does this need to be
placed into the vendor abstraction?


More information about the Alsa-devel mailing list