280. Tv

Data for configuration of tv, input and output functions.

280.1. Summary of Module Globals

List of Global Functions

  • CardAddCurrent - Add the <B>current_card</B> to the <B>cards</B>. Try to fill holes after removes.

  • CardGet - Get <B>index</B>th card.

  • CardIndexUniqKey - Return card index

  • CardRemove - Remove <B>index</B>th card. Does not touch <B>current_card</B>. (In fact, we just replace the card on the position of 'index' with nil.)

  • CardReplaceWithCurrent - Replace <B>index</B>th card with the <B>current_card</B>.

  • CardsAsItemMap - Creates the content of the "configured card" Table in OverviewDialog()

  • CardsAsItems - Creates the content of the "configured card" Table in OverviewDialog()

  • CardsDBVendorGetCards - Create a list of cards of the selected vendor.

  • CardsDBVendorsAsItems - Create a list of items for the "Vendors:" SelectionBox in the ManualDialog() screen.

  • CardsUniqueKeys - Creates a list of unique keys of cards that are already installed.

  • Detect - Scan for the TV cards.

  • DetectedCardGet - Get <B>index</B>th card.

  • DetectedCardsAsItems - List of the TV cards acceptable by the Selection Box widget in the DetectedDialog(). The already installed cards are filtered out.

  • Export - Dump the tv settings to a single map (For use by autoinstallation.)

  • GetIRCModule - Decides which LIRC module can be used accoring to current TV card

  • GetKernelModuleInfo - Return description of one kernel module

  • GetTuner - Returns the tuner map according to its ID

  • GetTvCard - Grab the TV card from the database

  • Import - Get all TV settings from the first parameter (For use by autoinstallation.)

  • InitializeStationsConfig - Initialize stations configuration (read global config etc.)

  • InstalledCardsSummary - Returns a list with the overview of the installed cards. It can be used in Summary::DevicesList().

  • IsDirty - If the configuration was changed by the user, this will return true.

  • LoadIRCModulesDescription - Load the desription of irc kernel modules (modinfo)

  • ModuleParametersAsItems - List of the parameters for the selected kernel module acceptable by the Table widget in the ManualDetailsDialog().

  • ModulesAsItems - List of the kernel modules for radio cards acceptable by the Combo Box widget in the ManualDetailsDialog().

  • Propose - Create a configuration automagically.

  • Read - Read all TV card settings from the SCR

  • ReadCardsDatabase - Read the database of the TV cards.

  • ReadIRC - Read IRC settings

  • ReadKernelModules - Get a list of the available v4l kernel modules and store it to <B>kernel_modules</B> map.

  • ReadSettings - Fill the map of all tv settings from the SCR.

  • ReadStationsConfig - Read the whole contents of xawtvrc file and return it as a map

  • ReadTunersDatabase - Read the database of the tuners.

  • ReadUserSettings - Read the state of "not_ask" variable (if the TV/radio application presence should be checked again next time)

  • Summary - Build a textual summary that can be used e.g. in inst_hw_config () or something similar.

  • TunersDBAsItems - List of tuners for TV cards acceptable by the SelectionBox widget.

  • TunersDBHasTunersFor - Are there any tuners for the <B>kernel_module</B>?

  • TunersDBSelectTuner - Return the <B>number</B>th tuner.

  • Write - Update the SCR according to tv settings

  • WriteIRC - Write IRC settings

  • WriteStationsConfig - Write to /etc/X11/xawtvrc

  • tv_tmp_start - Load the modules for TV suport now, use current (not yet saved) options It calls something like 'modprobe -C /dev/null bttv card=2 tuner=23'

List of Global Variables

  • cards_database - Database of the TV cards for the manual configuration. It is a list of maps with vendors, and each of the vendor contains a list of cards with the kernel module and its parameters. It is read in ReadDialog()

  • channels_config - Configuration of TV stations (contents of /etc/X11/xawtvrc file)

  • current_card - The card which is currently being configured. It will become an entry in the "cards" list.

  • current_card_no - The number of card which is currently being configured. It has its meaning only when editing the entry.

  • irc_config - configuration file for IR control

  • irc_modified - Is IRC modified?

  • irc_module - kerenel module used for lirc

  • irc_modules - Map of lirc modules, together with their description (from modinfo)

  • irc_modules_list - Kernel modules for LIRC

  • kernel_modules - Map of available TV kernel modules and their parameters.

  • not_ask - If YaST should check the presence of TV/radio application

  • proposal_valid - Becomes true, when the module is initialized for proposal.

  • remotes - Paths to config files of various remote controls

  • stations_modified - Were TV stations modified?

  • use_irc - Is IRC used?

  • used_modprobe_conf - This is true, if tv data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/tv

