/*1* Digital Beep Input Interface for HD-audio codec2*3* Author: Matthew Ranostay <[email protected]>4* Copyright (c) 2008 Embedded Alley Solutions Inc5*6* This driver is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License as published by8* the Free Software Foundation; either version 2 of the License, or9* (at your option) any later version.10*11* This driver is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19*/2021#ifndef __SOUND_HDA_BEEP_H22#define __SOUND_HDA_BEEP_H2324#include "hda_codec.h"2526#define HDA_BEEP_MODE_OFF 027#define HDA_BEEP_MODE_ON 128#define HDA_BEEP_MODE_SWREG 22930/* beep information */31struct hda_beep {32struct input_dev *dev;33struct hda_codec *codec;34unsigned int mode;35char phys[32];36int tone;37hda_nid_t nid;38unsigned int enabled:1;39unsigned int request_enable:1;40unsigned int linear_tone:1; /* linear tone for IDT/STAC codec */41struct work_struct register_work; /* registration work */42struct delayed_work unregister_work; /* unregistration work */43struct work_struct beep_work; /* scheduled task for beep event */44struct mutex mutex;45};4647#ifdef CONFIG_SND_HDA_INPUT_BEEP48int snd_hda_enable_beep_device(struct hda_codec *codec, int enable);49int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);50void snd_hda_detach_beep_device(struct hda_codec *codec);51#else52static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)53{54return 0;55}56static inline void snd_hda_detach_beep_device(struct hda_codec *codec)57{58}59#endif60#endif616263