280.2. Global Functions

280.2.1. CardAddCurrent

Add the <B>current_card</B> to the <B>cards</B>. Try to fill holes after removes.

Return value

  • integer - Index of the added card.

280.2.2. CardGet

Get <B>index</B>th card.

Function parameters

  • integer index

Return value

  • any - The 'index'th card or nil

280.2.3. CardIndexUniqKey

Return card index

Function parameters

  • string uniq

Return value

  • integer - index or nil if ID was not found

280.2.4. CardRemove

Remove <B>index</B>th card. Does not touch <B>current_card</B>. (In fact, we just replace the card on the position of 'index' with nil.)

Function parameters

  • integer index

Return value

  • boolean - Returns true if the card was erased.

280.2.5. CardReplaceWithCurrent

Replace <B>index</B>th card with the <B>current_card</B>.

Function parameters

  • integer index

Return value

  • boolean - Returns true if successfully replaced.

280.2.6. CardsAsItemMap

Creates the content of the "configured card" Table in OverviewDialog()

Return value

  • list<map<string,any> > - List of `item()s

280.2.7. CardsAsItems

Creates the content of the "configured card" Table in OverviewDialog()

Return value

  • list - List of `item()s

280.2.8. CardsDBVendorGetCards

Create a list of cards of the selected vendor.

Function parameters

  • map autodetected

  • integer sel_vendor

Return value

  • list - List of cards of the selected vendor.

280.2.9. CardsDBVendorsAsItems

Create a list of items for the "Vendors:" SelectionBox in the ManualDialog() screen.

Function parameters

  • map autodetected

  • map parameters

  • string mod

Return value

  • list - List of list of `item()s and number of the vendor to preselect

280.2.10. CardsUniqueKeys

Creates a list of unique keys of cards that are already installed.

Return value

  • list - List of the unque keys.

280.2.11. Detect

Scan for the TV cards.

Return value

  • boolean - Return false if the module should be terminated.

280.2.12. DetectedCardGet

Get <B>index</B>th card.

Function parameters

  • integer index

Return value

  • map - The 'index'th card or nil

280.2.13. DetectedCardsAsItems

List of the TV cards acceptable by the Selection Box widget in the DetectedDialog(). The already installed cards are filtered out.

Return value

  • list - List of TV cards including Other (not detected) with `id(-1))

280.2.14. Export

Dump the tv settings to a single map (For use by autoinstallation.)

Return value

  • map - Dumped settings (later acceptable by Import ())

280.2.15. GetIRCModule

Decides which LIRC module can be used accoring to current TV card

Return value

  • string - module name

280.2.16. GetKernelModuleInfo

Return description of one kernel module

Function parameters

  • string modname

Return value

  • map

280.2.17. GetTuner

Returns the tuner map according to its ID

Function parameters

  • string kernel_name

  • string tuner_id

Return value

  • map - Tuner

280.2.18. GetTvCard

Grab the TV card from the database

Function parameters

  • string card_model

  • string modname

Return value

  • map - card map

280.2.19. Import

Get all TV settings from the first parameter (For use by autoinstallation.)

Function parameters

  • map settings

Return value

  • boolean - True on success

280.2.20. InitializeStationsConfig

Initialize stations configuration (read global config etc.)

Return value

  • boolean

280.2.21. InstalledCardsSummary

Returns a list with the overview of the installed cards. It can be used in Summary::DevicesList().

Return value

  • list - Description of the installed cards

280.2.22. IsDirty

If the configuration was changed by the user, this will return true.

Return value

  • boolean - Has the configuration changed?

280.2.23. LoadIRCModulesDescription

Load the desription of irc kernel modules (modinfo)

Return value

  • void

280.2.24. ModuleParametersAsItems

List of the parameters for the selected kernel module acceptable by the Table widget in the ManualDetailsDialog().

Function parameters

  • map modules

  • string selected_module

  • map parameters

Return value

  • list - List of `item()s.

280.2.25. ModulesAsItems

List of the kernel modules for radio cards acceptable by the Combo Box widget in the ManualDetailsDialog().

Function parameters

  • map modules

  • string selected_module

Return value

  • list - List of `item()s

280.2.26. Propose

Create a configuration automagically.

Return value

  • void

280.2.27. Read

Read all TV card settings from the SCR

Function parameters

  • block<boolean> abort

Return value

  • boolean - True on success

280.2.28. ReadCardsDatabase

Read the database of the TV cards.

Return value

  • boolean - Was the read successful?

280.2.29. ReadIRC

Read IRC settings

Return value

  • any - Symbol for next or abort dialog.

280.2.30. ReadKernelModules

Get a list of the available v4l kernel modules and store it to <B>kernel_modules</B> map.

Return value

  • boolean - Returns <B>true</B>.

280.2.31. ReadSettings

Fill the map of all tv settings from the SCR.

Return value

  • boolean - Was the reading succesfull?

280.2.32. ReadStationsConfig

Read the whole contents of xawtvrc file and return it as a map

Function parameters

  • path pth

Return value

  • map

280.2.33. ReadTunersDatabase

Read the database of the tuners.

Return value

  • boolean - Was the read successful?

280.2.34. ReadUserSettings

Read the state of "not_ask" variable (if the TV/radio application presence should be checked again next time)

Return value

  • boolean - not_ask value

280.2.35. Summary

Build a textual summary that can be used e.g. in inst_hw_config () or something similar.

Return value

  • string - Summary of the configuration.

280.2.36. TunersDBAsItems

List of tuners for TV cards acceptable by the SelectionBox widget.

Function parameters

  • string kernel_module

  • map selected_tuner

Return value

  • list - List of `item()s.

280.2.37. TunersDBHasTunersFor

Are there any tuners for the <B>kernel_module</B>?

Function parameters

  • string kernel_module

Return value

  • boolean - Are there available tuners for it?

280.2.38. TunersDBSelectTuner

Return the <B>number</B>th tuner.

Function parameters

  • string kernel_module

  • integer number

Return value

  • map - Tuner.

280.2.39. Write

Update the SCR according to tv settings

Function parameters

  • block<boolean> abort

Return value

  • boolean - True on success

280.2.40. WriteIRC

Write IRC settings

Return value

  • any - Symbol for next or abort dialog.

280.2.41. WriteStationsConfig

Write to /etc/X11/xawtvrc

Return value

  • boolean

280.2.42. tv_tmp_start

Load the modules for TV suport now, use current (not yet saved) options It calls something like 'modprobe -C /dev/null bttv card=2 tuner=23'

Return value

  • string - empty string on success, error message otherwise

280.3. Global Variables

280.3.1. cards_database

Database of the TV cards for the manual configuration. It is a list of maps with vendors, and each of the vendor contains a list of cards with the kernel module and its parameters. It is read in ReadDialog()

280.3.2. channels_config

Configuration of TV stations (contents of /etc/X11/xawtvrc file)

280.3.3. current_card

The card which is currently being configured. It will become an entry in the "cards" list.

280.3.4. current_card_no

The number of card which is currently being configured. It has its meaning only when editing the entry.

280.3.5. irc_config

configuration file for IR control

280.3.6. irc_modified

Is IRC modified?

280.3.7. irc_module

kerenel module used for lirc

280.3.8. irc_modules

Map of lirc modules, together with their description (from modinfo)

280.3.9. irc_modules_list

Kernel modules for LIRC

280.3.10. kernel_modules

Map of available TV kernel modules and their parameters.

280.3.11. not_ask

If YaST should check the presence of TV/radio application

280.3.12. proposal_valid

Becomes true, when the module is initialized for proposal.

280.3.13. remotes

Paths to config files of various remote controls

280.3.14. stations_modified

Were TV stations modified?

280.3.15. use_irc

Is IRC used?

280.3.16. used_modprobe_conf

This is true, if tv data were read from /etc/modprobe.conf On write, they shoud be removed and written only to /etc/modprobe.d/tv

280.4. Module Requirements

280.4.1. Module Imports

  • Confirm
  • Directory
  • HWConfig
  • Label
  • Message
  • Mode
  • ModulesComments
  • Package
  • Progress
  • Report
  • Service
  • Sound
  • Summary
  • WizardHW

280.4.2. Module Includes

  • sound/write_routines.ycp
  • tv/misc.ycp